diff --git a/generation_config.yaml b/generation_config.yaml index dd88e8c6b105..6d73b18a8562 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1789,6 +1789,7 @@ libraries: GAPICs: - proto_path: google/cloud/networkconnectivity/v1 - proto_path: google/cloud/networkconnectivity/v1alpha1 + - proto_path: google/cloud/networkconnectivity/v1beta - api_shortname: networkservices name_pretty: Network Services API product_documentation: https://cloud.google.com/products/networking diff --git a/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml b/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml index 99c0c7c41c69..15acf82ec0d2 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml +++ b/java-networkconnectivity/google-cloud-networkconnectivity-bom/pom.xml @@ -39,6 +39,11 @@ grpc-google-cloud-networkconnectivity-v1 1.87.0-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-networkconnectivity-v1alpha1 @@ -49,6 +54,11 @@ proto-google-cloud-networkconnectivity-v1 1.87.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml index f73035647856..fb45e18176c9 100644 --- a/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml +++ b/java-networkconnectivity/google-cloud-networkconnectivity/pom.xml @@ -41,6 +41,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-networkconnectivity-v1beta + com.google.api.grpc proto-google-cloud-networkconnectivity-v1 @@ -74,6 +78,11 @@ grpc-google-iam-v1 test + + com.google.api.grpc + grpc-google-cloud-networkconnectivity-v1beta + test + com.google.api.grpc grpc-google-common-protos diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClient.java new file mode 100644 index 000000000000..fcd99dd0be94 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClient.java @@ -0,0 +1,3197 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.DataTransferServiceStub; +import com.google.cloud.networkconnectivity.v1beta.stub.DataTransferServiceStubSettings; +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.longrunning.OperationsClient; +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: DataTransferService is the service for the Data Transfer API. + * + *

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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ *   MulticloudDataTransferConfigName name =
+ *       MulticloudDataTransferConfigName.of(
+ *           "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ *   MulticloudDataTransferConfig response =
+ *       dataTransferServiceClient.getMulticloudDataTransferConfig(name);
+ * }
+ * }
+ * + *

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

ListMulticloudDataTransferConfigs

Lists the `MulticloudDataTransferConfig` resources in a specified project and location.

+ *

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

+ *
    + *
  • listMulticloudDataTransferConfigs(ListMulticloudDataTransferConfigsRequest request) + *

+ *

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

+ *
    + *
  • listMulticloudDataTransferConfigs(LocationName parent) + *

  • listMulticloudDataTransferConfigs(String parent) + *

+ *

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

+ *
    + *
  • listMulticloudDataTransferConfigsPagedCallable() + *

  • listMulticloudDataTransferConfigsCallable() + *

+ *

GetMulticloudDataTransferConfig

Gets the details of a `MulticloudDataTransferConfig` resource.

+ *

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

+ *
    + *
  • getMulticloudDataTransferConfig(GetMulticloudDataTransferConfigRequest request) + *

+ *

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

+ *
    + *
  • getMulticloudDataTransferConfig(MulticloudDataTransferConfigName name) + *

  • getMulticloudDataTransferConfig(String name) + *

+ *

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

+ *
    + *
  • getMulticloudDataTransferConfigCallable() + *

+ *

CreateMulticloudDataTransferConfig

Creates a `MulticloudDataTransferConfig` resource in a specified project and location.

+ *

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

+ *
    + *
  • createMulticloudDataTransferConfigAsync(CreateMulticloudDataTransferConfigRequest request) + *

+ *

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

+ *
    + *
  • createMulticloudDataTransferConfigAsync(LocationName parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId) + *

  • createMulticloudDataTransferConfigAsync(String parent, MulticloudDataTransferConfig multicloudDataTransferConfig, String multicloudDataTransferConfigId) + *

+ *

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

+ *
    + *
  • createMulticloudDataTransferConfigOperationCallable() + *

  • createMulticloudDataTransferConfigCallable() + *

+ *

UpdateMulticloudDataTransferConfig

Updates a `MulticloudDataTransferConfig` resource in a specified project and location.

+ *

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

+ *
    + *
  • updateMulticloudDataTransferConfigAsync(UpdateMulticloudDataTransferConfigRequest request) + *

+ *

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

+ *
    + *
  • updateMulticloudDataTransferConfigAsync(MulticloudDataTransferConfig multicloudDataTransferConfig, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateMulticloudDataTransferConfigOperationCallable() + *

  • updateMulticloudDataTransferConfigCallable() + *

+ *

DeleteMulticloudDataTransferConfig

Deletes a `MulticloudDataTransferConfig` resource.

+ *

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

+ *
    + *
  • deleteMulticloudDataTransferConfigAsync(DeleteMulticloudDataTransferConfigRequest request) + *

+ *

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

+ *
    + *
  • deleteMulticloudDataTransferConfigAsync(MulticloudDataTransferConfigName name) + *

  • deleteMulticloudDataTransferConfigAsync(String name) + *

+ *

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

+ *
    + *
  • deleteMulticloudDataTransferConfigOperationCallable() + *

  • deleteMulticloudDataTransferConfigCallable() + *

+ *

ListDestinations

Lists the `Destination` resources in a specified project and location.

+ *

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

+ *
    + *
  • listDestinations(ListDestinationsRequest request) + *

+ *

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

+ *
    + *
  • listDestinations(MulticloudDataTransferConfigName parent) + *

  • listDestinations(String parent) + *

+ *

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

+ *
    + *
  • listDestinationsPagedCallable() + *

  • listDestinationsCallable() + *

+ *

GetDestination

Gets the details of a `Destination` resource.

+ *

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

+ *
    + *
  • getDestination(GetDestinationRequest request) + *

+ *

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

+ *
    + *
  • getDestination(DestinationName name) + *

  • getDestination(String name) + *

+ *

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

+ *
    + *
  • getDestinationCallable() + *

+ *

CreateDestination

Creates a `Destination` resource in a specified project and location.

+ *

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

+ *
    + *
  • createDestinationAsync(CreateDestinationRequest request) + *

+ *

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

+ *
    + *
  • createDestinationAsync(MulticloudDataTransferConfigName parent, Destination destination, String destinationId) + *

  • createDestinationAsync(String parent, Destination destination, String destinationId) + *

+ *

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

+ *
    + *
  • createDestinationOperationCallable() + *

  • createDestinationCallable() + *

+ *

UpdateDestination

Updates a `Destination` resource in a specified project and location.

+ *

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

+ *
    + *
  • updateDestinationAsync(UpdateDestinationRequest request) + *

+ *

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

+ *
    + *
  • updateDestinationAsync(Destination destination, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateDestinationOperationCallable() + *

  • updateDestinationCallable() + *

+ *

DeleteDestination

Deletes a `Destination` resource.

+ *

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

+ *
    + *
  • deleteDestinationAsync(DeleteDestinationRequest request) + *

+ *

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

+ *
    + *
  • deleteDestinationAsync(DestinationName name) + *

  • deleteDestinationAsync(String name) + *

+ *

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

+ *
    + *
  • deleteDestinationOperationCallable() + *

  • deleteDestinationCallable() + *

+ *

GetMulticloudDataTransferSupportedService

Gets the details of a service that is supported for Data Transfer Essentials.

+ *

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

+ *
    + *
  • getMulticloudDataTransferSupportedService(GetMulticloudDataTransferSupportedServiceRequest request) + *

+ *

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

+ *
    + *
  • getMulticloudDataTransferSupportedService(MulticloudDataTransferSupportedServiceName name) + *

  • getMulticloudDataTransferSupportedService(String name) + *

+ *

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

+ *
    + *
  • getMulticloudDataTransferSupportedServiceCallable() + *

+ *

ListMulticloudDataTransferSupportedServices

Lists the services in the project for a region that are supported for Data Transfer Essentials.

+ *

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

+ *
    + *
  • listMulticloudDataTransferSupportedServices(ListMulticloudDataTransferSupportedServicesRequest request) + *

+ *

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

+ *
    + *
  • listMulticloudDataTransferSupportedServices(LocationName parent) + *

  • listMulticloudDataTransferSupportedServices(String parent) + *

+ *

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

+ *
    + *
  • listMulticloudDataTransferSupportedServicesPagedCallable() + *

  • listMulticloudDataTransferSupportedServicesCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways: + *

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

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

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

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 DataTransferServiceSettings 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
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ *     DataTransferServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ *     DataTransferServiceClient.create(dataTransferServiceSettings);
+ * }
+ * + *

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
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ *     DataTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ *     DataTransferServiceClient.create(dataTransferServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataTransferServiceClient implements BackgroundResource { + private final DataTransferServiceSettings settings; + private final DataTransferServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataTransferServiceClient with default settings. */ + public static final DataTransferServiceClient create() throws IOException { + return create(DataTransferServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient create(DataTransferServiceSettings settings) + throws IOException { + return new DataTransferServiceClient(settings); + } + + /** + * Constructs an instance of DataTransferServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(DataTransferServiceSettings). + */ + public static final DataTransferServiceClient create(DataTransferServiceStub stub) { + return new DataTransferServiceClient(stub); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient(DataTransferServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataTransferServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected DataTransferServiceClient(DataTransferServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataTransferServiceSettings getSettings() { + return settings; + } + + public DataTransferServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (MulticloudDataTransferConfig element :
+   *       dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs( + LocationName parent) { + ListMulticloudDataTransferConfigsRequest request = + ListMulticloudDataTransferConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMulticloudDataTransferConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (MulticloudDataTransferConfig element :
+   *       dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs( + String parent) { + ListMulticloudDataTransferConfigsRequest request = + ListMulticloudDataTransferConfigsRequest.newBuilder().setParent(parent).build(); + return listMulticloudDataTransferConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferConfigsRequest request =
+   *       ListMulticloudDataTransferConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   for (MulticloudDataTransferConfig element :
+   *       dataTransferServiceClient.listMulticloudDataTransferConfigs(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 ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs( + ListMulticloudDataTransferConfigsRequest request) { + return listMulticloudDataTransferConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferConfigsRequest request =
+   *       ListMulticloudDataTransferConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .listMulticloudDataTransferConfigsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (MulticloudDataTransferConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsPagedCallable() { + return stub.listMulticloudDataTransferConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferConfigsRequest request =
+   *       ListMulticloudDataTransferConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   while (true) {
+   *     ListMulticloudDataTransferConfigsResponse response =
+   *         dataTransferServiceClient.listMulticloudDataTransferConfigsCallable().call(request);
+   *     for (MulticloudDataTransferConfig element :
+   *         response.getMulticloudDataTransferConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsCallable() { + return stub.listMulticloudDataTransferConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a `MulticloudDataTransferConfig` resource. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetMulticloudDataTransferConfigRequest request =
+   *       GetMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setName(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.getMulticloudDataTransferConfigCallable().futureCall(request);
+   *   // Do something.
+   *   MulticloudDataTransferConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getMulticloudDataTransferConfigCallable() { + return stub.getMulticloudDataTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   MulticloudDataTransferConfig multicloudDataTransferConfig =
+   *       MulticloudDataTransferConfig.newBuilder().build();
+   *   String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
+   *   MulticloudDataTransferConfig response =
+   *       dataTransferServiceClient
+   *           .createMulticloudDataTransferConfigAsync(
+   *               parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to + * create. + * @param multicloudDataTransferConfigId Required. The ID to use for the + * `MulticloudDataTransferConfig` resource, which becomes the final component of the + * `MulticloudDataTransferConfig` resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createMulticloudDataTransferConfigAsync( + LocationName parent, + MulticloudDataTransferConfig multicloudDataTransferConfig, + String multicloudDataTransferConfigId) { + CreateMulticloudDataTransferConfigRequest request = + CreateMulticloudDataTransferConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .setMulticloudDataTransferConfigId(multicloudDataTransferConfigId) + .build(); + return createMulticloudDataTransferConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   MulticloudDataTransferConfig multicloudDataTransferConfig =
+   *       MulticloudDataTransferConfig.newBuilder().build();
+   *   String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
+   *   MulticloudDataTransferConfig response =
+   *       dataTransferServiceClient
+   *           .createMulticloudDataTransferConfigAsync(
+   *               parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to + * create. + * @param multicloudDataTransferConfigId Required. The ID to use for the + * `MulticloudDataTransferConfig` resource, which becomes the final component of the + * `MulticloudDataTransferConfig` resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createMulticloudDataTransferConfigAsync( + String parent, + MulticloudDataTransferConfig multicloudDataTransferConfig, + String multicloudDataTransferConfigId) { + CreateMulticloudDataTransferConfigRequest request = + CreateMulticloudDataTransferConfigRequest.newBuilder() + .setParent(parent) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .setMulticloudDataTransferConfigId(multicloudDataTransferConfigId) + .build(); + return createMulticloudDataTransferConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateMulticloudDataTransferConfigRequest request =
+   *       CreateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   MulticloudDataTransferConfig response =
+   *       dataTransferServiceClient.createMulticloudDataTransferConfigAsync(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 + createMulticloudDataTransferConfigAsync(CreateMulticloudDataTransferConfigRequest request) { + return createMulticloudDataTransferConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateMulticloudDataTransferConfigRequest request =
+   *       CreateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTransferServiceClient
+   *           .createMulticloudDataTransferConfigOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   MulticloudDataTransferConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationCallable() { + return stub.createMulticloudDataTransferConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateMulticloudDataTransferConfigRequest request =
+   *       CreateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .createMulticloudDataTransferConfigCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createMulticloudDataTransferConfigCallable() { + return stub.createMulticloudDataTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   MulticloudDataTransferConfig multicloudDataTransferConfig =
+   *       MulticloudDataTransferConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   MulticloudDataTransferConfig response =
+   *       dataTransferServiceClient
+   *           .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to + * update. + * @param updateMask Optional. `FieldMask` is used to specify the fields in the + * `MulticloudDataTransferConfig` resource to be overwritten by the update. The fields + * specified in `update_mask` are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If you don't specify a mask, all fields are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateMulticloudDataTransferConfigAsync( + MulticloudDataTransferConfig multicloudDataTransferConfig, FieldMask updateMask) { + UpdateMulticloudDataTransferConfigRequest request = + UpdateMulticloudDataTransferConfigRequest.newBuilder() + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .setUpdateMask(updateMask) + .build(); + return updateMulticloudDataTransferConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateMulticloudDataTransferConfigRequest request =
+   *       UpdateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   MulticloudDataTransferConfig response =
+   *       dataTransferServiceClient.updateMulticloudDataTransferConfigAsync(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 + updateMulticloudDataTransferConfigAsync(UpdateMulticloudDataTransferConfigRequest request) { + return updateMulticloudDataTransferConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateMulticloudDataTransferConfigRequest request =
+   *       UpdateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTransferServiceClient
+   *           .updateMulticloudDataTransferConfigOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   MulticloudDataTransferConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationCallable() { + return stub.updateMulticloudDataTransferConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateMulticloudDataTransferConfigRequest request =
+   *       UpdateMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .updateMulticloudDataTransferConfigCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateMulticloudDataTransferConfigCallable() { + return stub.updateMulticloudDataTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a `MulticloudDataTransferConfig` resource. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DeleteMulticloudDataTransferConfigRequest request =
+   *       DeleteMulticloudDataTransferConfigRequest.newBuilder()
+   *           .setName(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .deleteMulticloudDataTransferConfigCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteMulticloudDataTransferConfigCallable() { + return stub.deleteMulticloudDataTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   MulticloudDataTransferConfigName parent =
+   *       MulticloudDataTransferConfigName.of(
+   *           "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+   *   for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDestinationsPagedResponse listDestinations( + MulticloudDataTransferConfigName parent) { + ListDestinationsRequest request = + ListDestinationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDestinations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   String parent =
+   *       MulticloudDataTransferConfigName.of(
+   *               "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *           .toString();
+   *   for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDestinationsPagedResponse listDestinations(String parent) { + ListDestinationsRequest request = + ListDestinationsRequest.newBuilder().setParent(parent).build(); + return listDestinations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListDestinationsRequest request =
+   *       ListDestinationsRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   for (Destination element : dataTransferServiceClient.listDestinations(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 ListDestinationsPagedResponse listDestinations(ListDestinationsRequest request) { + return listDestinationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListDestinationsRequest request =
+   *       ListDestinationsRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.listDestinationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Destination element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDestinationsPagedCallable() { + return stub.listDestinationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListDestinationsRequest request =
+   *       ListDestinationsRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setReturnPartialSuccess(true)
+   *           .build();
+   *   while (true) {
+   *     ListDestinationsResponse response =
+   *         dataTransferServiceClient.listDestinationsCallable().call(request);
+   *     for (Destination element : response.getDestinationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDestinationsCallable() { + return stub.listDestinationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a `Destination` resource. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetDestinationRequest request =
+   *       GetDestinationRequest.newBuilder()
+   *           .setName(
+   *               DestinationName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+   *                       "[DESTINATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.getDestinationCallable().futureCall(request);
+   *   // Do something.
+   *   Destination response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDestinationCallable() { + return stub.getDestinationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   MulticloudDataTransferConfigName parent =
+   *       MulticloudDataTransferConfigName.of(
+   *           "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+   *   Destination destination = Destination.newBuilder().build();
+   *   String destinationId = "destinationId306545097";
+   *   Destination response =
+   *       dataTransferServiceClient
+   *           .createDestinationAsync(parent, destination, destinationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @param destination Required. The `Destination` resource to create. + * @param destinationId Required. The ID to use for the `Destination` resource, which becomes the + * final component of the `Destination` resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDestinationAsync( + MulticloudDataTransferConfigName parent, Destination destination, String destinationId) { + CreateDestinationRequest request = + CreateDestinationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDestination(destination) + .setDestinationId(destinationId) + .build(); + return createDestinationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   String parent =
+   *       MulticloudDataTransferConfigName.of(
+   *               "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *           .toString();
+   *   Destination destination = Destination.newBuilder().build();
+   *   String destinationId = "destinationId306545097";
+   *   Destination response =
+   *       dataTransferServiceClient
+   *           .createDestinationAsync(parent, destination, destinationId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @param destination Required. The `Destination` resource to create. + * @param destinationId Required. The ID to use for the `Destination` resource, which becomes the + * final component of the `Destination` resource name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDestinationAsync( + String parent, Destination destination, String destinationId) { + CreateDestinationRequest request = + CreateDestinationRequest.newBuilder() + .setParent(parent) + .setDestination(destination) + .setDestinationId(destinationId) + .build(); + return createDestinationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateDestinationRequest request =
+   *       CreateDestinationRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setDestinationId("destinationId306545097")
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Destination response = dataTransferServiceClient.createDestinationAsync(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 createDestinationAsync( + CreateDestinationRequest request) { + return createDestinationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateDestinationRequest request =
+   *       CreateDestinationRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setDestinationId("destinationId306545097")
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTransferServiceClient.createDestinationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Destination response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDestinationOperationCallable() { + return stub.createDestinationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   CreateDestinationRequest request =
+   *       CreateDestinationRequest.newBuilder()
+   *           .setParent(
+   *               MulticloudDataTransferConfigName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+   *                   .toString())
+   *           .setDestinationId("destinationId306545097")
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.createDestinationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDestinationCallable() { + return stub.createDestinationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   Destination destination = Destination.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Destination response =
+   *       dataTransferServiceClient.updateDestinationAsync(destination, updateMask).get();
+   * }
+   * }
+ * + * @param destination Required. The `Destination` resource to update. + * @param updateMask Optional. `FieldMask is used to specify the fields to be overwritten in the + * `Destination` resource by the update. The fields specified in `update_mask` are relative to + * the resource, not the full request. A field is overwritten if it is in the mask. If you + * don't specify a mask, all fields are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDestinationAsync( + Destination destination, FieldMask updateMask) { + UpdateDestinationRequest request = + UpdateDestinationRequest.newBuilder() + .setDestination(destination) + .setUpdateMask(updateMask) + .build(); + return updateDestinationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateDestinationRequest request =
+   *       UpdateDestinationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Destination response = dataTransferServiceClient.updateDestinationAsync(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 updateDestinationAsync( + UpdateDestinationRequest request) { + return updateDestinationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateDestinationRequest request =
+   *       UpdateDestinationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTransferServiceClient.updateDestinationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Destination response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDestinationOperationCallable() { + return stub.updateDestinationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a `Destination` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   UpdateDestinationRequest request =
+   *       UpdateDestinationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDestination(Destination.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.updateDestinationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDestinationCallable() { + return stub.updateDestinationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a `Destination` resource. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DeleteDestinationRequest request =
+   *       DeleteDestinationRequest.newBuilder()
+   *           .setName(
+   *               DestinationName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+   *                       "[DESTINATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.deleteDestinationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDestinationCallable() { + return stub.deleteDestinationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a service that is supported for Data Transfer Essentials. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetMulticloudDataTransferSupportedServiceRequest request =
+   *       GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
+   *           .setName(
+   *               MulticloudDataTransferSupportedServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
+   *                   .toString())
+   *           .build();
+   *   MulticloudDataTransferSupportedService response =
+   *       dataTransferServiceClient.getMulticloudDataTransferSupportedService(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 MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService( + GetMulticloudDataTransferSupportedServiceRequest request) { + return getMulticloudDataTransferSupportedServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a service that is supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetMulticloudDataTransferSupportedServiceRequest request =
+   *       GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
+   *           .setName(
+   *               MulticloudDataTransferSupportedServiceName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .getMulticloudDataTransferSupportedServiceCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   MulticloudDataTransferSupportedService response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceCallable() { + return stub.getMulticloudDataTransferSupportedServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the services in the project for a region that are supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (MulticloudDataTransferSupportedService element :
+   *       dataTransferServiceClient
+   *           .listMulticloudDataTransferSupportedServices(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMulticloudDataTransferSupportedServicesPagedResponse + listMulticloudDataTransferSupportedServices(LocationName parent) { + ListMulticloudDataTransferSupportedServicesRequest request = + ListMulticloudDataTransferSupportedServicesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listMulticloudDataTransferSupportedServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the services in the project for a region that are supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (MulticloudDataTransferSupportedService element :
+   *       dataTransferServiceClient
+   *           .listMulticloudDataTransferSupportedServices(parent)
+   *           .iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListMulticloudDataTransferSupportedServicesPagedResponse + listMulticloudDataTransferSupportedServices(String parent) { + ListMulticloudDataTransferSupportedServicesRequest request = + ListMulticloudDataTransferSupportedServicesRequest.newBuilder().setParent(parent).build(); + return listMulticloudDataTransferSupportedServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the services in the project for a region that are supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferSupportedServicesRequest request =
+   *       ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (MulticloudDataTransferSupportedService element :
+   *       dataTransferServiceClient
+   *           .listMulticloudDataTransferSupportedServices(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 ListMulticloudDataTransferSupportedServicesPagedResponse + listMulticloudDataTransferSupportedServices( + ListMulticloudDataTransferSupportedServicesRequest request) { + return listMulticloudDataTransferSupportedServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the services in the project for a region that are supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferSupportedServicesRequest request =
+   *       ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient
+   *           .listMulticloudDataTransferSupportedServicesPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (MulticloudDataTransferSupportedService element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesPagedCallable() { + return stub.listMulticloudDataTransferSupportedServicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the services in the project for a region that are supported for Data Transfer Essentials. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListMulticloudDataTransferSupportedServicesRequest request =
+   *       ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListMulticloudDataTransferSupportedServicesResponse response =
+   *         dataTransferServiceClient
+   *             .listMulticloudDataTransferSupportedServicesCallable()
+   *             .call(request);
+   *     for (MulticloudDataTransferSupportedService element :
+   *         response.getMulticloudDataTransferSupportedServicesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesCallable() { + return stub.listMulticloudDataTransferSupportedServicesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataTransferServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTransferServiceClient.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 ListMulticloudDataTransferConfigsPagedResponse + extends AbstractPagedListResponse< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig, + ListMulticloudDataTransferConfigsPage, + ListMulticloudDataTransferConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMulticloudDataTransferConfigsPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMulticloudDataTransferConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMulticloudDataTransferConfigsPagedResponse( + ListMulticloudDataTransferConfigsPage page) { + super(page, ListMulticloudDataTransferConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMulticloudDataTransferConfigsPage + extends AbstractPage< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig, + ListMulticloudDataTransferConfigsPage> { + + private ListMulticloudDataTransferConfigsPage( + PageContext< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + context, + ListMulticloudDataTransferConfigsResponse response) { + super(context, response); + } + + private static ListMulticloudDataTransferConfigsPage createEmptyPage() { + return new ListMulticloudDataTransferConfigsPage(null, null); + } + + @Override + protected ListMulticloudDataTransferConfigsPage createPage( + PageContext< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + context, + ListMulticloudDataTransferConfigsResponse response) { + return new ListMulticloudDataTransferConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMulticloudDataTransferConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig, + ListMulticloudDataTransferConfigsPage, + ListMulticloudDataTransferConfigsFixedSizeCollection> { + + private ListMulticloudDataTransferConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMulticloudDataTransferConfigsFixedSizeCollection createEmptyCollection() { + return new ListMulticloudDataTransferConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListMulticloudDataTransferConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMulticloudDataTransferConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDestinationsPagedResponse + extends AbstractPagedListResponse< + ListDestinationsRequest, + ListDestinationsResponse, + Destination, + ListDestinationsPage, + ListDestinationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDestinationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDestinationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDestinationsPagedResponse(ListDestinationsPage page) { + super(page, ListDestinationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDestinationsPage + extends AbstractPage< + ListDestinationsRequest, ListDestinationsResponse, Destination, ListDestinationsPage> { + + private ListDestinationsPage( + PageContext context, + ListDestinationsResponse response) { + super(context, response); + } + + private static ListDestinationsPage createEmptyPage() { + return new ListDestinationsPage(null, null); + } + + @Override + protected ListDestinationsPage createPage( + PageContext context, + ListDestinationsResponse response) { + return new ListDestinationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDestinationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDestinationsRequest, + ListDestinationsResponse, + Destination, + ListDestinationsPage, + ListDestinationsFixedSizeCollection> { + + private ListDestinationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDestinationsFixedSizeCollection createEmptyCollection() { + return new ListDestinationsFixedSizeCollection(null, 0); + } + + @Override + protected ListDestinationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDestinationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListMulticloudDataTransferSupportedServicesPagedResponse + extends AbstractPagedListResponse< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService, + ListMulticloudDataTransferSupportedServicesPage, + ListMulticloudDataTransferSupportedServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListMulticloudDataTransferSupportedServicesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListMulticloudDataTransferSupportedServicesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListMulticloudDataTransferSupportedServicesPagedResponse( + ListMulticloudDataTransferSupportedServicesPage page) { + super( + page, + ListMulticloudDataTransferSupportedServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListMulticloudDataTransferSupportedServicesPage + extends AbstractPage< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService, + ListMulticloudDataTransferSupportedServicesPage> { + + private ListMulticloudDataTransferSupportedServicesPage( + PageContext< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + context, + ListMulticloudDataTransferSupportedServicesResponse response) { + super(context, response); + } + + private static ListMulticloudDataTransferSupportedServicesPage createEmptyPage() { + return new ListMulticloudDataTransferSupportedServicesPage(null, null); + } + + @Override + protected ListMulticloudDataTransferSupportedServicesPage createPage( + PageContext< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + context, + ListMulticloudDataTransferSupportedServicesResponse response) { + return new ListMulticloudDataTransferSupportedServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListMulticloudDataTransferSupportedServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService, + ListMulticloudDataTransferSupportedServicesPage, + ListMulticloudDataTransferSupportedServicesFixedSizeCollection> { + + private ListMulticloudDataTransferSupportedServicesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListMulticloudDataTransferSupportedServicesFixedSizeCollection + createEmptyCollection() { + return new ListMulticloudDataTransferSupportedServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListMulticloudDataTransferSupportedServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListMulticloudDataTransferSupportedServicesFixedSizeCollection( + 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceSettings.java new file mode 100644 index 000000000000..856b83b84681 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceSettings.java @@ -0,0 +1,569 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListDestinationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse; + +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.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.DataTransferServiceStubSettings; +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 DataTransferServiceClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceSettings.newBuilder();
+ * dataTransferServiceSettingsBuilder
+ *     .getMulticloudDataTransferConfigSettings()
+ *     .setRetrySettings(
+ *         dataTransferServiceSettingsBuilder
+ *             .getMulticloudDataTransferConfigSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ *     dataTransferServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataTransferServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataTransferServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listMulticloudDataTransferConfigs. */ + public PagedCallSettings< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .listMulticloudDataTransferConfigsSettings(); + } + + /** Returns the object with the settings used for calls to getMulticloudDataTransferConfig. */ + public UnaryCallSettings + getMulticloudDataTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .getMulticloudDataTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to createMulticloudDataTransferConfig. */ + public UnaryCallSettings + createMulticloudDataTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .createMulticloudDataTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to createMulticloudDataTransferConfig. */ + public OperationCallSettings< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .createMulticloudDataTransferConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateMulticloudDataTransferConfig. */ + public UnaryCallSettings + updateMulticloudDataTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .updateMulticloudDataTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateMulticloudDataTransferConfig. */ + public OperationCallSettings< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .updateMulticloudDataTransferConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteMulticloudDataTransferConfig. */ + public UnaryCallSettings + deleteMulticloudDataTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .deleteMulticloudDataTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteMulticloudDataTransferConfig. */ + public OperationCallSettings + deleteMulticloudDataTransferConfigOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .deleteMulticloudDataTransferConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDestinations. */ + public PagedCallSettings< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listDestinationsSettings(); + } + + /** Returns the object with the settings used for calls to getDestination. */ + public UnaryCallSettings getDestinationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getDestinationSettings(); + } + + /** Returns the object with the settings used for calls to createDestination. */ + public UnaryCallSettings createDestinationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).createDestinationSettings(); + } + + /** Returns the object with the settings used for calls to createDestination. */ + public OperationCallSettings + createDestinationOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .createDestinationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDestination. */ + public UnaryCallSettings updateDestinationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).updateDestinationSettings(); + } + + /** Returns the object with the settings used for calls to updateDestination. */ + public OperationCallSettings + updateDestinationOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .updateDestinationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDestination. */ + public UnaryCallSettings deleteDestinationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).deleteDestinationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDestination. */ + public OperationCallSettings + deleteDestinationOperationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .deleteDestinationOperationSettings(); + } + + /** + * Returns the object with the settings used for calls to + * getMulticloudDataTransferSupportedService. + */ + public UnaryCallSettings< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .getMulticloudDataTransferSupportedServiceSettings(); + } + + /** + * Returns the object with the settings used for calls to + * listMulticloudDataTransferSupportedServices. + */ + public PagedCallSettings< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()) + .listMulticloudDataTransferSupportedServicesSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub) + throws IOException { + return new DataTransferServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataTransferServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataTransferServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataTransferServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataTransferServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataTransferServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataTransferServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataTransferServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataTransferServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataTransferServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataTransferServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataTransferServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataTransferServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataTransferServiceStubSettings.newBuilder()); + } + + public DataTransferServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataTransferServiceStubSettings.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 listMulticloudDataTransferConfigs. */ + public PagedCallSettings.Builder< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings() { + return getStubSettingsBuilder().listMulticloudDataTransferConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to getMulticloudDataTransferConfig. */ + public UnaryCallSettings.Builder< + GetMulticloudDataTransferConfigRequest, MulticloudDataTransferConfig> + getMulticloudDataTransferConfigSettings() { + return getStubSettingsBuilder().getMulticloudDataTransferConfigSettings(); + } + + /** + * Returns the builder for the settings used for calls to createMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + createMulticloudDataTransferConfigSettings() { + return getStubSettingsBuilder().createMulticloudDataTransferConfigSettings(); + } + + /** + * Returns the builder for the settings used for calls to createMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings() { + return getStubSettingsBuilder().createMulticloudDataTransferConfigOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to updateMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + updateMulticloudDataTransferConfigSettings() { + return getStubSettingsBuilder().updateMulticloudDataTransferConfigSettings(); + } + + /** + * Returns the builder for the settings used for calls to updateMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings() { + return getStubSettingsBuilder().updateMulticloudDataTransferConfigOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to deleteMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + deleteMulticloudDataTransferConfigSettings() { + return getStubSettingsBuilder().deleteMulticloudDataTransferConfigSettings(); + } + + /** + * Returns the builder for the settings used for calls to deleteMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata> + deleteMulticloudDataTransferConfigOperationSettings() { + return getStubSettingsBuilder().deleteMulticloudDataTransferConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDestinations. */ + public PagedCallSettings.Builder< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings() { + return getStubSettingsBuilder().listDestinationsSettings(); + } + + /** Returns the builder for the settings used for calls to getDestination. */ + public UnaryCallSettings.Builder getDestinationSettings() { + return getStubSettingsBuilder().getDestinationSettings(); + } + + /** Returns the builder for the settings used for calls to createDestination. */ + public UnaryCallSettings.Builder + createDestinationSettings() { + return getStubSettingsBuilder().createDestinationSettings(); + } + + /** Returns the builder for the settings used for calls to createDestination. */ + public OperationCallSettings.Builder + createDestinationOperationSettings() { + return getStubSettingsBuilder().createDestinationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDestination. */ + public UnaryCallSettings.Builder + updateDestinationSettings() { + return getStubSettingsBuilder().updateDestinationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDestination. */ + public OperationCallSettings.Builder + updateDestinationOperationSettings() { + return getStubSettingsBuilder().updateDestinationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDestination. */ + public UnaryCallSettings.Builder + deleteDestinationSettings() { + return getStubSettingsBuilder().deleteDestinationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDestination. */ + public OperationCallSettings.Builder + deleteDestinationOperationSettings() { + return getStubSettingsBuilder().deleteDestinationOperationSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * getMulticloudDataTransferSupportedService. + */ + public UnaryCallSettings.Builder< + GetMulticloudDataTransferSupportedServiceRequest, + MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings() { + return getStubSettingsBuilder().getMulticloudDataTransferSupportedServiceSettings(); + } + + /** + * Returns the builder for the settings used for calls to + * listMulticloudDataTransferSupportedServices. + */ + public PagedCallSettings.Builder< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings() { + return getStubSettingsBuilder().listMulticloudDataTransferSupportedServicesSettings(); + } + + /** 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 DataTransferServiceSettings build() throws IOException { + return new DataTransferServiceSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClient.java new file mode 100644 index 000000000000..a57c16817c36 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClient.java @@ -0,0 +1,6314 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.HubServiceStub; +import com.google.cloud.networkconnectivity.v1beta.stub.HubServiceStubSettings; +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.longrunning.OperationsClient; +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: Network Connectivity Center is a hub-and-spoke abstraction for network + * connectivity management in Google Cloud. It reduces operational complexity through a simple, + * centralized connectivity management model. + * + *

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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+ *   Hub response = hubServiceClient.getHub(name);
+ * }
+ * }
+ * + *

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

ListHubs

Lists the Network Connectivity Center hubs associated with a given project.

+ *

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

+ *
    + *
  • listHubs(ListHubsRequest request) + *

+ *

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

+ *
    + *
  • listHubs(LocationName parent) + *

  • listHubs(String parent) + *

+ *

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

+ *
    + *
  • listHubsPagedCallable() + *

  • listHubsCallable() + *

+ *

GetHub

Gets details about a Network Connectivity Center hub.

+ *

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

+ *
    + *
  • getHub(GetHubRequest request) + *

+ *

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

+ *
    + *
  • getHub(HubName name) + *

  • getHub(String name) + *

+ *

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

+ *
    + *
  • getHubCallable() + *

+ *

CreateHub

Creates a new Network Connectivity Center hub in the specified project.

+ *

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

+ *
    + *
  • createHubAsync(CreateHubRequest request) + *

+ *

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

+ *
    + *
  • createHubAsync(LocationName parent, Hub hub, String hubId) + *

  • createHubAsync(String parent, Hub hub, String hubId) + *

+ *

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

+ *
    + *
  • createHubOperationCallable() + *

  • createHubCallable() + *

+ *

UpdateHub

Updates the description and/or labels of a Network Connectivity Center hub.

+ *

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

+ *
    + *
  • updateHubAsync(UpdateHubRequest request) + *

+ *

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

+ *
    + *
  • updateHubAsync(Hub hub, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateHubOperationCallable() + *

  • updateHubCallable() + *

+ *

DeleteHub

Deletes a Network Connectivity Center hub.

+ *

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

+ *
    + *
  • deleteHubAsync(DeleteHubRequest request) + *

+ *

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

+ *
    + *
  • deleteHubAsync(HubName name) + *

  • deleteHubAsync(String name) + *

+ *

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

+ *
    + *
  • deleteHubOperationCallable() + *

  • deleteHubCallable() + *

+ *

ListHubSpokes

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

+ *

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

+ *
    + *
  • listHubSpokes(ListHubSpokesRequest request) + *

+ *

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

+ *
    + *
  • listHubSpokes(HubName name) + *

  • listHubSpokes(String name) + *

+ *

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

+ *
    + *
  • listHubSpokesPagedCallable() + *

  • listHubSpokesCallable() + *

+ *

QueryHubStatus

Query the Private Service Connect propagation status of a Network Connectivity Center hub.

+ *

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

+ *
    + *
  • queryHubStatus(QueryHubStatusRequest request) + *

+ *

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

+ *
    + *
  • queryHubStatus(HubName name) + *

  • queryHubStatus(String name) + *

+ *

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

+ *
    + *
  • queryHubStatusPagedCallable() + *

  • queryHubStatusCallable() + *

+ *

ListSpokes

Lists the Network Connectivity Center spokes in a specified project and location.

+ *

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

+ *
    + *
  • listSpokes(ListSpokesRequest request) + *

+ *

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

+ *
    + *
  • listSpokes(LocationName parent) + *

  • listSpokes(String parent) + *

+ *

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

+ *
    + *
  • listSpokesPagedCallable() + *

  • listSpokesCallable() + *

+ *

GetSpoke

Gets details about a Network Connectivity Center spoke.

+ *

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

+ *
    + *
  • getSpoke(GetSpokeRequest request) + *

+ *

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

+ *
    + *
  • getSpoke(SpokeName name) + *

  • getSpoke(String name) + *

+ *

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

+ *
    + *
  • getSpokeCallable() + *

+ *

CreateSpoke

Creates a Network Connectivity Center spoke.

+ *

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

+ *
    + *
  • createSpokeAsync(CreateSpokeRequest request) + *

+ *

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

+ *
    + *
  • createSpokeAsync(LocationName parent, Spoke spoke, String spokeId) + *

  • createSpokeAsync(String parent, Spoke spoke, String spokeId) + *

+ *

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

+ *
    + *
  • createSpokeOperationCallable() + *

  • createSpokeCallable() + *

+ *

UpdateSpoke

Updates the parameters of a Network Connectivity Center spoke.

+ *

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

+ *
    + *
  • updateSpokeAsync(UpdateSpokeRequest request) + *

+ *

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

+ *
    + *
  • updateSpokeAsync(Spoke spoke, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateSpokeOperationCallable() + *

  • updateSpokeCallable() + *

+ *

RejectHubSpoke

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub.

+ *

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

+ *
    + *
  • rejectHubSpokeAsync(RejectHubSpokeRequest request) + *

+ *

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

+ *
    + *
  • rejectHubSpokeAsync(HubName name, SpokeName spokeUri) + *

  • rejectHubSpokeAsync(HubName name, String spokeUri) + *

  • rejectHubSpokeAsync(String name, SpokeName spokeUri) + *

  • rejectHubSpokeAsync(String name, String spokeUri) + *

+ *

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

+ *
    + *
  • rejectHubSpokeOperationCallable() + *

  • rejectHubSpokeCallable() + *

+ *

AcceptHubSpoke

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

+ *

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

+ *
    + *
  • acceptHubSpokeAsync(AcceptHubSpokeRequest request) + *

+ *

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

+ *
    + *
  • acceptHubSpokeAsync(HubName name, SpokeName spokeUri) + *

  • acceptHubSpokeAsync(HubName name, String spokeUri) + *

  • acceptHubSpokeAsync(String name, SpokeName spokeUri) + *

  • acceptHubSpokeAsync(String name, String spokeUri) + *

+ *

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

+ *
    + *
  • acceptHubSpokeOperationCallable() + *

  • acceptHubSpokeCallable() + *

+ *

AcceptSpokeUpdate

Accepts a proposal to update a Network Connectivity Center spoke in a hub.

+ *

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

+ *
    + *
  • acceptSpokeUpdateAsync(AcceptSpokeUpdateRequest request) + *

+ *

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

+ *
    + *
  • acceptSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) + *

  • acceptSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) + *

  • acceptSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) + *

  • acceptSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) + *

+ *

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

+ *
    + *
  • acceptSpokeUpdateOperationCallable() + *

  • acceptSpokeUpdateCallable() + *

+ *

RejectSpokeUpdate

Rejects a proposal to update a Network Connectivity Center spoke in a hub.

+ *

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

+ *
    + *
  • rejectSpokeUpdateAsync(RejectSpokeUpdateRequest request) + *

+ *

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

+ *
    + *
  • rejectSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) + *

  • rejectSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) + *

  • rejectSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) + *

  • rejectSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) + *

+ *

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

+ *
    + *
  • rejectSpokeUpdateOperationCallable() + *

  • rejectSpokeUpdateCallable() + *

+ *

DeleteSpoke

Deletes a Network Connectivity Center spoke.

+ *

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

+ *
    + *
  • deleteSpokeAsync(DeleteSpokeRequest request) + *

+ *

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

+ *
    + *
  • deleteSpokeAsync(SpokeName name) + *

  • deleteSpokeAsync(String name) + *

+ *

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

+ *
    + *
  • deleteSpokeOperationCallable() + *

  • deleteSpokeCallable() + *

+ *

GetRouteTable

Gets details about a Network Connectivity Center route table.

+ *

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

+ *
    + *
  • getRouteTable(GetRouteTableRequest request) + *

+ *

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

+ *
    + *
  • getRouteTable(RouteTableName name) + *

  • getRouteTable(String name) + *

+ *

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

+ *
    + *
  • getRouteTableCallable() + *

+ *

GetRoute

Gets details about the specified route.

+ *

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

+ *
    + *
  • getRoute(GetRouteRequest request) + *

+ *

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

+ *
    + *
  • getRoute(HubRouteName name) + *

  • getRoute(String name) + *

+ *

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

+ *
    + *
  • getRouteCallable() + *

+ *

ListRoutes

Lists routes in a given route table.

+ *

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

+ *
    + *
  • listRoutes(ListRoutesRequest request) + *

+ *

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

+ *
    + *
  • listRoutes(RouteTableName parent) + *

  • listRoutes(String parent) + *

+ *

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

+ *
    + *
  • listRoutesPagedCallable() + *

  • listRoutesCallable() + *

+ *

ListRouteTables

Lists route tables in a given hub.

+ *

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

+ *
    + *
  • listRouteTables(ListRouteTablesRequest request) + *

+ *

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

+ *
    + *
  • listRouteTables(HubName parent) + *

  • listRouteTables(String parent) + *

+ *

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

+ *
    + *
  • listRouteTablesPagedCallable() + *

  • listRouteTablesCallable() + *

+ *

GetGroup

Gets details about a Network Connectivity Center group.

+ *

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

+ *
    + *
  • getGroup(GetGroupRequest request) + *

+ *

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

+ *
    + *
  • getGroup(GroupName name) + *

  • getGroup(String name) + *

+ *

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

+ *
    + *
  • getGroupCallable() + *

+ *

ListGroups

Lists groups in a given hub.

+ *

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

+ *
    + *
  • listGroups(ListGroupsRequest request) + *

+ *

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

+ *
    + *
  • listGroups(HubName parent) + *

  • listGroups(String parent) + *

+ *

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

+ *
    + *
  • listGroupsPagedCallable() + *

  • listGroupsCallable() + *

+ *

UpdateGroup

Updates the parameters of a Network Connectivity Center group.

+ *

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

+ *
    + *
  • updateGroupAsync(UpdateGroupRequest request) + *

+ *

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

+ *
    + *
  • updateGroupAsync(Group group, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateGroupOperationCallable() + *

  • updateGroupCallable() + *

+ *

CreateGatewayAdvertisedRoute

Create a GatewayAdvertisedRoute

+ *

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

+ *
    + *
  • createGatewayAdvertisedRouteAsync(CreateGatewayAdvertisedRouteRequest request) + *

+ *

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

+ *
    + *
  • createGatewayAdvertisedRouteAsync(SpokeName parent, GatewayAdvertisedRoute gatewayAdvertisedRoute, String gatewayAdvertisedRouteId) + *

  • createGatewayAdvertisedRouteAsync(String parent, GatewayAdvertisedRoute gatewayAdvertisedRoute, String gatewayAdvertisedRouteId) + *

+ *

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

+ *
    + *
  • createGatewayAdvertisedRouteOperationCallable() + *

  • createGatewayAdvertisedRouteCallable() + *

+ *

GetGatewayAdvertisedRoute

Get a GatewayAdvertisedRoute

+ *

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

+ *
    + *
  • getGatewayAdvertisedRoute(GetGatewayAdvertisedRouteRequest request) + *

+ *

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

+ *
    + *
  • getGatewayAdvertisedRoute(GatewayAdvertisedRouteName name) + *

  • getGatewayAdvertisedRoute(String name) + *

+ *

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

+ *
    + *
  • getGatewayAdvertisedRouteCallable() + *

+ *

ListGatewayAdvertisedRoutes

List GatewayAdvertisedRoutes

+ *

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

+ *
    + *
  • listGatewayAdvertisedRoutes(ListGatewayAdvertisedRoutesRequest request) + *

+ *

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

+ *
    + *
  • listGatewayAdvertisedRoutes(SpokeName parent) + *

  • listGatewayAdvertisedRoutes(String parent) + *

+ *

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

+ *
    + *
  • listGatewayAdvertisedRoutesPagedCallable() + *

  • listGatewayAdvertisedRoutesCallable() + *

+ *

UpdateGatewayAdvertisedRoute

Update a GatewayAdvertisedRoute

+ *

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

+ *
    + *
  • updateGatewayAdvertisedRouteAsync(UpdateGatewayAdvertisedRouteRequest request) + *

+ *

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

+ *
    + *
  • updateGatewayAdvertisedRouteAsync(GatewayAdvertisedRoute gatewayAdvertisedRoute, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateGatewayAdvertisedRouteOperationCallable() + *

  • updateGatewayAdvertisedRouteCallable() + *

+ *

DeleteGatewayAdvertisedRoute

Delete a GatewayAdvertisedRoute

+ *

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

+ *
    + *
  • deleteGatewayAdvertisedRouteAsync(DeleteGatewayAdvertisedRouteRequest request) + *

+ *

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

+ *
    + *
  • deleteGatewayAdvertisedRouteAsync(GatewayAdvertisedRouteName name) + *

  • deleteGatewayAdvertisedRouteAsync(String name) + *

+ *

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

+ *
    + *
  • deleteGatewayAdvertisedRouteOperationCallable() + *

  • deleteGatewayAdvertisedRouteCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways: + *

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

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

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

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 HubServiceSettings 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
+ * HubServiceSettings hubServiceSettings =
+ *     HubServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
+ * }
+ * + *

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
+ * HubServiceSettings hubServiceSettings =
+ *     HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HubServiceClient implements BackgroundResource { + private final HubServiceSettings settings; + private final HubServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of HubServiceClient with default settings. */ + public static final HubServiceClient create() throws IOException { + return create(HubServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of HubServiceClient, 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 HubServiceClient create(HubServiceSettings settings) throws IOException { + return new HubServiceClient(settings); + } + + /** + * Constructs an instance of HubServiceClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(HubServiceSettings). + */ + public static final HubServiceClient create(HubServiceStub stub) { + return new HubServiceClient(stub); + } + + /** + * Constructs an instance of HubServiceClient, 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 HubServiceClient(HubServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((HubServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected HubServiceClient(HubServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final HubServiceSettings getSettings() { + return settings; + } + + public HubServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center hubs associated with a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubsPagedResponse listHubs(LocationName parent) { + ListHubsRequest request = + ListHubsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listHubs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center hubs associated with a given project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubsPagedResponse listHubs(String parent) { + ListHubsRequest request = ListHubsRequest.newBuilder().setParent(parent).build(); + return listHubs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center hubs associated with a given project. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetHubRequest request =
+   *       GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build();
+   *   Hub response = hubServiceClient.getHub(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 Hub getHub(GetHubRequest request) { + return getHubCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center hub. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Hub hub = Hub.newBuilder().build();
+   *   String hubId = "hubId99628272";
+   *   Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param hub Required. The initial values for a new hub. + * @param hubId Required. A unique identifier for the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHubAsync( + LocationName parent, Hub hub, String hubId) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setHub(hub) + .setHubId(hubId) + .build(); + return createHubAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network Connectivity Center hub in the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Hub hub = Hub.newBuilder().build();
+   *   String hubId = "hubId99628272";
+   *   Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param hub Required. The initial values for a new hub. + * @param hubId Required. A unique identifier for the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createHubAsync( + String parent, Hub hub, String hubId) { + CreateHubRequest request = + CreateHubRequest.newBuilder().setParent(parent).setHub(hub).setHubId(hubId).build(); + return createHubAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network Connectivity Center hub in the specified project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateHubRequest request =
+   *       CreateHubRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHubId("hubId99628272")
+   *           .setHub(Hub.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Hub response = hubServiceClient.createHubAsync(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 createHubAsync(CreateHubRequest request) { + return createHubOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Network Connectivity Center hub in the specified project. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateHubRequest request =
+   *       CreateHubRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setHubId("hubId99628272")
+   *           .setHub(Hub.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.createHubCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createHubCallable() { + return stub.createHubCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the description and/or labels of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   Hub hub = Hub.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get();
+   * }
+   * }
+ * + * @param hub Required. The state that the hub should be in after the update. + * @param updateMask Optional. In the case of an update to an existing hub, field mask is used to + * specify the fields to be overwritten. The fields specified in the update_mask are relative + * to the resource, not the full request. A field is overwritten if it is in the mask. If the + * user does not provide a mask, then all fields are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateHubAsync( + Hub hub, FieldMask updateMask) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder().setHub(hub).setUpdateMask(updateMask).build(); + return updateHubAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the description and/or labels of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   UpdateHubRequest request =
+   *       UpdateHubRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setHub(Hub.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Hub response = hubServiceClient.updateHubAsync(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 updateHubAsync(UpdateHubRequest request) { + return updateHubOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the description and/or labels of a Network Connectivity Center hub. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   DeleteHubRequest request =
+   *       DeleteHubRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.deleteHubCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteHubCallable() { + return stub.deleteHubCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(HubName name) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(String name) { + ListHubSpokesRequest request = ListHubSpokesRequest.newBuilder().setName(name).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Spoke element : hubServiceClient.listHubSpokes(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 ListHubSpokesPagedResponse listHubSpokes(ListHubSpokesRequest request) { + return listHubSpokesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Spoke element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listHubSpokesPagedCallable() { + return stub.listHubSpokesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListHubSpokesRequest request =
+   *       ListHubSpokesRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .addAllSpokeLocations(new ArrayList())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request);
+   *     for (Spoke element : response.getSpokesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listHubSpokesCallable() { + return stub.listHubSpokesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query the Private Service Connect propagation status of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   for (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryHubStatusPagedResponse queryHubStatus(HubName name) { + QueryHubStatusRequest request = + QueryHubStatusRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return queryHubStatus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query the Private Service Connect propagation status of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final QueryHubStatusPagedResponse queryHubStatus(String name) { + QueryHubStatusRequest request = QueryHubStatusRequest.newBuilder().setName(name).build(); + return queryHubStatus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query the Private Service Connect propagation status of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   QueryHubStatusRequest request =
+   *       QueryHubStatusRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setGroupBy("groupBy293428022")
+   *           .build();
+   *   for (HubStatusEntry element : hubServiceClient.queryHubStatus(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 QueryHubStatusPagedResponse queryHubStatus(QueryHubStatusRequest request) { + return queryHubStatusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query the Private Service Connect propagation status of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   QueryHubStatusRequest request =
+   *       QueryHubStatusRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setGroupBy("groupBy293428022")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.queryHubStatusPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (HubStatusEntry element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + queryHubStatusPagedCallable() { + return stub.queryHubStatusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Query the Private Service Connect propagation status of a Network Connectivity Center hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   QueryHubStatusRequest request =
+   *       QueryHubStatusRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .setGroupBy("groupBy293428022")
+   *           .build();
+   *   while (true) {
+   *     QueryHubStatusResponse response = hubServiceClient.queryHubStatusCallable().call(request);
+   *     for (HubStatusEntry element : response.getHubStatusEntriesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + queryHubStatusCallable() { + return stub.queryHubStatusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes in a specified 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSpokesPagedResponse listSpokes(LocationName parent) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes in a specified 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSpokesPagedResponse listSpokes(String parent) { + ListSpokesRequest request = ListSpokesRequest.newBuilder().setParent(parent).build(); + return listSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes in a specified 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListSpokesRequest request =
+   *       ListSpokesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Spoke element : hubServiceClient.listSpokes(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 ListSpokesPagedResponse listSpokes(ListSpokesRequest request) { + return listSpokesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes in a specified 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListSpokesRequest request =
+   *       ListSpokesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.listSpokesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Spoke element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSpokesPagedCallable() { + return stub.listSpokesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes in a specified 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListSpokesRequest request =
+   *       ListSpokesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request);
+   *     for (Spoke element : response.getSpokesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSpokesCallable() { + return stub.listSpokesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center spoke. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Spoke spoke = Spoke.newBuilder().build();
+   *   String spokeId = "spokeId-1998996281";
+   *   Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param spoke Required. The initial values for a new spoke. + * @param spokeId Required. Unique id for the spoke to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSpokeAsync( + LocationName parent, Spoke spoke, String spokeId) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSpoke(spoke) + .setSpokeId(spokeId) + .build(); + return createSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Spoke spoke = Spoke.newBuilder().build();
+   *   String spokeId = "spokeId-1998996281";
+   *   Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param spoke Required. The initial values for a new spoke. + * @param spokeId Required. Unique id for the spoke to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createSpokeAsync( + String parent, Spoke spoke, String spokeId) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(parent) + .setSpoke(spoke) + .setSpokeId(spokeId) + .build(); + return createSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateSpokeRequest request =
+   *       CreateSpokeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSpokeId("spokeId-1998996281")
+   *           .setSpoke(Spoke.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Spoke response = hubServiceClient.createSpokeAsync(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 createSpokeAsync( + CreateSpokeRequest request) { + return createSpokeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Network Connectivity Center spoke. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateSpokeRequest request =
+   *       CreateSpokeRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSpokeId("spokeId-1998996281")
+   *           .setSpoke(Spoke.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.createSpokeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Spoke response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createSpokeOperationCallable() { + return stub.createSpokeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Network Connectivity Center spoke. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   UpdateSpokeRequest request =
+   *       UpdateSpokeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setSpoke(Spoke.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.updateSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateSpokeCallable() { + return stub.updateSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + HubName name, SpokeName spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + HubName name, String spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + String name, SpokeName spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub from which to reject the spoke. + * @param spokeUri Required. The URI of the spoke to reject from the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectHubSpokeAsync( + String name, String spokeUri) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder().setName(name).setSpokeUri(spokeUri).build(); + return rejectHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectHubSpokeRequest request =
+   *       RejectHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setDetails("details1557721666")
+   *           .build();
+   *   RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(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 rejectHubSpokeAsync( + RejectHubSpokeRequest request) { + return rejectHubSpokeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectHubSpokeRequest request =
+   *       RejectHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setDetails("details1557721666")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.rejectHubSpokeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RejectHubSpokeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + rejectHubSpokeOperationCallable() { + return stub.rejectHubSpokeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was + * previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able + * to connect to other spokes that are attached to the hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectHubSpokeRequest request =
+   *       RejectHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setDetails("details1557721666")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.rejectHubSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable rejectHubSpokeCallable() { + return stub.rejectHubSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + HubName name, SpokeName spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + HubName name, String spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + String name, SpokeName spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub into which to accept the spoke. + * @param spokeUri Required. The URI of the spoke to accept into the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptHubSpokeAsync( + String name, String spokeUri) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder().setName(name).setSpokeUri(spokeUri).build(); + return acceptHubSpokeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(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 acceptHubSpokeAsync( + AcceptHubSpokeRequest request) { + return acceptHubSpokeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.acceptHubSpokeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AcceptHubSpokeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + acceptHubSpokeOperationCallable() { + return stub.acceptHubSpokeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to attach a Network Connectivity Center spoke to a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptHubSpokeRequest request =
+   *       AcceptHubSpokeRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.acceptHubSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable acceptHubSpokeCallable() { + return stub.acceptHubSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   AcceptSpokeUpdateResponse response =
+   *       hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to accept spoke update. + * @param spokeUri Required. The URI of the spoke to accept update. + * @param spokeEtag Required. The etag of the spoke to accept update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptSpokeUpdateAsync( + HubName name, SpokeName spokeUri, String spokeEtag) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .setSpokeEtag(spokeEtag) + .build(); + return acceptSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   AcceptSpokeUpdateResponse response =
+   *       hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to accept spoke update. + * @param spokeUri Required. The URI of the spoke to accept update. + * @param spokeEtag Required. The etag of the spoke to accept update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptSpokeUpdateAsync( + HubName name, String spokeUri, String spokeEtag) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .setSpokeEtag(spokeEtag) + .build(); + return acceptSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   AcceptSpokeUpdateResponse response =
+   *       hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to accept spoke update. + * @param spokeUri Required. The URI of the spoke to accept update. + * @param spokeEtag Required. The etag of the spoke to accept update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptSpokeUpdateAsync( + String name, SpokeName spokeUri, String spokeEtag) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .setSpokeEtag(spokeEtag) + .build(); + return acceptSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   AcceptSpokeUpdateResponse response =
+   *       hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to accept spoke update. + * @param spokeUri Required. The URI of the spoke to accept update. + * @param spokeEtag Required. The etag of the spoke to accept update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture acceptSpokeUpdateAsync( + String name, String spokeUri, String spokeEtag) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri) + .setSpokeEtag(spokeEtag) + .build(); + return acceptSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptSpokeUpdateRequest request =
+   *       AcceptSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(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 acceptSpokeUpdateAsync( + AcceptSpokeUpdateRequest request) { + return acceptSpokeUpdateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptSpokeUpdateRequest request =
+   *       AcceptSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.acceptSpokeUpdateOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AcceptSpokeUpdateResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationCallable() { + return stub.acceptSpokeUpdateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Accepts a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   AcceptSpokeUpdateRequest request =
+   *       AcceptSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.acceptSpokeUpdateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable acceptSpokeUpdateCallable() { + return stub.acceptSpokeUpdateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   RejectSpokeUpdateResponse response =
+   *       hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to reject spoke update. + * @param spokeUri Required. The URI of the spoke to reject update. + * @param spokeEtag Required. The etag of the spoke to reject update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectSpokeUpdateAsync( + HubName name, SpokeName spokeUri, String spokeEtag) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .setSpokeEtag(spokeEtag) + .build(); + return rejectSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName name = HubName.of("[PROJECT]", "[HUB]");
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   RejectSpokeUpdateResponse response =
+   *       hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to reject spoke update. + * @param spokeUri Required. The URI of the spoke to reject update. + * @param spokeEtag Required. The etag of the spoke to reject update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectSpokeUpdateAsync( + HubName name, String spokeUri, String spokeEtag) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setSpokeUri(spokeUri) + .setSpokeEtag(spokeEtag) + .build(); + return rejectSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   RejectSpokeUpdateResponse response =
+   *       hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to reject spoke update. + * @param spokeUri Required. The URI of the spoke to reject update. + * @param spokeEtag Required. The etag of the spoke to reject update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectSpokeUpdateAsync( + String name, SpokeName spokeUri, String spokeEtag) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri == null ? null : spokeUri.toString()) + .setSpokeEtag(spokeEtag) + .build(); + return rejectSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   String spokeEtag = "spokeEtag-1185145407";
+   *   RejectSpokeUpdateResponse response =
+   *       hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+   * }
+   * }
+ * + * @param name Required. The name of the hub to reject spoke update. + * @param spokeUri Required. The URI of the spoke to reject update. + * @param spokeEtag Required. The etag of the spoke to reject update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture rejectSpokeUpdateAsync( + String name, String spokeUri, String spokeEtag) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(name) + .setSpokeUri(spokeUri) + .setSpokeEtag(spokeEtag) + .build(); + return rejectSpokeUpdateAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectSpokeUpdateRequest request =
+   *       RejectSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setDetails("details1557721666")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(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 rejectSpokeUpdateAsync( + RejectSpokeUpdateRequest request) { + return rejectSpokeUpdateOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectSpokeUpdateRequest request =
+   *       RejectSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setDetails("details1557721666")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.rejectSpokeUpdateOperationCallable().futureCall(request);
+   *   // Do something.
+   *   RejectSpokeUpdateResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationCallable() { + return stub.rejectSpokeUpdateOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Rejects a proposal to update a Network Connectivity Center spoke in a hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RejectSpokeUpdateRequest request =
+   *       RejectSpokeUpdateRequest.newBuilder()
+   *           .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+   *           .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setSpokeEtag("spokeEtag-1185145407")
+   *           .setDetails("details1557721666")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.rejectSpokeUpdateCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable rejectSpokeUpdateCallable() { + return stub.rejectSpokeUpdateCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Network Connectivity Center spoke. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   DeleteSpokeRequest request =
+   *       DeleteSpokeRequest.newBuilder()
+   *           .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSpokeCallable() { + return stub.deleteSpokeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+   *   RouteTable response = hubServiceClient.getRouteTable(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RouteTable getRouteTable(RouteTableName name) { + GetRouteTableRequest request = + GetRouteTableRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRouteTable(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+   *   RouteTable response = hubServiceClient.getRouteTable(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RouteTable getRouteTable(String name) { + GetRouteTableRequest request = GetRouteTableRequest.newBuilder().setName(name).build(); + return getRouteTable(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteTableRequest request =
+   *       GetRouteTableRequest.newBuilder()
+   *           .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .build();
+   *   RouteTable response = hubServiceClient.getRouteTable(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 RouteTable getRouteTable(GetRouteTableRequest request) { + return getRouteTableCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteTableRequest request =
+   *       GetRouteTableRequest.newBuilder()
+   *           .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getRouteTableCallable().futureCall(request);
+   *   // Do something.
+   *   RouteTable response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRouteTableCallable() { + return stub.getRouteTableCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteRequest request =
+   *       GetRouteRequest.newBuilder()
+   *           .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+   *           .build();
+   *   Route response = hubServiceClient.getRoute(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 Route getRoute(GetRouteRequest request) { + return getRouteCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about the specified route. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetRouteRequest request =
+   *       GetRouteRequest.newBuilder()
+   *           .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.getRouteCallable().futureCall(request);
+   *   // Do something.
+   *   Route response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getRouteCallable() { + return stub.getRouteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+   *   for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutesPagedResponse listRoutes(RouteTableName parent) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+   *   for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutesPagedResponse listRoutes(String parent) { + ListRoutesRequest request = ListRoutesRequest.newBuilder().setParent(parent).build(); + return listRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given route table. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListRoutesRequest request =
+   *       ListRoutesRequest.newBuilder()
+   *           .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Route element : hubServiceClient.listRoutes(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 ListRoutesPagedResponse listRoutes(ListRoutesRequest request) { + return listRoutesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists routes in a given route table. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName parent = HubName.of("[PROJECT]", "[HUB]");
+   *   for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRouteTablesPagedResponse listRouteTables(HubName parent) { + ListRouteTablesRequest request = + ListRouteTablesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRouteTables(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRouteTablesPagedResponse listRouteTables(String parent) { + ListRouteTablesRequest request = ListRouteTablesRequest.newBuilder().setParent(parent).build(); + return listRouteTables(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists route tables in a given hub. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]");
+   *   Group response = hubServiceClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(GroupName name) { + GetGroupRequest request = + GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString();
+   *   Group response = hubServiceClient.getGroup(name);
+   * }
+   * }
+ * + * @param name Required. The name of the route table resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Group getGroup(String name) { + GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build(); + return getGroup(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetGroupRequest request =
+   *       GetGroupRequest.newBuilder()
+   *           .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .build();
+   *   Group response = hubServiceClient.getGroup(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 Group getGroup(GetGroupRequest request) { + return getGroupCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details about a Network Connectivity Center group. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   HubName parent = HubName.of("[PROJECT]", "[HUB]");
+   *   for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(HubName parent) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+   *   for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGroupsPagedResponse listGroups(String parent) { + ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build(); + return listGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists groups in a given hub. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build();
+   *   String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339";
+   *   GatewayAdvertisedRoute response =
+   *       hubServiceClient
+   *           .createGatewayAdvertisedRouteAsync(
+   *               parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param gatewayAdvertisedRoute Required. Initial values for the new gateway advertised route. + * @param gatewayAdvertisedRouteId Required. Unique id for the route to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createGatewayAdvertisedRouteAsync( + SpokeName parent, + GatewayAdvertisedRoute gatewayAdvertisedRoute, + String gatewayAdvertisedRouteId) { + CreateGatewayAdvertisedRouteRequest request = + CreateGatewayAdvertisedRouteRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setGatewayAdvertisedRoute(gatewayAdvertisedRoute) + .setGatewayAdvertisedRouteId(gatewayAdvertisedRouteId) + .build(); + return createGatewayAdvertisedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a GatewayAdvertisedRoute + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build();
+   *   String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339";
+   *   GatewayAdvertisedRoute response =
+   *       hubServiceClient
+   *           .createGatewayAdvertisedRouteAsync(
+   *               parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource. + * @param gatewayAdvertisedRoute Required. Initial values for the new gateway advertised route. + * @param gatewayAdvertisedRouteId Required. Unique id for the route to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createGatewayAdvertisedRouteAsync( + String parent, + GatewayAdvertisedRoute gatewayAdvertisedRoute, + String gatewayAdvertisedRouteId) { + CreateGatewayAdvertisedRouteRequest request = + CreateGatewayAdvertisedRouteRequest.newBuilder() + .setParent(parent) + .setGatewayAdvertisedRoute(gatewayAdvertisedRoute) + .setGatewayAdvertisedRouteId(gatewayAdvertisedRouteId) + .build(); + return createGatewayAdvertisedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a GatewayAdvertisedRoute + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateGatewayAdvertisedRouteRequest request =
+   *       CreateGatewayAdvertisedRouteRequest.newBuilder()
+   *           .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339")
+   *           .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   GatewayAdvertisedRoute response =
+   *       hubServiceClient.createGatewayAdvertisedRouteAsync(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 + createGatewayAdvertisedRouteAsync(CreateGatewayAdvertisedRouteRequest request) { + return createGatewayAdvertisedRouteOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a GatewayAdvertisedRoute + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   CreateGatewayAdvertisedRouteRequest request =
+   *       CreateGatewayAdvertisedRouteRequest.newBuilder()
+   *           .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+   *           .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339")
+   *           .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       hubServiceClient.createGatewayAdvertisedRouteOperationCallable().futureCall(request);
+   *   // Do something.
+   *   GatewayAdvertisedRoute response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationCallable() { + return stub.createGatewayAdvertisedRouteOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a GatewayAdvertisedRoute + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GatewayAdvertisedRouteName name =
+   *       GatewayAdvertisedRouteName.of(
+   *           "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]");
+   *   GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name);
+   * }
+   * }
+ * + * @param name Required. The name of the gateway advertised route to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GatewayAdvertisedRoute getGatewayAdvertisedRoute(GatewayAdvertisedRouteName name) { + GetGatewayAdvertisedRouteRequest request = + GetGatewayAdvertisedRouteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getGatewayAdvertisedRoute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a GatewayAdvertisedRoute + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name =
+   *       GatewayAdvertisedRouteName.of(
+   *               "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+   *           .toString();
+   *   GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name);
+   * }
+   * }
+ * + * @param name Required. The name of the gateway advertised route to get. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GatewayAdvertisedRoute getGatewayAdvertisedRoute(String name) { + GetGatewayAdvertisedRouteRequest request = + GetGatewayAdvertisedRouteRequest.newBuilder().setName(name).build(); + return getGatewayAdvertisedRoute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a GatewayAdvertisedRoute + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+   *   for (GatewayAdvertisedRoute element :
+   *       hubServiceClient.listGatewayAdvertisedRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGatewayAdvertisedRoutesPagedResponse listGatewayAdvertisedRoutes( + SpokeName parent) { + ListGatewayAdvertisedRoutesRequest request = + ListGatewayAdvertisedRoutesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listGatewayAdvertisedRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List GatewayAdvertisedRoutes + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+   *   for (GatewayAdvertisedRoute element :
+   *       hubServiceClient.listGatewayAdvertisedRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListGatewayAdvertisedRoutesPagedResponse listGatewayAdvertisedRoutes(String parent) { + ListGatewayAdvertisedRoutesRequest request = + ListGatewayAdvertisedRoutesRequest.newBuilder().setParent(parent).build(); + return listGatewayAdvertisedRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List GatewayAdvertisedRoutes + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

The gateway advertised route's `name` field is used to identify the gateway advertised + * route to update. Format: + * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}` + * @param updateMask Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the update_mask are + * relative to the resource, not the full request. A field is overwritten if it is in the + * mask. If the user does not provide a mask, then all fields are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateGatewayAdvertisedRouteAsync( + GatewayAdvertisedRoute gatewayAdvertisedRoute, FieldMask updateMask) { + UpdateGatewayAdvertisedRouteRequest request = + UpdateGatewayAdvertisedRouteRequest.newBuilder() + .setGatewayAdvertisedRoute(gatewayAdvertisedRoute) + .setUpdateMask(updateMask) + .build(); + return updateGatewayAdvertisedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a GatewayAdvertisedRoute + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GatewayAdvertisedRouteName name =
+   *       GatewayAdvertisedRouteName.of(
+   *           "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]");
+   *   hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the gateway advertised route to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteGatewayAdvertisedRouteAsync( + GatewayAdvertisedRouteName name) { + DeleteGatewayAdvertisedRouteRequest request = + DeleteGatewayAdvertisedRouteRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteGatewayAdvertisedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a GatewayAdvertisedRoute + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   String name =
+   *       GatewayAdvertisedRouteName.of(
+   *               "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+   *           .toString();
+   *   hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the gateway advertised route to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteGatewayAdvertisedRouteAsync( + String name) { + DeleteGatewayAdvertisedRouteRequest request = + DeleteGatewayAdvertisedRouteRequest.newBuilder().setName(name).build(); + return deleteGatewayAdvertisedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a GatewayAdvertisedRoute + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : hubServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = hubServiceClient.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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       hubServiceClient.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 ListHubsPagedResponse + extends AbstractPagedListResponse< + ListHubsRequest, ListHubsResponse, Hub, ListHubsPage, ListHubsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHubsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListHubsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListHubsPagedResponse(ListHubsPage page) { + super(page, ListHubsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHubsPage + extends AbstractPage { + + private ListHubsPage( + PageContext context, ListHubsResponse response) { + super(context, response); + } + + private static ListHubsPage createEmptyPage() { + return new ListHubsPage(null, null); + } + + @Override + protected ListHubsPage createPage( + PageContext context, ListHubsResponse response) { + return new ListHubsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHubsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHubsRequest, ListHubsResponse, Hub, ListHubsPage, ListHubsFixedSizeCollection> { + + private ListHubsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHubsFixedSizeCollection createEmptyCollection() { + return new ListHubsFixedSizeCollection(null, 0); + } + + @Override + protected ListHubsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHubsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListHubSpokesPagedResponse + extends AbstractPagedListResponse< + ListHubSpokesRequest, + ListHubSpokesResponse, + Spoke, + ListHubSpokesPage, + ListHubSpokesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListHubSpokesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListHubSpokesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListHubSpokesPagedResponse(ListHubSpokesPage page) { + super(page, ListHubSpokesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListHubSpokesPage + extends AbstractPage { + + private ListHubSpokesPage( + PageContext context, + ListHubSpokesResponse response) { + super(context, response); + } + + private static ListHubSpokesPage createEmptyPage() { + return new ListHubSpokesPage(null, null); + } + + @Override + protected ListHubSpokesPage createPage( + PageContext context, + ListHubSpokesResponse response) { + return new ListHubSpokesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListHubSpokesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListHubSpokesRequest, + ListHubSpokesResponse, + Spoke, + ListHubSpokesPage, + ListHubSpokesFixedSizeCollection> { + + private ListHubSpokesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListHubSpokesFixedSizeCollection createEmptyCollection() { + return new ListHubSpokesFixedSizeCollection(null, 0); + } + + @Override + protected ListHubSpokesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListHubSpokesFixedSizeCollection(pages, collectionSize); + } + } + + public static class QueryHubStatusPagedResponse + extends AbstractPagedListResponse< + QueryHubStatusRequest, + QueryHubStatusResponse, + HubStatusEntry, + QueryHubStatusPage, + QueryHubStatusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + QueryHubStatusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new QueryHubStatusPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private QueryHubStatusPagedResponse(QueryHubStatusPage page) { + super(page, QueryHubStatusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class QueryHubStatusPage + extends AbstractPage< + QueryHubStatusRequest, QueryHubStatusResponse, HubStatusEntry, QueryHubStatusPage> { + + private QueryHubStatusPage( + PageContext context, + QueryHubStatusResponse response) { + super(context, response); + } + + private static QueryHubStatusPage createEmptyPage() { + return new QueryHubStatusPage(null, null); + } + + @Override + protected QueryHubStatusPage createPage( + PageContext context, + QueryHubStatusResponse response) { + return new QueryHubStatusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class QueryHubStatusFixedSizeCollection + extends AbstractFixedSizeCollection< + QueryHubStatusRequest, + QueryHubStatusResponse, + HubStatusEntry, + QueryHubStatusPage, + QueryHubStatusFixedSizeCollection> { + + private QueryHubStatusFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static QueryHubStatusFixedSizeCollection createEmptyCollection() { + return new QueryHubStatusFixedSizeCollection(null, 0); + } + + @Override + protected QueryHubStatusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new QueryHubStatusFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSpokesPagedResponse + extends AbstractPagedListResponse< + ListSpokesRequest, + ListSpokesResponse, + Spoke, + ListSpokesPage, + ListSpokesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSpokesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListSpokesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListSpokesPagedResponse(ListSpokesPage page) { + super(page, ListSpokesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSpokesPage + extends AbstractPage { + + private ListSpokesPage( + PageContext context, + ListSpokesResponse response) { + super(context, response); + } + + private static ListSpokesPage createEmptyPage() { + return new ListSpokesPage(null, null); + } + + @Override + protected ListSpokesPage createPage( + PageContext context, + ListSpokesResponse response) { + return new ListSpokesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSpokesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSpokesRequest, + ListSpokesResponse, + Spoke, + ListSpokesPage, + ListSpokesFixedSizeCollection> { + + private ListSpokesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSpokesFixedSizeCollection createEmptyCollection() { + return new ListSpokesFixedSizeCollection(null, 0); + } + + @Override + protected ListSpokesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSpokesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRoutesPagedResponse + extends AbstractPagedListResponse< + ListRoutesRequest, + ListRoutesResponse, + Route, + ListRoutesPage, + ListRoutesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRoutesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListRoutesPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListRoutesPagedResponse(ListRoutesPage page) { + super(page, ListRoutesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRoutesPage + extends AbstractPage { + + private ListRoutesPage( + PageContext context, + ListRoutesResponse response) { + super(context, response); + } + + private static ListRoutesPage createEmptyPage() { + return new ListRoutesPage(null, null); + } + + @Override + protected ListRoutesPage createPage( + PageContext context, + ListRoutesResponse response) { + return new ListRoutesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRoutesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRoutesRequest, + ListRoutesResponse, + Route, + ListRoutesPage, + ListRoutesFixedSizeCollection> { + + private ListRoutesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRoutesFixedSizeCollection createEmptyCollection() { + return new ListRoutesFixedSizeCollection(null, 0); + } + + @Override + protected ListRoutesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRoutesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListRouteTablesPagedResponse + extends AbstractPagedListResponse< + ListRouteTablesRequest, + ListRouteTablesResponse, + RouteTable, + ListRouteTablesPage, + ListRouteTablesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRouteTablesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRouteTablesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRouteTablesPagedResponse(ListRouteTablesPage page) { + super(page, ListRouteTablesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRouteTablesPage + extends AbstractPage< + ListRouteTablesRequest, ListRouteTablesResponse, RouteTable, ListRouteTablesPage> { + + private ListRouteTablesPage( + PageContext context, + ListRouteTablesResponse response) { + super(context, response); + } + + private static ListRouteTablesPage createEmptyPage() { + return new ListRouteTablesPage(null, null); + } + + @Override + protected ListRouteTablesPage createPage( + PageContext context, + ListRouteTablesResponse response) { + return new ListRouteTablesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRouteTablesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRouteTablesRequest, + ListRouteTablesResponse, + RouteTable, + ListRouteTablesPage, + ListRouteTablesFixedSizeCollection> { + + private ListRouteTablesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRouteTablesFixedSizeCollection createEmptyCollection() { + return new ListRouteTablesFixedSizeCollection(null, 0); + } + + @Override + protected ListRouteTablesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRouteTablesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGroupsPagedResponse + extends AbstractPagedListResponse< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListGroupsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListGroupsPagedResponse(ListGroupsPage page) { + super(page, ListGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGroupsPage + extends AbstractPage { + + private ListGroupsPage( + PageContext context, + ListGroupsResponse response) { + super(context, response); + } + + private static ListGroupsPage createEmptyPage() { + return new ListGroupsPage(null, null); + } + + @Override + protected ListGroupsPage createPage( + PageContext context, + ListGroupsResponse response) { + return new ListGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGroupsRequest, + ListGroupsResponse, + Group, + ListGroupsPage, + ListGroupsFixedSizeCollection> { + + private ListGroupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGroupsFixedSizeCollection createEmptyCollection() { + return new ListGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListGatewayAdvertisedRoutesPagedResponse + extends AbstractPagedListResponse< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute, + ListGatewayAdvertisedRoutesPage, + ListGatewayAdvertisedRoutesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListGatewayAdvertisedRoutesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListGatewayAdvertisedRoutesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListGatewayAdvertisedRoutesPagedResponse(ListGatewayAdvertisedRoutesPage page) { + super(page, ListGatewayAdvertisedRoutesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListGatewayAdvertisedRoutesPage + extends AbstractPage< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute, + ListGatewayAdvertisedRoutesPage> { + + private ListGatewayAdvertisedRoutesPage( + PageContext< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + context, + ListGatewayAdvertisedRoutesResponse response) { + super(context, response); + } + + private static ListGatewayAdvertisedRoutesPage createEmptyPage() { + return new ListGatewayAdvertisedRoutesPage(null, null); + } + + @Override + protected ListGatewayAdvertisedRoutesPage createPage( + PageContext< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + context, + ListGatewayAdvertisedRoutesResponse response) { + return new ListGatewayAdvertisedRoutesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListGatewayAdvertisedRoutesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute, + ListGatewayAdvertisedRoutesPage, + ListGatewayAdvertisedRoutesFixedSizeCollection> { + + private ListGatewayAdvertisedRoutesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListGatewayAdvertisedRoutesFixedSizeCollection createEmptyCollection() { + return new ListGatewayAdvertisedRoutesFixedSizeCollection(null, 0); + } + + @Override + protected ListGatewayAdvertisedRoutesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListGatewayAdvertisedRoutesFixedSizeCollection(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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceSettings.java new file mode 100644 index 000000000000..e364aed280e0 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceSettings.java @@ -0,0 +1,790 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGatewayAdvertisedRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.QueryHubStatusPagedResponse; + +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.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.HubServiceStubSettings; +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 HubServiceClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder();
+ * hubServiceSettingsBuilder
+ *     .getHubSettings()
+ *     .setRetrySettings(
+ *         hubServiceSettingsBuilder
+ *             .getHubSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * HubServiceSettings hubServiceSettings = hubServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * hubServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class HubServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listHubs. */ + public PagedCallSettings + listHubsSettings() { + return ((HubServiceStubSettings) getStubSettings()).listHubsSettings(); + } + + /** Returns the object with the settings used for calls to getHub. */ + public UnaryCallSettings getHubSettings() { + return ((HubServiceStubSettings) getStubSettings()).getHubSettings(); + } + + /** Returns the object with the settings used for calls to createHub. */ + public UnaryCallSettings createHubSettings() { + return ((HubServiceStubSettings) getStubSettings()).createHubSettings(); + } + + /** Returns the object with the settings used for calls to createHub. */ + public OperationCallSettings + createHubOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).createHubOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateHub. */ + public UnaryCallSettings updateHubSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateHubSettings(); + } + + /** Returns the object with the settings used for calls to updateHub. */ + public OperationCallSettings + updateHubOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateHubOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteHub. */ + public UnaryCallSettings deleteHubSettings() { + return ((HubServiceStubSettings) getStubSettings()).deleteHubSettings(); + } + + /** Returns the object with the settings used for calls to deleteHub. */ + public OperationCallSettings + deleteHubOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).deleteHubOperationSettings(); + } + + /** Returns the object with the settings used for calls to listHubSpokes. */ + public PagedCallSettings + listHubSpokesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listHubSpokesSettings(); + } + + /** Returns the object with the settings used for calls to queryHubStatus. */ + public PagedCallSettings< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings() { + return ((HubServiceStubSettings) getStubSettings()).queryHubStatusSettings(); + } + + /** Returns the object with the settings used for calls to listSpokes. */ + public PagedCallSettings + listSpokesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listSpokesSettings(); + } + + /** Returns the object with the settings used for calls to getSpoke. */ + public UnaryCallSettings getSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).getSpokeSettings(); + } + + /** Returns the object with the settings used for calls to createSpoke. */ + public UnaryCallSettings createSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).createSpokeSettings(); + } + + /** Returns the object with the settings used for calls to createSpoke. */ + public OperationCallSettings + createSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).createSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateSpoke. */ + public UnaryCallSettings updateSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateSpokeSettings(); + } + + /** Returns the object with the settings used for calls to updateSpoke. */ + public OperationCallSettings + updateSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings rejectHubSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeSettings(); + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings + rejectHubSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectHubSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings acceptHubSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeSettings(); + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings + acceptHubSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptHubSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to acceptSpokeUpdate. */ + public UnaryCallSettings acceptSpokeUpdateSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptSpokeUpdateSettings(); + } + + /** Returns the object with the settings used for calls to acceptSpokeUpdate. */ + public OperationCallSettings< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).acceptSpokeUpdateOperationSettings(); + } + + /** Returns the object with the settings used for calls to rejectSpokeUpdate. */ + public UnaryCallSettings rejectSpokeUpdateSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectSpokeUpdateSettings(); + } + + /** Returns the object with the settings used for calls to rejectSpokeUpdate. */ + public OperationCallSettings< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).rejectSpokeUpdateOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteSpoke. */ + public UnaryCallSettings deleteSpokeSettings() { + return ((HubServiceStubSettings) getStubSettings()).deleteSpokeSettings(); + } + + /** Returns the object with the settings used for calls to deleteSpoke. */ + public OperationCallSettings + deleteSpokeOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).deleteSpokeOperationSettings(); + } + + /** Returns the object with the settings used for calls to getRouteTable. */ + public UnaryCallSettings getRouteTableSettings() { + return ((HubServiceStubSettings) getStubSettings()).getRouteTableSettings(); + } + + /** Returns the object with the settings used for calls to getRoute. */ + public UnaryCallSettings getRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).getRouteSettings(); + } + + /** Returns the object with the settings used for calls to listRoutes. */ + public PagedCallSettings + listRoutesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listRoutesSettings(); + } + + /** Returns the object with the settings used for calls to listRouteTables. */ + public PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listRouteTablesSettings(); + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return ((HubServiceStubSettings) getStubSettings()).getGroupSettings(); + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return ((HubServiceStubSettings) getStubSettings()).listGroupsSettings(); + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public UnaryCallSettings updateGroupSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateGroupSettings(); + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public OperationCallSettings + updateGroupOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateGroupOperationSettings(); + } + + /** Returns the object with the settings used for calls to createGatewayAdvertisedRoute. */ + public UnaryCallSettings + createGatewayAdvertisedRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).createGatewayAdvertisedRouteSettings(); + } + + /** Returns the object with the settings used for calls to createGatewayAdvertisedRoute. */ + public OperationCallSettings< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()) + .createGatewayAdvertisedRouteOperationSettings(); + } + + /** Returns the object with the settings used for calls to getGatewayAdvertisedRoute. */ + public UnaryCallSettings + getGatewayAdvertisedRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).getGatewayAdvertisedRouteSettings(); + } + + /** Returns the object with the settings used for calls to listGatewayAdvertisedRoutes. */ + public PagedCallSettings< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings() { + return ((HubServiceStubSettings) getStubSettings()).listGatewayAdvertisedRoutesSettings(); + } + + /** Returns the object with the settings used for calls to updateGatewayAdvertisedRoute. */ + public UnaryCallSettings + updateGatewayAdvertisedRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).updateGatewayAdvertisedRouteSettings(); + } + + /** Returns the object with the settings used for calls to updateGatewayAdvertisedRoute. */ + public OperationCallSettings< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()) + .updateGatewayAdvertisedRouteOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteGatewayAdvertisedRoute. */ + public UnaryCallSettings + deleteGatewayAdvertisedRouteSettings() { + return ((HubServiceStubSettings) getStubSettings()).deleteGatewayAdvertisedRouteSettings(); + } + + /** Returns the object with the settings used for calls to deleteGatewayAdvertisedRoute. */ + public OperationCallSettings + deleteGatewayAdvertisedRouteOperationSettings() { + return ((HubServiceStubSettings) getStubSettings()) + .deleteGatewayAdvertisedRouteOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((HubServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((HubServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((HubServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((HubServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((HubServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final HubServiceSettings create(HubServiceStubSettings stub) throws IOException { + return new HubServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return HubServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return HubServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return HubServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return HubServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return HubServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return HubServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return HubServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 HubServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for HubServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(HubServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(HubServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(HubServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(HubServiceStubSettings.newBuilder()); + } + + public HubServiceStubSettings.Builder getStubSettingsBuilder() { + return ((HubServiceStubSettings.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 listHubs. */ + public PagedCallSettings.Builder + listHubsSettings() { + return getStubSettingsBuilder().listHubsSettings(); + } + + /** Returns the builder for the settings used for calls to getHub. */ + public UnaryCallSettings.Builder getHubSettings() { + return getStubSettingsBuilder().getHubSettings(); + } + + /** Returns the builder for the settings used for calls to createHub. */ + public UnaryCallSettings.Builder createHubSettings() { + return getStubSettingsBuilder().createHubSettings(); + } + + /** Returns the builder for the settings used for calls to createHub. */ + public OperationCallSettings.Builder + createHubOperationSettings() { + return getStubSettingsBuilder().createHubOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateHub. */ + public UnaryCallSettings.Builder updateHubSettings() { + return getStubSettingsBuilder().updateHubSettings(); + } + + /** Returns the builder for the settings used for calls to updateHub. */ + public OperationCallSettings.Builder + updateHubOperationSettings() { + return getStubSettingsBuilder().updateHubOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHub. */ + public UnaryCallSettings.Builder deleteHubSettings() { + return getStubSettingsBuilder().deleteHubSettings(); + } + + /** Returns the builder for the settings used for calls to deleteHub. */ + public OperationCallSettings.Builder + deleteHubOperationSettings() { + return getStubSettingsBuilder().deleteHubOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listHubSpokes. */ + public PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings() { + return getStubSettingsBuilder().listHubSpokesSettings(); + } + + /** Returns the builder for the settings used for calls to queryHubStatus. */ + public PagedCallSettings.Builder< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings() { + return getStubSettingsBuilder().queryHubStatusSettings(); + } + + /** Returns the builder for the settings used for calls to listSpokes. */ + public PagedCallSettings.Builder + listSpokesSettings() { + return getStubSettingsBuilder().listSpokesSettings(); + } + + /** Returns the builder for the settings used for calls to getSpoke. */ + public UnaryCallSettings.Builder getSpokeSettings() { + return getStubSettingsBuilder().getSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to createSpoke. */ + public UnaryCallSettings.Builder createSpokeSettings() { + return getStubSettingsBuilder().createSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to createSpoke. */ + public OperationCallSettings.Builder + createSpokeOperationSettings() { + return getStubSettingsBuilder().createSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateSpoke. */ + public UnaryCallSettings.Builder updateSpokeSettings() { + return getStubSettingsBuilder().updateSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to updateSpoke. */ + public OperationCallSettings.Builder + updateSpokeOperationSettings() { + return getStubSettingsBuilder().updateSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings.Builder rejectHubSpokeSettings() { + return getStubSettingsBuilder().rejectHubSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings() { + return getStubSettingsBuilder().rejectHubSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings.Builder acceptHubSpokeSettings() { + return getStubSettingsBuilder().acceptHubSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings() { + return getStubSettingsBuilder().acceptHubSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to acceptSpokeUpdate. */ + public UnaryCallSettings.Builder + acceptSpokeUpdateSettings() { + return getStubSettingsBuilder().acceptSpokeUpdateSettings(); + } + + /** Returns the builder for the settings used for calls to acceptSpokeUpdate. */ + public OperationCallSettings.Builder< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings() { + return getStubSettingsBuilder().acceptSpokeUpdateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to rejectSpokeUpdate. */ + public UnaryCallSettings.Builder + rejectSpokeUpdateSettings() { + return getStubSettingsBuilder().rejectSpokeUpdateSettings(); + } + + /** Returns the builder for the settings used for calls to rejectSpokeUpdate. */ + public OperationCallSettings.Builder< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings() { + return getStubSettingsBuilder().rejectSpokeUpdateOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSpoke. */ + public UnaryCallSettings.Builder deleteSpokeSettings() { + return getStubSettingsBuilder().deleteSpokeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSpoke. */ + public OperationCallSettings.Builder + deleteSpokeOperationSettings() { + return getStubSettingsBuilder().deleteSpokeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getRouteTable. */ + public UnaryCallSettings.Builder getRouteTableSettings() { + return getStubSettingsBuilder().getRouteTableSettings(); + } + + /** Returns the builder for the settings used for calls to getRoute. */ + public UnaryCallSettings.Builder getRouteSettings() { + return getStubSettingsBuilder().getRouteSettings(); + } + + /** Returns the builder for the settings used for calls to listRoutes. */ + public PagedCallSettings.Builder + listRoutesSettings() { + return getStubSettingsBuilder().listRoutesSettings(); + } + + /** Returns the builder for the settings used for calls to listRouteTables. */ + public PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return getStubSettingsBuilder().listRouteTablesSettings(); + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getStubSettingsBuilder().getGroupSettings(); + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return getStubSettingsBuilder().listGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public UnaryCallSettings.Builder updateGroupSettings() { + return getStubSettingsBuilder().updateGroupSettings(); + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public OperationCallSettings.Builder + updateGroupOperationSettings() { + return getStubSettingsBuilder().updateGroupOperationSettings(); + } + + /** Returns the builder for the settings used for calls to createGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + createGatewayAdvertisedRouteSettings() { + return getStubSettingsBuilder().createGatewayAdvertisedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to createGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings() { + return getStubSettingsBuilder().createGatewayAdvertisedRouteOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + getGatewayAdvertisedRouteSettings() { + return getStubSettingsBuilder().getGatewayAdvertisedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to listGatewayAdvertisedRoutes. */ + public PagedCallSettings.Builder< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings() { + return getStubSettingsBuilder().listGatewayAdvertisedRoutesSettings(); + } + + /** Returns the builder for the settings used for calls to updateGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + updateGatewayAdvertisedRouteSettings() { + return getStubSettingsBuilder().updateGatewayAdvertisedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to updateGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings() { + return getStubSettingsBuilder().updateGatewayAdvertisedRouteOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + deleteGatewayAdvertisedRouteSettings() { + return getStubSettingsBuilder().deleteGatewayAdvertisedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to deleteGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + DeleteGatewayAdvertisedRouteRequest, Empty, OperationMetadata> + deleteGatewayAdvertisedRouteOperationSettings() { + return getStubSettingsBuilder().deleteGatewayAdvertisedRouteOperationSettings(); + } + + /** 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 HubServiceSettings build() throws IOException { + return new HubServiceSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClient.java new file mode 100644 index 000000000000..543351697bbd --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClient.java @@ -0,0 +1,1556 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.PolicyBasedRoutingServiceStub; +import com.google.cloud.networkconnectivity.v1beta.stub.PolicyBasedRoutingServiceStubSettings; +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.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Policy-Based Routing allows GCP customers to specify flexibile routing + * policies for Layer 4 traffic traversing through the connected service. + * + *

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

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

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

ListPolicyBasedRoutes

Lists policy-based routes in a given project and location.

+ *

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

+ *
    + *
  • listPolicyBasedRoutes(ListPolicyBasedRoutesRequest request) + *

+ *

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

+ *
    + *
  • listPolicyBasedRoutes(LocationName parent) + *

  • listPolicyBasedRoutes(String parent) + *

+ *

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

+ *
    + *
  • listPolicyBasedRoutesPagedCallable() + *

  • listPolicyBasedRoutesCallable() + *

+ *

GetPolicyBasedRoute

Gets details of a single policy-based route.

+ *

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

+ *
    + *
  • getPolicyBasedRoute(GetPolicyBasedRouteRequest request) + *

+ *

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

+ *
    + *
  • getPolicyBasedRoute(PolicyBasedRouteName name) + *

  • getPolicyBasedRoute(String name) + *

+ *

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

+ *
    + *
  • getPolicyBasedRouteCallable() + *

+ *

CreatePolicyBasedRoute

Creates a new policy-based route in a given project and location.

+ *

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

+ *
    + *
  • createPolicyBasedRouteAsync(CreatePolicyBasedRouteRequest request) + *

+ *

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

+ *
    + *
  • createPolicyBasedRouteAsync(LocationName parent, PolicyBasedRoute policyBasedRoute, String policyBasedRouteId) + *

  • createPolicyBasedRouteAsync(String parent, PolicyBasedRoute policyBasedRoute, String policyBasedRouteId) + *

+ *

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

+ *
    + *
  • createPolicyBasedRouteOperationCallable() + *

  • createPolicyBasedRouteCallable() + *

+ *

DeletePolicyBasedRoute

Deletes a single policy-based route.

+ *

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

+ *
    + *
  • deletePolicyBasedRouteAsync(DeletePolicyBasedRouteRequest request) + *

+ *

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

+ *
    + *
  • deletePolicyBasedRouteAsync(PolicyBasedRouteName name) + *

  • deletePolicyBasedRouteAsync(String name) + *

+ *

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

+ *
    + *
  • deletePolicyBasedRouteOperationCallable() + *

  • deletePolicyBasedRouteCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways: + *

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

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

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

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 + * PolicyBasedRoutingServiceSettings 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
+ * PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings =
+ *     PolicyBasedRoutingServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ *     PolicyBasedRoutingServiceClient.create(policyBasedRoutingServiceSettings);
+ * }
+ * + *

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
+ * PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings =
+ *     PolicyBasedRoutingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ *     PolicyBasedRoutingServiceClient.create(policyBasedRoutingServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class PolicyBasedRoutingServiceClient implements BackgroundResource { + private final PolicyBasedRoutingServiceSettings settings; + private final PolicyBasedRoutingServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of PolicyBasedRoutingServiceClient with default settings. */ + public static final PolicyBasedRoutingServiceClient create() throws IOException { + return create(PolicyBasedRoutingServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PolicyBasedRoutingServiceClient, 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 PolicyBasedRoutingServiceClient create( + PolicyBasedRoutingServiceSettings settings) throws IOException { + return new PolicyBasedRoutingServiceClient(settings); + } + + /** + * Constructs an instance of PolicyBasedRoutingServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(PolicyBasedRoutingServiceSettings). + */ + public static final PolicyBasedRoutingServiceClient create(PolicyBasedRoutingServiceStub stub) { + return new PolicyBasedRoutingServiceClient(stub); + } + + /** + * Constructs an instance of PolicyBasedRoutingServiceClient, 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 PolicyBasedRoutingServiceClient(PolicyBasedRoutingServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((PolicyBasedRoutingServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected PolicyBasedRoutingServiceClient(PolicyBasedRoutingServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final PolicyBasedRoutingServiceSettings getSettings() { + return settings; + } + + public PolicyBasedRoutingServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy-based routes 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (PolicyBasedRoute element :
+   *       policyBasedRoutingServiceClient.listPolicyBasedRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBasedRoutesPagedResponse listPolicyBasedRoutes(LocationName parent) { + ListPolicyBasedRoutesRequest request = + ListPolicyBasedRoutesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPolicyBasedRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy-based routes 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (PolicyBasedRoute element :
+   *       policyBasedRoutingServiceClient.listPolicyBasedRoutes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPolicyBasedRoutesPagedResponse listPolicyBasedRoutes(String parent) { + ListPolicyBasedRoutesRequest request = + ListPolicyBasedRoutesRequest.newBuilder().setParent(parent).build(); + return listPolicyBasedRoutes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy-based routes 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListPolicyBasedRoutesRequest request =
+   *       ListPolicyBasedRoutesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (PolicyBasedRoute element :
+   *       policyBasedRoutingServiceClient.listPolicyBasedRoutes(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 ListPolicyBasedRoutesPagedResponse listPolicyBasedRoutes( + ListPolicyBasedRoutesRequest request) { + return listPolicyBasedRoutesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy-based routes 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListPolicyBasedRoutesRequest request =
+   *       ListPolicyBasedRoutesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.listPolicyBasedRoutesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PolicyBasedRoute element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBasedRoutesPagedCallable() { + return stub.listPolicyBasedRoutesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists policy-based routes 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListPolicyBasedRoutesRequest request =
+   *       ListPolicyBasedRoutesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListPolicyBasedRoutesResponse response =
+   *         policyBasedRoutingServiceClient.listPolicyBasedRoutesCallable().call(request);
+   *     for (PolicyBasedRoute element : response.getPolicyBasedRoutesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPolicyBasedRoutesCallable() { + return stub.listPolicyBasedRoutesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single policy-based route. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetPolicyBasedRouteRequest request =
+   *       GetPolicyBasedRouteRequest.newBuilder()
+   *           .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.getPolicyBasedRouteCallable().futureCall(request);
+   *   // Do something.
+   *   PolicyBasedRoute response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPolicyBasedRouteCallable() { + return stub.getPolicyBasedRouteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new policy-based route 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build();
+   *   String policyBasedRouteId = "policyBasedRouteId-18034589";
+   *   PolicyBasedRoute response =
+   *       policyBasedRoutingServiceClient
+   *           .createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name of the PolicyBasedRoute. + * @param policyBasedRoute Required. Initial values for a new policy-based route. + * @param policyBasedRouteId Required. Unique id for the policy-based route to create. Provided by + * the client when the resource is created. The name must comply with + * https://google.aip.dev/122#resource-id-segments. Specifically, the name must be 1-63 + * characters long and match the regular expression [a-z]([a-z0-9-]*[a-z0-9])?. The first + * character must be a lowercase letter, and all following characters (except for the last + * character) must be a dash, lowercase letter, or digit. The last character must be a + * lowercase letter or digit. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBasedRouteAsync( + LocationName parent, PolicyBasedRoute policyBasedRoute, String policyBasedRouteId) { + CreatePolicyBasedRouteRequest request = + CreatePolicyBasedRouteRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicyBasedRoute(policyBasedRoute) + .setPolicyBasedRouteId(policyBasedRouteId) + .build(); + return createPolicyBasedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new policy-based route 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build();
+   *   String policyBasedRouteId = "policyBasedRouteId-18034589";
+   *   PolicyBasedRoute response =
+   *       policyBasedRoutingServiceClient
+   *           .createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource's name of the PolicyBasedRoute. + * @param policyBasedRoute Required. Initial values for a new policy-based route. + * @param policyBasedRouteId Required. Unique id for the policy-based route to create. Provided by + * the client when the resource is created. The name must comply with + * https://google.aip.dev/122#resource-id-segments. Specifically, the name must be 1-63 + * characters long and match the regular expression [a-z]([a-z0-9-]*[a-z0-9])?. The first + * character must be a lowercase letter, and all following characters (except for the last + * character) must be a dash, lowercase letter, or digit. The last character must be a + * lowercase letter or digit. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createPolicyBasedRouteAsync( + String parent, PolicyBasedRoute policyBasedRoute, String policyBasedRouteId) { + CreatePolicyBasedRouteRequest request = + CreatePolicyBasedRouteRequest.newBuilder() + .setParent(parent) + .setPolicyBasedRoute(policyBasedRoute) + .setPolicyBasedRouteId(policyBasedRouteId) + .build(); + return createPolicyBasedRouteAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new policy-based route 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   CreatePolicyBasedRouteRequest request =
+   *       CreatePolicyBasedRouteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPolicyBasedRouteId("policyBasedRouteId-18034589")
+   *           .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   PolicyBasedRoute response =
+   *       policyBasedRoutingServiceClient.createPolicyBasedRouteAsync(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 createPolicyBasedRouteAsync( + CreatePolicyBasedRouteRequest request) { + return createPolicyBasedRouteOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new policy-based route 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   CreatePolicyBasedRouteRequest request =
+   *       CreatePolicyBasedRouteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPolicyBasedRouteId("policyBasedRouteId-18034589")
+   *           .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       policyBasedRoutingServiceClient
+   *           .createPolicyBasedRouteOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   PolicyBasedRoute response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createPolicyBasedRouteOperationCallable() { + return stub.createPolicyBasedRouteOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new policy-based route 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   CreatePolicyBasedRouteRequest request =
+   *       CreatePolicyBasedRouteRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPolicyBasedRouteId("policyBasedRouteId-18034589")
+   *           .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.createPolicyBasedRouteCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPolicyBasedRouteCallable() { + return stub.createPolicyBasedRouteCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single policy-based route. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : policyBasedRoutingServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response =
+   *       policyBasedRoutingServiceClient.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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+   *     PolicyBasedRoutingServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       policyBasedRoutingServiceClient.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 ListPolicyBasedRoutesPagedResponse + extends AbstractPagedListResponse< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + PolicyBasedRoute, + ListPolicyBasedRoutesPage, + ListPolicyBasedRoutesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPolicyBasedRoutesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPolicyBasedRoutesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPolicyBasedRoutesPagedResponse(ListPolicyBasedRoutesPage page) { + super(page, ListPolicyBasedRoutesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPolicyBasedRoutesPage + extends AbstractPage< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + PolicyBasedRoute, + ListPolicyBasedRoutesPage> { + + private ListPolicyBasedRoutesPage( + PageContext + context, + ListPolicyBasedRoutesResponse response) { + super(context, response); + } + + private static ListPolicyBasedRoutesPage createEmptyPage() { + return new ListPolicyBasedRoutesPage(null, null); + } + + @Override + protected ListPolicyBasedRoutesPage createPage( + PageContext + context, + ListPolicyBasedRoutesResponse response) { + return new ListPolicyBasedRoutesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPolicyBasedRoutesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + PolicyBasedRoute, + ListPolicyBasedRoutesPage, + ListPolicyBasedRoutesFixedSizeCollection> { + + private ListPolicyBasedRoutesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPolicyBasedRoutesFixedSizeCollection createEmptyCollection() { + return new ListPolicyBasedRoutesFixedSizeCollection(null, 0); + } + + @Override + protected ListPolicyBasedRoutesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPolicyBasedRoutesFixedSizeCollection(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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceSettings.java new file mode 100644 index 000000000000..c88d0f8d7584 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceSettings.java @@ -0,0 +1,375 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; + +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.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.PolicyBasedRoutingServiceStubSettings; +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 PolicyBasedRoutingServiceClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBasedRoutingServiceSettings.Builder policyBasedRoutingServiceSettingsBuilder =
+ *     PolicyBasedRoutingServiceSettings.newBuilder();
+ * policyBasedRoutingServiceSettingsBuilder
+ *     .getPolicyBasedRouteSettings()
+ *     .setRetrySettings(
+ *         policyBasedRoutingServiceSettingsBuilder
+ *             .getPolicyBasedRouteSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings =
+ *     policyBasedRoutingServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBasedRoutingServiceSettings.Builder policyBasedRoutingServiceSettingsBuilder =
+ *     PolicyBasedRoutingServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBasedRoutingServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PolicyBasedRoutingServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listPolicyBasedRoutes. */ + public PagedCallSettings< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .listPolicyBasedRoutesSettings(); + } + + /** Returns the object with the settings used for calls to getPolicyBasedRoute. */ + public UnaryCallSettings + getPolicyBasedRouteSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .getPolicyBasedRouteSettings(); + } + + /** Returns the object with the settings used for calls to createPolicyBasedRoute. */ + public UnaryCallSettings + createPolicyBasedRouteSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .createPolicyBasedRouteSettings(); + } + + /** Returns the object with the settings used for calls to createPolicyBasedRoute. */ + public OperationCallSettings + createPolicyBasedRouteOperationSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .createPolicyBasedRouteOperationSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBasedRoute. */ + public UnaryCallSettings + deletePolicyBasedRouteSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .deletePolicyBasedRouteSettings(); + } + + /** Returns the object with the settings used for calls to deletePolicyBasedRoute. */ + public OperationCallSettings + deletePolicyBasedRouteOperationSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()) + .deletePolicyBasedRouteOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((PolicyBasedRoutingServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final PolicyBasedRoutingServiceSettings create( + PolicyBasedRoutingServiceStubSettings stub) throws IOException { + return new PolicyBasedRoutingServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PolicyBasedRoutingServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PolicyBasedRoutingServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PolicyBasedRoutingServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PolicyBasedRoutingServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PolicyBasedRoutingServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PolicyBasedRoutingServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PolicyBasedRoutingServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 PolicyBasedRoutingServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PolicyBasedRoutingServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PolicyBasedRoutingServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(PolicyBasedRoutingServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PolicyBasedRoutingServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PolicyBasedRoutingServiceStubSettings.newBuilder()); + } + + public PolicyBasedRoutingServiceStubSettings.Builder getStubSettingsBuilder() { + return ((PolicyBasedRoutingServiceStubSettings.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 listPolicyBasedRoutes. */ + public PagedCallSettings.Builder< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings() { + return getStubSettingsBuilder().listPolicyBasedRoutesSettings(); + } + + /** Returns the builder for the settings used for calls to getPolicyBasedRoute. */ + public UnaryCallSettings.Builder + getPolicyBasedRouteSettings() { + return getStubSettingsBuilder().getPolicyBasedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to createPolicyBasedRoute. */ + public UnaryCallSettings.Builder + createPolicyBasedRouteSettings() { + return getStubSettingsBuilder().createPolicyBasedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to createPolicyBasedRoute. */ + public OperationCallSettings.Builder< + CreatePolicyBasedRouteRequest, PolicyBasedRoute, OperationMetadata> + createPolicyBasedRouteOperationSettings() { + return getStubSettingsBuilder().createPolicyBasedRouteOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBasedRoute. */ + public UnaryCallSettings.Builder + deletePolicyBasedRouteSettings() { + return getStubSettingsBuilder().deletePolicyBasedRouteSettings(); + } + + /** Returns the builder for the settings used for calls to deletePolicyBasedRoute. */ + public OperationCallSettings.Builder + deletePolicyBasedRouteOperationSettings() { + return getStubSettingsBuilder().deletePolicyBasedRouteOperationSettings(); + } + + /** 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 PolicyBasedRoutingServiceSettings build() throws IOException { + return new PolicyBasedRoutingServiceSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClient.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClient.java new file mode 100644 index 000000000000..d9daa80be4a3 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClient.java @@ -0,0 +1,2189 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.TransportManagerStub; +import com.google.cloud.networkconnectivity.v1beta.stub.TransportManagerStubSettings; +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.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The CLH based service for managing RemoteTransportProfiles and Transports. + * + *

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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+ *   RemoteTransportProfileName name =
+ *       RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
+ *   RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name);
+ * }
+ * }
+ * + *

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

ListRemoteTransportProfiles

Lists RemoteTransportProfiles in a given project and location.

+ *

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

+ *
    + *
  • listRemoteTransportProfiles(ListRemoteTransportProfilesRequest request) + *

+ *

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

+ *
    + *
  • listRemoteTransportProfiles(LocationName parent) + *

  • listRemoteTransportProfiles(String parent) + *

+ *

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

+ *
    + *
  • listRemoteTransportProfilesPagedCallable() + *

  • listRemoteTransportProfilesCallable() + *

+ *

GetRemoteTransportProfile

Gets details of a single RemoteTransportProfile.

+ *

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

+ *
    + *
  • getRemoteTransportProfile(GetRemoteTransportProfileRequest request) + *

+ *

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

+ *
    + *
  • getRemoteTransportProfile(RemoteTransportProfileName name) + *

  • getRemoteTransportProfile(String name) + *

+ *

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

+ *
    + *
  • getRemoteTransportProfileCallable() + *

+ *

ListTransports

Lists Transports in a given project and location.

+ *

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

+ *
    + *
  • listTransports(ListTransportsRequest request) + *

+ *

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

+ *
    + *
  • listTransports(LocationName parent) + *

  • listTransports(String parent) + *

+ *

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

+ *
    + *
  • listTransportsPagedCallable() + *

  • listTransportsCallable() + *

+ *

GetTransport

Gets details of a single Transport.

+ *

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

+ *
    + *
  • getTransport(GetTransportRequest request) + *

+ *

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

+ *
    + *
  • getTransport(TransportName name) + *

  • getTransport(String name) + *

+ *

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

+ *
    + *
  • getTransportCallable() + *

+ *

GetStatus

Gets the operational status of a single Transport.

+ *

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

+ *
    + *
  • getStatus(GetStatusRequest request) + *

+ *

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

+ *
    + *
  • getStatus(TransportName name) + *

  • getStatus(String name) + *

+ *

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

+ *
    + *
  • getStatusCallable() + *

+ *

CreateTransport

Creates a new Transport in a given project and location.

+ *

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

+ *
    + *
  • createTransportAsync(CreateTransportRequest request) + *

+ *

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

+ *
    + *
  • createTransportAsync(LocationName parent, Transport transport, String transportId) + *

  • createTransportAsync(String parent, Transport transport, String transportId) + *

+ *

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

+ *
    + *
  • createTransportOperationCallable() + *

  • createTransportCallable() + *

+ *

UpdateTransport

Updates the parameters of a single Transport.

+ *

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

+ *
    + *
  • updateTransportAsync(UpdateTransportRequest request) + *

+ *

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

+ *
    + *
  • updateTransportAsync(Transport transport, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateTransportOperationCallable() + *

  • updateTransportCallable() + *

+ *

DeleteTransport

Deletes a single Transport.

+ *

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

+ *
    + *
  • deleteTransportAsync(DeleteTransportRequest request) + *

+ *

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

+ *
    + *
  • deleteTransportAsync(TransportName name) + *

  • deleteTransportAsync(String name) + *

+ *

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

+ *
    + *
  • deleteTransportOperationCallable() + *

  • deleteTransportCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.This method can be called in two ways: + *

* **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy. + *

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

+ *

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

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

+ *

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

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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.

+ *

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

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

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 TransportManagerSettings 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
+ * TransportManagerSettings transportManagerSettings =
+ *     TransportManagerSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * TransportManagerClient transportManagerClient =
+ *     TransportManagerClient.create(transportManagerSettings);
+ * }
+ * + *

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
+ * TransportManagerSettings transportManagerSettings =
+ *     TransportManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * TransportManagerClient transportManagerClient =
+ *     TransportManagerClient.create(transportManagerSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class TransportManagerClient implements BackgroundResource { + private final TransportManagerSettings settings; + private final TransportManagerStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of TransportManagerClient with default settings. */ + public static final TransportManagerClient create() throws IOException { + return create(TransportManagerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of TransportManagerClient, 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 TransportManagerClient create(TransportManagerSettings settings) + throws IOException { + return new TransportManagerClient(settings); + } + + /** + * Constructs an instance of TransportManagerClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(TransportManagerSettings). + */ + public static final TransportManagerClient create(TransportManagerStub stub) { + return new TransportManagerClient(stub); + } + + /** + * Constructs an instance of TransportManagerClient, 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 TransportManagerClient(TransportManagerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((TransportManagerStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected TransportManagerClient(TransportManagerStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final TransportManagerSettings getSettings() { + return settings; + } + + public TransportManagerStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RemoteTransportProfiles 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (RemoteTransportProfile element :
+   *       transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListRemoteTransportProfilesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles( + LocationName parent) { + ListRemoteTransportProfilesRequest request = + ListRemoteTransportProfilesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRemoteTransportProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RemoteTransportProfiles 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (RemoteTransportProfile element :
+   *       transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListRemoteTransportProfilesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles(String parent) { + ListRemoteTransportProfilesRequest request = + ListRemoteTransportProfilesRequest.newBuilder().setParent(parent).build(); + return listRemoteTransportProfiles(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RemoteTransportProfiles 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListRemoteTransportProfilesRequest request =
+   *       ListRemoteTransportProfilesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (RemoteTransportProfile element :
+   *       transportManagerClient.listRemoteTransportProfiles(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 ListRemoteTransportProfilesPagedResponse listRemoteTransportProfiles( + ListRemoteTransportProfilesRequest request) { + return listRemoteTransportProfilesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RemoteTransportProfiles 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListRemoteTransportProfilesRequest request =
+   *       ListRemoteTransportProfilesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.listRemoteTransportProfilesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (RemoteTransportProfile element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesPagedCallable() { + return stub.listRemoteTransportProfilesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists RemoteTransportProfiles 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListRemoteTransportProfilesRequest request =
+   *       ListRemoteTransportProfilesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListRemoteTransportProfilesResponse response =
+   *         transportManagerClient.listRemoteTransportProfilesCallable().call(request);
+   *     for (RemoteTransportProfile element : response.getRemoteTransportProfilesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesResponse> + listRemoteTransportProfilesCallable() { + return stub.listRemoteTransportProfilesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single RemoteTransportProfile. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetRemoteTransportProfileRequest request =
+   *       GetRemoteTransportProfileRequest.newBuilder()
+   *           .setName(
+   *               RemoteTransportProfileName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.getRemoteTransportProfileCallable().futureCall(request);
+   *   // Do something.
+   *   RemoteTransportProfile response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getRemoteTransportProfileCallable() { + return stub.getRemoteTransportProfileCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Transports 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListTransportsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransportsPagedResponse listTransports(LocationName parent) { + ListTransportsRequest request = + ListTransportsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Transports 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListTransportsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransportsPagedResponse listTransports(String parent) { + ListTransportsRequest request = ListTransportsRequest.newBuilder().setParent(parent).build(); + return listTransports(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Transports 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListTransportsRequest request =
+   *       ListTransportsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Transport element : transportManagerClient.listTransports(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 ListTransportsPagedResponse listTransports(ListTransportsRequest request) { + return listTransportsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Transports 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListTransportsRequest request =
+   *       ListTransportsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.listTransportsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Transport element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTransportsPagedCallable() { + return stub.listTransportsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Transports 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListTransportsRequest request =
+   *       ListTransportsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListTransportsResponse response =
+   *         transportManagerClient.listTransportsCallable().call(request);
+   *     for (Transport element : response.getTransportsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTransportsCallable() { + return stub.listTransportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Transport. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetStatusRequest request =
+   *       GetStatusRequest.newBuilder()
+   *           .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.getStatusCallable().futureCall(request);
+   *   // Do something.
+   *   GetStatusResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getStatusCallable() { + return stub.getStatusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Transport 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Transport transport = Transport.newBuilder().build();
+   *   String transportId = "transportId-1713251804";
+   *   Transport response =
+   *       transportManagerClient.createTransportAsync(parent, transport, transportId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param transport Required. The resource being created + * @param transportId Required. Id of the requesting object + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTransportAsync( + LocationName parent, Transport transport, String transportId) { + CreateTransportRequest request = + CreateTransportRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTransport(transport) + .setTransportId(transportId) + .build(); + return createTransportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Transport 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Transport transport = Transport.newBuilder().build();
+   *   String transportId = "transportId-1713251804";
+   *   Transport response =
+   *       transportManagerClient.createTransportAsync(parent, transport, transportId).get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param transport Required. The resource being created + * @param transportId Required. Id of the requesting object + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createTransportAsync( + String parent, Transport transport, String transportId) { + CreateTransportRequest request = + CreateTransportRequest.newBuilder() + .setParent(parent) + .setTransport(transport) + .setTransportId(transportId) + .build(); + return createTransportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Transport 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   CreateTransportRequest request =
+   *       CreateTransportRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTransportId("transportId-1713251804")
+   *           .setTransport(Transport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   Transport response = transportManagerClient.createTransportAsync(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 createTransportAsync( + CreateTransportRequest request) { + return createTransportOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Transport 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   CreateTransportRequest request =
+   *       CreateTransportRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTransportId("transportId-1713251804")
+   *           .setTransport(Transport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       transportManagerClient.createTransportOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Transport response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createTransportOperationCallable() { + return stub.createTransportOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Transport 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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   CreateTransportRequest request =
+   *       CreateTransportRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTransportId("transportId-1713251804")
+   *           .setTransport(Transport.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.createTransportCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTransportCallable() { + return stub.createTransportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Transport. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   Transport transport = Transport.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Transport response = transportManagerClient.updateTransportAsync(transport, updateMask).get();
+   * }
+   * }
+ * + * @param transport Required. The resource being updated. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Transport 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 present in the request will be + * overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateTransportAsync( + Transport transport, FieldMask updateMask) { + UpdateTransportRequest request = + UpdateTransportRequest.newBuilder() + .setTransport(transport) + .setUpdateMask(updateMask) + .build(); + return updateTransportAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Transport. + * + *

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

Sample code: + * + *

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

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : transportManagerClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.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.This method can be called in + * two ways: + * + *

* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the project. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = transportManagerClient.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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       transportManagerClient.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 ListRemoteTransportProfilesPagedResponse + extends AbstractPagedListResponse< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile, + ListRemoteTransportProfilesPage, + ListRemoteTransportProfilesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRemoteTransportProfilesPage.createEmptyPage() + .createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRemoteTransportProfilesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRemoteTransportProfilesPagedResponse(ListRemoteTransportProfilesPage page) { + super(page, ListRemoteTransportProfilesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRemoteTransportProfilesPage + extends AbstractPage< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile, + ListRemoteTransportProfilesPage> { + + private ListRemoteTransportProfilesPage( + PageContext< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + context, + ListRemoteTransportProfilesResponse response) { + super(context, response); + } + + private static ListRemoteTransportProfilesPage createEmptyPage() { + return new ListRemoteTransportProfilesPage(null, null); + } + + @Override + protected ListRemoteTransportProfilesPage createPage( + PageContext< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + context, + ListRemoteTransportProfilesResponse response) { + return new ListRemoteTransportProfilesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRemoteTransportProfilesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile, + ListRemoteTransportProfilesPage, + ListRemoteTransportProfilesFixedSizeCollection> { + + private ListRemoteTransportProfilesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRemoteTransportProfilesFixedSizeCollection createEmptyCollection() { + return new ListRemoteTransportProfilesFixedSizeCollection(null, 0); + } + + @Override + protected ListRemoteTransportProfilesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRemoteTransportProfilesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransportsPagedResponse + extends AbstractPagedListResponse< + ListTransportsRequest, + ListTransportsResponse, + Transport, + ListTransportsPage, + ListTransportsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransportsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTransportsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTransportsPagedResponse(ListTransportsPage page) { + super(page, ListTransportsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransportsPage + extends AbstractPage< + ListTransportsRequest, ListTransportsResponse, Transport, ListTransportsPage> { + + private ListTransportsPage( + PageContext context, + ListTransportsResponse response) { + super(context, response); + } + + private static ListTransportsPage createEmptyPage() { + return new ListTransportsPage(null, null); + } + + @Override + protected ListTransportsPage createPage( + PageContext context, + ListTransportsResponse response) { + return new ListTransportsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransportsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransportsRequest, + ListTransportsResponse, + Transport, + ListTransportsPage, + ListTransportsFixedSizeCollection> { + + private ListTransportsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransportsFixedSizeCollection createEmptyCollection() { + return new ListTransportsFixedSizeCollection(null, 0); + } + + @Override + protected ListTransportsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransportsFixedSizeCollection(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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerSettings.java new file mode 100644 index 000000000000..33a9f092a65f --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerSettings.java @@ -0,0 +1,418 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListRemoteTransportProfilesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListTransportsPagedResponse; + +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.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.stub.TransportManagerStubSettings; +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 TransportManagerClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TransportManagerSettings.Builder transportManagerSettingsBuilder =
+ *     TransportManagerSettings.newBuilder();
+ * transportManagerSettingsBuilder
+ *     .getRemoteTransportProfileSettings()
+ *     .setRetrySettings(
+ *         transportManagerSettingsBuilder
+ *             .getRemoteTransportProfileSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * TransportManagerSettings transportManagerSettings = transportManagerSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TransportManagerSettings.Builder transportManagerSettingsBuilder =
+ *     TransportManagerSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * transportManagerSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TransportManagerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listRemoteTransportProfiles. */ + public PagedCallSettings< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings() { + return ((TransportManagerStubSettings) getStubSettings()).listRemoteTransportProfilesSettings(); + } + + /** Returns the object with the settings used for calls to getRemoteTransportProfile. */ + public UnaryCallSettings + getRemoteTransportProfileSettings() { + return ((TransportManagerStubSettings) getStubSettings()).getRemoteTransportProfileSettings(); + } + + /** Returns the object with the settings used for calls to listTransports. */ + public PagedCallSettings< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings() { + return ((TransportManagerStubSettings) getStubSettings()).listTransportsSettings(); + } + + /** Returns the object with the settings used for calls to getTransport. */ + public UnaryCallSettings getTransportSettings() { + return ((TransportManagerStubSettings) getStubSettings()).getTransportSettings(); + } + + /** Returns the object with the settings used for calls to getStatus. */ + public UnaryCallSettings getStatusSettings() { + return ((TransportManagerStubSettings) getStubSettings()).getStatusSettings(); + } + + /** Returns the object with the settings used for calls to createTransport. */ + public UnaryCallSettings createTransportSettings() { + return ((TransportManagerStubSettings) getStubSettings()).createTransportSettings(); + } + + /** Returns the object with the settings used for calls to createTransport. */ + public OperationCallSettings + createTransportOperationSettings() { + return ((TransportManagerStubSettings) getStubSettings()).createTransportOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateTransport. */ + public UnaryCallSettings updateTransportSettings() { + return ((TransportManagerStubSettings) getStubSettings()).updateTransportSettings(); + } + + /** Returns the object with the settings used for calls to updateTransport. */ + public OperationCallSettings + updateTransportOperationSettings() { + return ((TransportManagerStubSettings) getStubSettings()).updateTransportOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteTransport. */ + public UnaryCallSettings deleteTransportSettings() { + return ((TransportManagerStubSettings) getStubSettings()).deleteTransportSettings(); + } + + /** Returns the object with the settings used for calls to deleteTransport. */ + public OperationCallSettings + deleteTransportOperationSettings() { + return ((TransportManagerStubSettings) getStubSettings()).deleteTransportOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((TransportManagerStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((TransportManagerStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((TransportManagerStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((TransportManagerStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((TransportManagerStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final TransportManagerSettings create(TransportManagerStubSettings stub) + throws IOException { + return new TransportManagerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return TransportManagerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return TransportManagerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return TransportManagerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return TransportManagerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return TransportManagerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return TransportManagerStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return TransportManagerStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 TransportManagerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for TransportManagerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(TransportManagerStubSettings.newBuilder(clientContext)); + } + + protected Builder(TransportManagerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(TransportManagerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(TransportManagerStubSettings.newBuilder()); + } + + public TransportManagerStubSettings.Builder getStubSettingsBuilder() { + return ((TransportManagerStubSettings.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 listRemoteTransportProfiles. */ + public PagedCallSettings.Builder< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings() { + return getStubSettingsBuilder().listRemoteTransportProfilesSettings(); + } + + /** Returns the builder for the settings used for calls to getRemoteTransportProfile. */ + public UnaryCallSettings.Builder + getRemoteTransportProfileSettings() { + return getStubSettingsBuilder().getRemoteTransportProfileSettings(); + } + + /** Returns the builder for the settings used for calls to listTransports. */ + public PagedCallSettings.Builder< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings() { + return getStubSettingsBuilder().listTransportsSettings(); + } + + /** Returns the builder for the settings used for calls to getTransport. */ + public UnaryCallSettings.Builder getTransportSettings() { + return getStubSettingsBuilder().getTransportSettings(); + } + + /** Returns the builder for the settings used for calls to getStatus. */ + public UnaryCallSettings.Builder getStatusSettings() { + return getStubSettingsBuilder().getStatusSettings(); + } + + /** Returns the builder for the settings used for calls to createTransport. */ + public UnaryCallSettings.Builder createTransportSettings() { + return getStubSettingsBuilder().createTransportSettings(); + } + + /** Returns the builder for the settings used for calls to createTransport. */ + public OperationCallSettings.Builder + createTransportOperationSettings() { + return getStubSettingsBuilder().createTransportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateTransport. */ + public UnaryCallSettings.Builder updateTransportSettings() { + return getStubSettingsBuilder().updateTransportSettings(); + } + + /** Returns the builder for the settings used for calls to updateTransport. */ + public OperationCallSettings.Builder + updateTransportOperationSettings() { + return getStubSettingsBuilder().updateTransportOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTransport. */ + public UnaryCallSettings.Builder deleteTransportSettings() { + return getStubSettingsBuilder().deleteTransportSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTransport. */ + public OperationCallSettings.Builder + deleteTransportOperationSettings() { + return getStubSettingsBuilder().deleteTransportOperationSettings(); + } + + /** 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 TransportManagerSettings build() throws IOException { + return new TransportManagerSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/gapic_metadata.json b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/gapic_metadata.json new file mode 100644 index 000000000000..59c015f8aeac --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/gapic_metadata.json @@ -0,0 +1,261 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.networkconnectivity.v1beta", + "libraryPackage": "com.google.cloud.networkconnectivity.v1beta", + "services": { + "DataTransferService": { + "clients": { + "grpc": { + "libraryClient": "DataTransferServiceClient", + "rpcs": { + "CreateDestination": { + "methods": ["createDestinationAsync", "createDestinationAsync", "createDestinationAsync", "createDestinationOperationCallable", "createDestinationCallable"] + }, + "CreateMulticloudDataTransferConfig": { + "methods": ["createMulticloudDataTransferConfigAsync", "createMulticloudDataTransferConfigAsync", "createMulticloudDataTransferConfigAsync", "createMulticloudDataTransferConfigOperationCallable", "createMulticloudDataTransferConfigCallable"] + }, + "DeleteDestination": { + "methods": ["deleteDestinationAsync", "deleteDestinationAsync", "deleteDestinationAsync", "deleteDestinationOperationCallable", "deleteDestinationCallable"] + }, + "DeleteMulticloudDataTransferConfig": { + "methods": ["deleteMulticloudDataTransferConfigAsync", "deleteMulticloudDataTransferConfigAsync", "deleteMulticloudDataTransferConfigAsync", "deleteMulticloudDataTransferConfigOperationCallable", "deleteMulticloudDataTransferConfigCallable"] + }, + "GetDestination": { + "methods": ["getDestination", "getDestination", "getDestination", "getDestinationCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetMulticloudDataTransferConfig": { + "methods": ["getMulticloudDataTransferConfig", "getMulticloudDataTransferConfig", "getMulticloudDataTransferConfig", "getMulticloudDataTransferConfigCallable"] + }, + "GetMulticloudDataTransferSupportedService": { + "methods": ["getMulticloudDataTransferSupportedService", "getMulticloudDataTransferSupportedService", "getMulticloudDataTransferSupportedService", "getMulticloudDataTransferSupportedServiceCallable"] + }, + "ListDestinations": { + "methods": ["listDestinations", "listDestinations", "listDestinations", "listDestinationsPagedCallable", "listDestinationsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListMulticloudDataTransferConfigs": { + "methods": ["listMulticloudDataTransferConfigs", "listMulticloudDataTransferConfigs", "listMulticloudDataTransferConfigs", "listMulticloudDataTransferConfigsPagedCallable", "listMulticloudDataTransferConfigsCallable"] + }, + "ListMulticloudDataTransferSupportedServices": { + "methods": ["listMulticloudDataTransferSupportedServices", "listMulticloudDataTransferSupportedServices", "listMulticloudDataTransferSupportedServices", "listMulticloudDataTransferSupportedServicesPagedCallable", "listMulticloudDataTransferSupportedServicesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateDestination": { + "methods": ["updateDestinationAsync", "updateDestinationAsync", "updateDestinationOperationCallable", "updateDestinationCallable"] + }, + "UpdateMulticloudDataTransferConfig": { + "methods": ["updateMulticloudDataTransferConfigAsync", "updateMulticloudDataTransferConfigAsync", "updateMulticloudDataTransferConfigOperationCallable", "updateMulticloudDataTransferConfigCallable"] + } + } + } + } + }, + "HubService": { + "clients": { + "grpc": { + "libraryClient": "HubServiceClient", + "rpcs": { + "AcceptHubSpoke": { + "methods": ["acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeAsync", "acceptHubSpokeOperationCallable", "acceptHubSpokeCallable"] + }, + "AcceptSpokeUpdate": { + "methods": ["acceptSpokeUpdateAsync", "acceptSpokeUpdateAsync", "acceptSpokeUpdateAsync", "acceptSpokeUpdateAsync", "acceptSpokeUpdateAsync", "acceptSpokeUpdateOperationCallable", "acceptSpokeUpdateCallable"] + }, + "CreateGatewayAdvertisedRoute": { + "methods": ["createGatewayAdvertisedRouteAsync", "createGatewayAdvertisedRouteAsync", "createGatewayAdvertisedRouteAsync", "createGatewayAdvertisedRouteOperationCallable", "createGatewayAdvertisedRouteCallable"] + }, + "CreateHub": { + "methods": ["createHubAsync", "createHubAsync", "createHubAsync", "createHubOperationCallable", "createHubCallable"] + }, + "CreateSpoke": { + "methods": ["createSpokeAsync", "createSpokeAsync", "createSpokeAsync", "createSpokeOperationCallable", "createSpokeCallable"] + }, + "DeleteGatewayAdvertisedRoute": { + "methods": ["deleteGatewayAdvertisedRouteAsync", "deleteGatewayAdvertisedRouteAsync", "deleteGatewayAdvertisedRouteAsync", "deleteGatewayAdvertisedRouteOperationCallable", "deleteGatewayAdvertisedRouteCallable"] + }, + "DeleteHub": { + "methods": ["deleteHubAsync", "deleteHubAsync", "deleteHubAsync", "deleteHubOperationCallable", "deleteHubCallable"] + }, + "DeleteSpoke": { + "methods": ["deleteSpokeAsync", "deleteSpokeAsync", "deleteSpokeAsync", "deleteSpokeOperationCallable", "deleteSpokeCallable"] + }, + "GetGatewayAdvertisedRoute": { + "methods": ["getGatewayAdvertisedRoute", "getGatewayAdvertisedRoute", "getGatewayAdvertisedRoute", "getGatewayAdvertisedRouteCallable"] + }, + "GetGroup": { + "methods": ["getGroup", "getGroup", "getGroup", "getGroupCallable"] + }, + "GetHub": { + "methods": ["getHub", "getHub", "getHub", "getHubCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetRoute": { + "methods": ["getRoute", "getRoute", "getRoute", "getRouteCallable"] + }, + "GetRouteTable": { + "methods": ["getRouteTable", "getRouteTable", "getRouteTable", "getRouteTableCallable"] + }, + "GetSpoke": { + "methods": ["getSpoke", "getSpoke", "getSpoke", "getSpokeCallable"] + }, + "ListGatewayAdvertisedRoutes": { + "methods": ["listGatewayAdvertisedRoutes", "listGatewayAdvertisedRoutes", "listGatewayAdvertisedRoutes", "listGatewayAdvertisedRoutesPagedCallable", "listGatewayAdvertisedRoutesCallable"] + }, + "ListGroups": { + "methods": ["listGroups", "listGroups", "listGroups", "listGroupsPagedCallable", "listGroupsCallable"] + }, + "ListHubSpokes": { + "methods": ["listHubSpokes", "listHubSpokes", "listHubSpokes", "listHubSpokesPagedCallable", "listHubSpokesCallable"] + }, + "ListHubs": { + "methods": ["listHubs", "listHubs", "listHubs", "listHubsPagedCallable", "listHubsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListRouteTables": { + "methods": ["listRouteTables", "listRouteTables", "listRouteTables", "listRouteTablesPagedCallable", "listRouteTablesCallable"] + }, + "ListRoutes": { + "methods": ["listRoutes", "listRoutes", "listRoutes", "listRoutesPagedCallable", "listRoutesCallable"] + }, + "ListSpokes": { + "methods": ["listSpokes", "listSpokes", "listSpokes", "listSpokesPagedCallable", "listSpokesCallable"] + }, + "QueryHubStatus": { + "methods": ["queryHubStatus", "queryHubStatus", "queryHubStatus", "queryHubStatusPagedCallable", "queryHubStatusCallable"] + }, + "RejectHubSpoke": { + "methods": ["rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeAsync", "rejectHubSpokeOperationCallable", "rejectHubSpokeCallable"] + }, + "RejectSpokeUpdate": { + "methods": ["rejectSpokeUpdateAsync", "rejectSpokeUpdateAsync", "rejectSpokeUpdateAsync", "rejectSpokeUpdateAsync", "rejectSpokeUpdateAsync", "rejectSpokeUpdateOperationCallable", "rejectSpokeUpdateCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateGatewayAdvertisedRoute": { + "methods": ["updateGatewayAdvertisedRouteAsync", "updateGatewayAdvertisedRouteAsync", "updateGatewayAdvertisedRouteOperationCallable", "updateGatewayAdvertisedRouteCallable"] + }, + "UpdateGroup": { + "methods": ["updateGroupAsync", "updateGroupAsync", "updateGroupOperationCallable", "updateGroupCallable"] + }, + "UpdateHub": { + "methods": ["updateHubAsync", "updateHubAsync", "updateHubOperationCallable", "updateHubCallable"] + }, + "UpdateSpoke": { + "methods": ["updateSpokeAsync", "updateSpokeAsync", "updateSpokeOperationCallable", "updateSpokeCallable"] + } + } + } + } + }, + "PolicyBasedRoutingService": { + "clients": { + "grpc": { + "libraryClient": "PolicyBasedRoutingServiceClient", + "rpcs": { + "CreatePolicyBasedRoute": { + "methods": ["createPolicyBasedRouteAsync", "createPolicyBasedRouteAsync", "createPolicyBasedRouteAsync", "createPolicyBasedRouteOperationCallable", "createPolicyBasedRouteCallable"] + }, + "DeletePolicyBasedRoute": { + "methods": ["deletePolicyBasedRouteAsync", "deletePolicyBasedRouteAsync", "deletePolicyBasedRouteAsync", "deletePolicyBasedRouteOperationCallable", "deletePolicyBasedRouteCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetPolicyBasedRoute": { + "methods": ["getPolicyBasedRoute", "getPolicyBasedRoute", "getPolicyBasedRoute", "getPolicyBasedRouteCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPolicyBasedRoutes": { + "methods": ["listPolicyBasedRoutes", "listPolicyBasedRoutes", "listPolicyBasedRoutes", "listPolicyBasedRoutesPagedCallable", "listPolicyBasedRoutesCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, + "TransportManager": { + "clients": { + "grpc": { + "libraryClient": "TransportManagerClient", + "rpcs": { + "CreateTransport": { + "methods": ["createTransportAsync", "createTransportAsync", "createTransportAsync", "createTransportOperationCallable", "createTransportCallable"] + }, + "DeleteTransport": { + "methods": ["deleteTransportAsync", "deleteTransportAsync", "deleteTransportAsync", "deleteTransportOperationCallable", "deleteTransportCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetRemoteTransportProfile": { + "methods": ["getRemoteTransportProfile", "getRemoteTransportProfile", "getRemoteTransportProfile", "getRemoteTransportProfileCallable"] + }, + "GetStatus": { + "methods": ["getStatus", "getStatus", "getStatus", "getStatusCallable"] + }, + "GetTransport": { + "methods": ["getTransport", "getTransport", "getTransport", "getTransportCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListRemoteTransportProfiles": { + "methods": ["listRemoteTransportProfiles", "listRemoteTransportProfiles", "listRemoteTransportProfiles", "listRemoteTransportProfilesPagedCallable", "listRemoteTransportProfilesCallable"] + }, + "ListTransports": { + "methods": ["listTransports", "listTransports", "listTransports", "listTransportsPagedCallable", "listTransportsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, + "UpdateTransport": { + "methods": ["updateTransportAsync", "updateTransportAsync", "updateTransportOperationCallable", "updateTransportCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/package-info.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/package-info.java new file mode 100644 index 000000000000..202cf54c1d48 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/package-info.java @@ -0,0 +1,106 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Network Connectivity API + * + *

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

======================= DataTransferServiceClient ======================= + * + *

Service Description: DataTransferService is the service for the Data Transfer API. + * + *

Sample for DataTransferServiceClient: + * + *

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

======================= HubServiceClient ======================= + * + *

Service Description: Network Connectivity Center is a hub-and-spoke abstraction for network + * connectivity management in Google Cloud. It reduces operational complexity through a simple, + * centralized connectivity management model. + * + *

Sample for HubServiceClient: + * + *

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

======================= PolicyBasedRoutingServiceClient ======================= + * + *

Service Description: Policy-Based Routing allows GCP customers to specify flexibile routing + * policies for Layer 4 traffic traversing through the connected service. + * + *

Sample for PolicyBasedRoutingServiceClient: + * + *

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

======================= TransportManagerClient ======================= + * + *

Service Description: The CLH based service for managing RemoteTransportProfiles and + * Transports. + * + *

Sample for TransportManagerClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) {
+ *   RemoteTransportProfileName name =
+ *       RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
+ *   RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.networkconnectivity.v1beta; + +import javax.annotation.Generated; diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStub.java new file mode 100644 index 000000000000..12519e3786e4 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStub.java @@ -0,0 +1,232 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListDestinationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +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 DataTransferService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class DataTransferServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMulticloudDataTransferConfigsPagedCallable()"); + } + + public UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMulticloudDataTransferConfigsCallable()"); + } + + public UnaryCallable + getMulticloudDataTransferConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: getMulticloudDataTransferConfigCallable()"); + } + + public OperationCallable< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMulticloudDataTransferConfigOperationCallable()"); + } + + public UnaryCallable + createMulticloudDataTransferConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: createMulticloudDataTransferConfigCallable()"); + } + + public OperationCallable< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMulticloudDataTransferConfigOperationCallable()"); + } + + public UnaryCallable + updateMulticloudDataTransferConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateMulticloudDataTransferConfigCallable()"); + } + + public OperationCallable + deleteMulticloudDataTransferConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteMulticloudDataTransferConfigOperationCallable()"); + } + + public UnaryCallable + deleteMulticloudDataTransferConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteMulticloudDataTransferConfigCallable()"); + } + + public UnaryCallable + listDestinationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDestinationsPagedCallable()"); + } + + public UnaryCallable + listDestinationsCallable() { + throw new UnsupportedOperationException("Not implemented: listDestinationsCallable()"); + } + + public UnaryCallable getDestinationCallable() { + throw new UnsupportedOperationException("Not implemented: getDestinationCallable()"); + } + + public OperationCallable + createDestinationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDestinationOperationCallable()"); + } + + public UnaryCallable createDestinationCallable() { + throw new UnsupportedOperationException("Not implemented: createDestinationCallable()"); + } + + public OperationCallable + updateDestinationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDestinationOperationCallable()"); + } + + public UnaryCallable updateDestinationCallable() { + throw new UnsupportedOperationException("Not implemented: updateDestinationCallable()"); + } + + public OperationCallable + deleteDestinationOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDestinationOperationCallable()"); + } + + public UnaryCallable deleteDestinationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDestinationCallable()"); + } + + public UnaryCallable< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceCallable() { + throw new UnsupportedOperationException( + "Not implemented: getMulticloudDataTransferSupportedServiceCallable()"); + } + + public UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMulticloudDataTransferSupportedServicesPagedCallable()"); + } + + public UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listMulticloudDataTransferSupportedServicesCallable()"); + } + + 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStubSettings.java new file mode 100644 index 000000000000..6f50906d7f88 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/DataTransferServiceStubSettings.java @@ -0,0 +1,1436 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListDestinationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link DataTransferServiceStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceStubSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceStubSettings.newBuilder();
+ * dataTransferServiceSettingsBuilder
+ *     .getMulticloudDataTransferConfigSettings()
+ *     .setRetrySettings(
+ *         dataTransferServiceSettingsBuilder
+ *             .getMulticloudDataTransferConfigSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * DataTransferServiceStubSettings dataTransferServiceSettings =
+ *     dataTransferServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceStubSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * dataTransferServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataTransferServiceStubSettings 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< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings; + private final UnaryCallSettings< + GetMulticloudDataTransferConfigRequest, MulticloudDataTransferConfig> + getMulticloudDataTransferConfigSettings; + private final UnaryCallSettings + createMulticloudDataTransferConfigSettings; + private final OperationCallSettings< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings; + private final UnaryCallSettings + updateMulticloudDataTransferConfigSettings; + private final OperationCallSettings< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings; + private final UnaryCallSettings + deleteMulticloudDataTransferConfigSettings; + private final OperationCallSettings< + DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata> + deleteMulticloudDataTransferConfigOperationSettings; + private final PagedCallSettings< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings; + private final UnaryCallSettings getDestinationSettings; + private final UnaryCallSettings createDestinationSettings; + private final OperationCallSettings + createDestinationOperationSettings; + private final UnaryCallSettings updateDestinationSettings; + private final OperationCallSettings + updateDestinationOperationSettings; + private final UnaryCallSettings deleteDestinationSettings; + private final OperationCallSettings + deleteDestinationOperationSettings; + private final UnaryCallSettings< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings; + private final PagedCallSettings< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings; + 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< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMulticloudDataTransferConfigsRequest injectToken( + ListMulticloudDataTransferConfigsRequest payload, String token) { + return ListMulticloudDataTransferConfigsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListMulticloudDataTransferConfigsRequest injectPageSize( + ListMulticloudDataTransferConfigsRequest payload, int pageSize) { + return ListMulticloudDataTransferConfigsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListMulticloudDataTransferConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListMulticloudDataTransferConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListMulticloudDataTransferConfigsResponse payload) { + return payload.getMulticloudDataTransferConfigsList(); + } + }; + + private static final PagedListDescriptor< + ListDestinationsRequest, ListDestinationsResponse, Destination> + LIST_DESTINATIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDestinationsRequest, ListDestinationsResponse, Destination>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDestinationsRequest injectToken( + ListDestinationsRequest payload, String token) { + return ListDestinationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDestinationsRequest injectPageSize( + ListDestinationsRequest payload, int pageSize) { + return ListDestinationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDestinationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDestinationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDestinationsResponse payload) { + return payload.getDestinationsList(); + } + }; + + private static final PagedListDescriptor< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListMulticloudDataTransferSupportedServicesRequest injectToken( + ListMulticloudDataTransferSupportedServicesRequest payload, String token) { + return ListMulticloudDataTransferSupportedServicesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListMulticloudDataTransferSupportedServicesRequest injectPageSize( + ListMulticloudDataTransferSupportedServicesRequest payload, int pageSize) { + return ListMulticloudDataTransferSupportedServicesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize( + ListMulticloudDataTransferSupportedServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken( + ListMulticloudDataTransferSupportedServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListMulticloudDataTransferSupportedServicesResponse payload) { + return payload.getMulticloudDataTransferSupportedServicesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse> + callable, + ListMulticloudDataTransferConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + MulticloudDataTransferConfig> + pageContext = + PageContext.create( + callable, + LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS_PAGE_STR_DESC, + request, + context); + return ListMulticloudDataTransferConfigsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + LIST_DESTINATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDestinationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_DESTINATIONS_PAGE_STR_DESC, request, context); + return ListDestinationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse>() { + @Override + public ApiFuture + getFuturePagedResponse( + UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + callable, + ListMulticloudDataTransferSupportedServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + MulticloudDataTransferSupportedService> + pageContext = + PageContext.create( + callable, + LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_PAGE_STR_DESC, + request, + context); + return ListMulticloudDataTransferSupportedServicesPagedResponse.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 listMulticloudDataTransferConfigs. */ + public PagedCallSettings< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings() { + return listMulticloudDataTransferConfigsSettings; + } + + /** Returns the object with the settings used for calls to getMulticloudDataTransferConfig. */ + public UnaryCallSettings + getMulticloudDataTransferConfigSettings() { + return getMulticloudDataTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to createMulticloudDataTransferConfig. */ + public UnaryCallSettings + createMulticloudDataTransferConfigSettings() { + return createMulticloudDataTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to createMulticloudDataTransferConfig. */ + public OperationCallSettings< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings() { + return createMulticloudDataTransferConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to updateMulticloudDataTransferConfig. */ + public UnaryCallSettings + updateMulticloudDataTransferConfigSettings() { + return updateMulticloudDataTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to updateMulticloudDataTransferConfig. */ + public OperationCallSettings< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings() { + return updateMulticloudDataTransferConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteMulticloudDataTransferConfig. */ + public UnaryCallSettings + deleteMulticloudDataTransferConfigSettings() { + return deleteMulticloudDataTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteMulticloudDataTransferConfig. */ + public OperationCallSettings + deleteMulticloudDataTransferConfigOperationSettings() { + return deleteMulticloudDataTransferConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to listDestinations. */ + public PagedCallSettings< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings() { + return listDestinationsSettings; + } + + /** Returns the object with the settings used for calls to getDestination. */ + public UnaryCallSettings getDestinationSettings() { + return getDestinationSettings; + } + + /** Returns the object with the settings used for calls to createDestination. */ + public UnaryCallSettings createDestinationSettings() { + return createDestinationSettings; + } + + /** Returns the object with the settings used for calls to createDestination. */ + public OperationCallSettings + createDestinationOperationSettings() { + return createDestinationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDestination. */ + public UnaryCallSettings updateDestinationSettings() { + return updateDestinationSettings; + } + + /** Returns the object with the settings used for calls to updateDestination. */ + public OperationCallSettings + updateDestinationOperationSettings() { + return updateDestinationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDestination. */ + public UnaryCallSettings deleteDestinationSettings() { + return deleteDestinationSettings; + } + + /** Returns the object with the settings used for calls to deleteDestination. */ + public OperationCallSettings + deleteDestinationOperationSettings() { + return deleteDestinationOperationSettings; + } + + /** + * Returns the object with the settings used for calls to + * getMulticloudDataTransferSupportedService. + */ + public UnaryCallSettings< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings() { + return getMulticloudDataTransferSupportedServiceSettings; + } + + /** + * Returns the object with the settings used for calls to + * listMulticloudDataTransferSupportedServices. + */ + public PagedCallSettings< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings() { + return listMulticloudDataTransferSupportedServicesSettings; + } + + /** 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 DataTransferServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataTransferServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "networkconnectivity"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "networkconnectivity.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkconnectivity.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataTransferServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 DataTransferServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listMulticloudDataTransferConfigsSettings = + settingsBuilder.listMulticloudDataTransferConfigsSettings().build(); + getMulticloudDataTransferConfigSettings = + settingsBuilder.getMulticloudDataTransferConfigSettings().build(); + createMulticloudDataTransferConfigSettings = + settingsBuilder.createMulticloudDataTransferConfigSettings().build(); + createMulticloudDataTransferConfigOperationSettings = + settingsBuilder.createMulticloudDataTransferConfigOperationSettings().build(); + updateMulticloudDataTransferConfigSettings = + settingsBuilder.updateMulticloudDataTransferConfigSettings().build(); + updateMulticloudDataTransferConfigOperationSettings = + settingsBuilder.updateMulticloudDataTransferConfigOperationSettings().build(); + deleteMulticloudDataTransferConfigSettings = + settingsBuilder.deleteMulticloudDataTransferConfigSettings().build(); + deleteMulticloudDataTransferConfigOperationSettings = + settingsBuilder.deleteMulticloudDataTransferConfigOperationSettings().build(); + listDestinationsSettings = settingsBuilder.listDestinationsSettings().build(); + getDestinationSettings = settingsBuilder.getDestinationSettings().build(); + createDestinationSettings = settingsBuilder.createDestinationSettings().build(); + createDestinationOperationSettings = + settingsBuilder.createDestinationOperationSettings().build(); + updateDestinationSettings = settingsBuilder.updateDestinationSettings().build(); + updateDestinationOperationSettings = + settingsBuilder.updateDestinationOperationSettings().build(); + deleteDestinationSettings = settingsBuilder.deleteDestinationSettings().build(); + deleteDestinationOperationSettings = + settingsBuilder.deleteDestinationOperationSettings().build(); + getMulticloudDataTransferSupportedServiceSettings = + settingsBuilder.getMulticloudDataTransferSupportedServiceSettings().build(); + listMulticloudDataTransferSupportedServicesSettings = + settingsBuilder.listMulticloudDataTransferSupportedServicesSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for DataTransferServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings; + private final UnaryCallSettings.Builder< + GetMulticloudDataTransferConfigRequest, MulticloudDataTransferConfig> + getMulticloudDataTransferConfigSettings; + private final UnaryCallSettings.Builder + createMulticloudDataTransferConfigSettings; + private final OperationCallSettings.Builder< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings; + private final UnaryCallSettings.Builder + updateMulticloudDataTransferConfigSettings; + private final OperationCallSettings.Builder< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings; + private final UnaryCallSettings.Builder + deleteMulticloudDataTransferConfigSettings; + private final OperationCallSettings.Builder< + DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata> + deleteMulticloudDataTransferConfigOperationSettings; + private final PagedCallSettings.Builder< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings; + private final UnaryCallSettings.Builder + getDestinationSettings; + private final UnaryCallSettings.Builder + createDestinationSettings; + private final OperationCallSettings.Builder< + CreateDestinationRequest, Destination, OperationMetadata> + createDestinationOperationSettings; + private final UnaryCallSettings.Builder + updateDestinationSettings; + private final OperationCallSettings.Builder< + UpdateDestinationRequest, Destination, OperationMetadata> + updateDestinationOperationSettings; + private final UnaryCallSettings.Builder + deleteDestinationSettings; + private final OperationCallSettings.Builder + deleteDestinationOperationSettings; + private final UnaryCallSettings.Builder< + GetMulticloudDataTransferSupportedServiceRequest, + MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings; + private final PagedCallSettings.Builder< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings; + 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_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listMulticloudDataTransferConfigsSettings = + PagedCallSettings.newBuilder(LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS_PAGE_STR_FACT); + getMulticloudDataTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMulticloudDataTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createMulticloudDataTransferConfigOperationSettings = OperationCallSettings.newBuilder(); + updateMulticloudDataTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateMulticloudDataTransferConfigOperationSettings = OperationCallSettings.newBuilder(); + deleteMulticloudDataTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteMulticloudDataTransferConfigOperationSettings = OperationCallSettings.newBuilder(); + listDestinationsSettings = PagedCallSettings.newBuilder(LIST_DESTINATIONS_PAGE_STR_FACT); + getDestinationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDestinationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDestinationOperationSettings = OperationCallSettings.newBuilder(); + updateDestinationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDestinationOperationSettings = OperationCallSettings.newBuilder(); + deleteDestinationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDestinationOperationSettings = OperationCallSettings.newBuilder(); + getMulticloudDataTransferSupportedServiceSettings = + UnaryCallSettings.newUnaryCallSettingsBuilder(); + listMulticloudDataTransferSupportedServicesSettings = + PagedCallSettings.newBuilder( + LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_PAGE_STR_FACT); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listMulticloudDataTransferConfigsSettings, + getMulticloudDataTransferConfigSettings, + createMulticloudDataTransferConfigSettings, + updateMulticloudDataTransferConfigSettings, + deleteMulticloudDataTransferConfigSettings, + listDestinationsSettings, + getDestinationSettings, + createDestinationSettings, + updateDestinationSettings, + deleteDestinationSettings, + getMulticloudDataTransferSupportedServiceSettings, + listMulticloudDataTransferSupportedServicesSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(DataTransferServiceStubSettings settings) { + super(settings); + + listMulticloudDataTransferConfigsSettings = + settings.listMulticloudDataTransferConfigsSettings.toBuilder(); + getMulticloudDataTransferConfigSettings = + settings.getMulticloudDataTransferConfigSettings.toBuilder(); + createMulticloudDataTransferConfigSettings = + settings.createMulticloudDataTransferConfigSettings.toBuilder(); + createMulticloudDataTransferConfigOperationSettings = + settings.createMulticloudDataTransferConfigOperationSettings.toBuilder(); + updateMulticloudDataTransferConfigSettings = + settings.updateMulticloudDataTransferConfigSettings.toBuilder(); + updateMulticloudDataTransferConfigOperationSettings = + settings.updateMulticloudDataTransferConfigOperationSettings.toBuilder(); + deleteMulticloudDataTransferConfigSettings = + settings.deleteMulticloudDataTransferConfigSettings.toBuilder(); + deleteMulticloudDataTransferConfigOperationSettings = + settings.deleteMulticloudDataTransferConfigOperationSettings.toBuilder(); + listDestinationsSettings = settings.listDestinationsSettings.toBuilder(); + getDestinationSettings = settings.getDestinationSettings.toBuilder(); + createDestinationSettings = settings.createDestinationSettings.toBuilder(); + createDestinationOperationSettings = settings.createDestinationOperationSettings.toBuilder(); + updateDestinationSettings = settings.updateDestinationSettings.toBuilder(); + updateDestinationOperationSettings = settings.updateDestinationOperationSettings.toBuilder(); + deleteDestinationSettings = settings.deleteDestinationSettings.toBuilder(); + deleteDestinationOperationSettings = settings.deleteDestinationOperationSettings.toBuilder(); + getMulticloudDataTransferSupportedServiceSettings = + settings.getMulticloudDataTransferSupportedServiceSettings.toBuilder(); + listMulticloudDataTransferSupportedServicesSettings = + settings.listMulticloudDataTransferSupportedServicesSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listMulticloudDataTransferConfigsSettings, + getMulticloudDataTransferConfigSettings, + createMulticloudDataTransferConfigSettings, + updateMulticloudDataTransferConfigSettings, + deleteMulticloudDataTransferConfigSettings, + listDestinationsSettings, + getDestinationSettings, + createDestinationSettings, + updateDestinationSettings, + deleteDestinationSettings, + getMulticloudDataTransferSupportedServiceSettings, + listMulticloudDataTransferSupportedServicesSettings, + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listMulticloudDataTransferConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getMulticloudDataTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createMulticloudDataTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateMulticloudDataTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteMulticloudDataTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listDestinationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getDestinationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .createDestinationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateDestinationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteDestinationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getMulticloudDataTransferSupportedServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listMulticloudDataTransferSupportedServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createMulticloudDataTransferConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + MulticloudDataTransferConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateMulticloudDataTransferConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + MulticloudDataTransferConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteMulticloudDataTransferConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createDestinationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Destination.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateDestinationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Destination.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteDestinationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + 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 listMulticloudDataTransferConfigs. */ + public PagedCallSettings.Builder< + ListMulticloudDataTransferConfigsRequest, + ListMulticloudDataTransferConfigsResponse, + ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsSettings() { + return listMulticloudDataTransferConfigsSettings; + } + + /** Returns the builder for the settings used for calls to getMulticloudDataTransferConfig. */ + public UnaryCallSettings.Builder< + GetMulticloudDataTransferConfigRequest, MulticloudDataTransferConfig> + getMulticloudDataTransferConfigSettings() { + return getMulticloudDataTransferConfigSettings; + } + + /** + * Returns the builder for the settings used for calls to createMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + createMulticloudDataTransferConfigSettings() { + return createMulticloudDataTransferConfigSettings; + } + + /** + * Returns the builder for the settings used for calls to createMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationSettings() { + return createMulticloudDataTransferConfigOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to updateMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + updateMulticloudDataTransferConfigSettings() { + return updateMulticloudDataTransferConfigSettings; + } + + /** + * Returns the builder for the settings used for calls to updateMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationSettings() { + return updateMulticloudDataTransferConfigOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to deleteMulticloudDataTransferConfig. + */ + public UnaryCallSettings.Builder + deleteMulticloudDataTransferConfigSettings() { + return deleteMulticloudDataTransferConfigSettings; + } + + /** + * Returns the builder for the settings used for calls to deleteMulticloudDataTransferConfig. + */ + public OperationCallSettings.Builder< + DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata> + deleteMulticloudDataTransferConfigOperationSettings() { + return deleteMulticloudDataTransferConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDestinations. */ + public PagedCallSettings.Builder< + ListDestinationsRequest, ListDestinationsResponse, ListDestinationsPagedResponse> + listDestinationsSettings() { + return listDestinationsSettings; + } + + /** Returns the builder for the settings used for calls to getDestination. */ + public UnaryCallSettings.Builder getDestinationSettings() { + return getDestinationSettings; + } + + /** Returns the builder for the settings used for calls to createDestination. */ + public UnaryCallSettings.Builder + createDestinationSettings() { + return createDestinationSettings; + } + + /** Returns the builder for the settings used for calls to createDestination. */ + public OperationCallSettings.Builder + createDestinationOperationSettings() { + return createDestinationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDestination. */ + public UnaryCallSettings.Builder + updateDestinationSettings() { + return updateDestinationSettings; + } + + /** Returns the builder for the settings used for calls to updateDestination. */ + public OperationCallSettings.Builder + updateDestinationOperationSettings() { + return updateDestinationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDestination. */ + public UnaryCallSettings.Builder + deleteDestinationSettings() { + return deleteDestinationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDestination. */ + public OperationCallSettings.Builder + deleteDestinationOperationSettings() { + return deleteDestinationOperationSettings; + } + + /** + * Returns the builder for the settings used for calls to + * getMulticloudDataTransferSupportedService. + */ + public UnaryCallSettings.Builder< + GetMulticloudDataTransferSupportedServiceRequest, + MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceSettings() { + return getMulticloudDataTransferSupportedServiceSettings; + } + + /** + * Returns the builder for the settings used for calls to + * listMulticloudDataTransferSupportedServices. + */ + public PagedCallSettings.Builder< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesSettings() { + return listMulticloudDataTransferSupportedServicesSettings; + } + + /** 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 DataTransferServiceStubSettings build() throws IOException { + return new DataTransferServiceStubSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceCallableFactory.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceCallableFactory.java new file mode 100644 index 000000000000..6209231b250f --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the DataTransferService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataTransferServiceCallableFactory 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceStub.java new file mode 100644 index 000000000000..b0774313c2a3 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcDataTransferServiceStub.java @@ -0,0 +1,942 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListDestinationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +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 DataTransferService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcDataTransferServiceStub extends DataTransferServiceStub { + private static final MethodDescriptor< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/ListMulticloudDataTransferConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListMulticloudDataTransferConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListMulticloudDataTransferConfigsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + GetMulticloudDataTransferConfigRequest, MulticloudDataTransferConfig> + getMulticloudDataTransferConfigMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/GetMulticloudDataTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(MulticloudDataTransferConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createMulticloudDataTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/CreateMulticloudDataTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + CreateMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateMulticloudDataTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/UpdateMulticloudDataTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdateMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteMulticloudDataTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/DeleteMulticloudDataTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + DeleteMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listDestinationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/ListDestinations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDestinationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDestinationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getDestinationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/GetDestination") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDestinationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Destination.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createDestinationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/CreateDestination") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDestinationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateDestinationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/UpdateDestination") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDestinationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteDestinationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/DeleteDestination") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDestinationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/GetMulticloudDataTransferSupportedService") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetMulticloudDataTransferSupportedServiceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + MulticloudDataTransferSupportedService.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.DataTransferService/ListMulticloudDataTransferSupportedServices") + .setRequestMarshaller( + ProtoUtils.marshaller( + ListMulticloudDataTransferSupportedServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + ListMulticloudDataTransferSupportedServicesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsCallable; + private final UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsPagedCallable; + private final UnaryCallable + getMulticloudDataTransferConfigCallable; + private final UnaryCallable + createMulticloudDataTransferConfigCallable; + private final OperationCallable< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationCallable; + private final UnaryCallable + updateMulticloudDataTransferConfigCallable; + private final OperationCallable< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationCallable; + private final UnaryCallable + deleteMulticloudDataTransferConfigCallable; + private final OperationCallable< + DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata> + deleteMulticloudDataTransferConfigOperationCallable; + private final UnaryCallable + listDestinationsCallable; + private final UnaryCallable + listDestinationsPagedCallable; + private final UnaryCallable getDestinationCallable; + private final UnaryCallable createDestinationCallable; + private final OperationCallable + createDestinationOperationCallable; + private final UnaryCallable updateDestinationCallable; + private final OperationCallable + updateDestinationOperationCallable; + private final UnaryCallable deleteDestinationCallable; + private final OperationCallable + deleteDestinationOperationCallable; + private final UnaryCallable< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceCallable; + private final UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesCallable; + private final UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesPagedCallable; + 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 GrpcDataTransferServiceStub create(DataTransferServiceStubSettings settings) + throws IOException { + return new GrpcDataTransferServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataTransferServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataTransferServiceStub( + DataTransferServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataTransferServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataTransferServiceStub( + DataTransferServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataTransferServiceStub, 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 GrpcDataTransferServiceStub( + DataTransferServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataTransferServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataTransferServiceStub, 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 GrpcDataTransferServiceStub( + DataTransferServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listMulticloudDataTransferConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getMulticloudDataTransferConfigTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getMulticloudDataTransferConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createMulticloudDataTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createMulticloudDataTransferConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateMulticloudDataTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateMulticloudDataTransferConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "multicloud_data_transfer_config.name", + String.valueOf(request.getMulticloudDataTransferConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteMulticloudDataTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteMulticloudDataTransferConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDestinationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDestinationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDestinationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDestinationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDestinationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDestinationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDestinationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDestinationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "destination.name", String.valueOf(request.getDestination().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDestinationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDestinationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings< + GetMulticloudDataTransferSupportedServiceRequest, + MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(getMulticloudDataTransferSupportedServiceMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listMulticloudDataTransferSupportedServicesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + 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.listMulticloudDataTransferConfigsCallable = + callableFactory.createUnaryCallable( + listMulticloudDataTransferConfigsTransportSettings, + settings.listMulticloudDataTransferConfigsSettings(), + clientContext); + this.listMulticloudDataTransferConfigsPagedCallable = + callableFactory.createPagedCallable( + listMulticloudDataTransferConfigsTransportSettings, + settings.listMulticloudDataTransferConfigsSettings(), + clientContext); + this.getMulticloudDataTransferConfigCallable = + callableFactory.createUnaryCallable( + getMulticloudDataTransferConfigTransportSettings, + settings.getMulticloudDataTransferConfigSettings(), + clientContext); + this.createMulticloudDataTransferConfigCallable = + callableFactory.createUnaryCallable( + createMulticloudDataTransferConfigTransportSettings, + settings.createMulticloudDataTransferConfigSettings(), + clientContext); + this.createMulticloudDataTransferConfigOperationCallable = + callableFactory.createOperationCallable( + createMulticloudDataTransferConfigTransportSettings, + settings.createMulticloudDataTransferConfigOperationSettings(), + clientContext, + operationsStub); + this.updateMulticloudDataTransferConfigCallable = + callableFactory.createUnaryCallable( + updateMulticloudDataTransferConfigTransportSettings, + settings.updateMulticloudDataTransferConfigSettings(), + clientContext); + this.updateMulticloudDataTransferConfigOperationCallable = + callableFactory.createOperationCallable( + updateMulticloudDataTransferConfigTransportSettings, + settings.updateMulticloudDataTransferConfigOperationSettings(), + clientContext, + operationsStub); + this.deleteMulticloudDataTransferConfigCallable = + callableFactory.createUnaryCallable( + deleteMulticloudDataTransferConfigTransportSettings, + settings.deleteMulticloudDataTransferConfigSettings(), + clientContext); + this.deleteMulticloudDataTransferConfigOperationCallable = + callableFactory.createOperationCallable( + deleteMulticloudDataTransferConfigTransportSettings, + settings.deleteMulticloudDataTransferConfigOperationSettings(), + clientContext, + operationsStub); + this.listDestinationsCallable = + callableFactory.createUnaryCallable( + listDestinationsTransportSettings, settings.listDestinationsSettings(), clientContext); + this.listDestinationsPagedCallable = + callableFactory.createPagedCallable( + listDestinationsTransportSettings, settings.listDestinationsSettings(), clientContext); + this.getDestinationCallable = + callableFactory.createUnaryCallable( + getDestinationTransportSettings, settings.getDestinationSettings(), clientContext); + this.createDestinationCallable = + callableFactory.createUnaryCallable( + createDestinationTransportSettings, + settings.createDestinationSettings(), + clientContext); + this.createDestinationOperationCallable = + callableFactory.createOperationCallable( + createDestinationTransportSettings, + settings.createDestinationOperationSettings(), + clientContext, + operationsStub); + this.updateDestinationCallable = + callableFactory.createUnaryCallable( + updateDestinationTransportSettings, + settings.updateDestinationSettings(), + clientContext); + this.updateDestinationOperationCallable = + callableFactory.createOperationCallable( + updateDestinationTransportSettings, + settings.updateDestinationOperationSettings(), + clientContext, + operationsStub); + this.deleteDestinationCallable = + callableFactory.createUnaryCallable( + deleteDestinationTransportSettings, + settings.deleteDestinationSettings(), + clientContext); + this.deleteDestinationOperationCallable = + callableFactory.createOperationCallable( + deleteDestinationTransportSettings, + settings.deleteDestinationOperationSettings(), + clientContext, + operationsStub); + this.getMulticloudDataTransferSupportedServiceCallable = + callableFactory.createUnaryCallable( + getMulticloudDataTransferSupportedServiceTransportSettings, + settings.getMulticloudDataTransferSupportedServiceSettings(), + clientContext); + this.listMulticloudDataTransferSupportedServicesCallable = + callableFactory.createUnaryCallable( + listMulticloudDataTransferSupportedServicesTransportSettings, + settings.listMulticloudDataTransferSupportedServicesSettings(), + clientContext); + this.listMulticloudDataTransferSupportedServicesPagedCallable = + callableFactory.createPagedCallable( + listMulticloudDataTransferSupportedServicesTransportSettings, + settings.listMulticloudDataTransferSupportedServicesSettings(), + 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< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigsCallable() { + return listMulticloudDataTransferConfigsCallable; + } + + @Override + public UnaryCallable< + ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsPagedResponse> + listMulticloudDataTransferConfigsPagedCallable() { + return listMulticloudDataTransferConfigsPagedCallable; + } + + @Override + public UnaryCallable + getMulticloudDataTransferConfigCallable() { + return getMulticloudDataTransferConfigCallable; + } + + @Override + public UnaryCallable + createMulticloudDataTransferConfigCallable() { + return createMulticloudDataTransferConfigCallable; + } + + @Override + public OperationCallable< + CreateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + createMulticloudDataTransferConfigOperationCallable() { + return createMulticloudDataTransferConfigOperationCallable; + } + + @Override + public UnaryCallable + updateMulticloudDataTransferConfigCallable() { + return updateMulticloudDataTransferConfigCallable; + } + + @Override + public OperationCallable< + UpdateMulticloudDataTransferConfigRequest, + MulticloudDataTransferConfig, + OperationMetadata> + updateMulticloudDataTransferConfigOperationCallable() { + return updateMulticloudDataTransferConfigOperationCallable; + } + + @Override + public UnaryCallable + deleteMulticloudDataTransferConfigCallable() { + return deleteMulticloudDataTransferConfigCallable; + } + + @Override + public OperationCallable + deleteMulticloudDataTransferConfigOperationCallable() { + return deleteMulticloudDataTransferConfigOperationCallable; + } + + @Override + public UnaryCallable + listDestinationsCallable() { + return listDestinationsCallable; + } + + @Override + public UnaryCallable + listDestinationsPagedCallable() { + return listDestinationsPagedCallable; + } + + @Override + public UnaryCallable getDestinationCallable() { + return getDestinationCallable; + } + + @Override + public UnaryCallable createDestinationCallable() { + return createDestinationCallable; + } + + @Override + public OperationCallable + createDestinationOperationCallable() { + return createDestinationOperationCallable; + } + + @Override + public UnaryCallable updateDestinationCallable() { + return updateDestinationCallable; + } + + @Override + public OperationCallable + updateDestinationOperationCallable() { + return updateDestinationOperationCallable; + } + + @Override + public UnaryCallable deleteDestinationCallable() { + return deleteDestinationCallable; + } + + @Override + public OperationCallable + deleteDestinationOperationCallable() { + return deleteDestinationOperationCallable; + } + + @Override + public UnaryCallable< + GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServiceCallable() { + return getMulticloudDataTransferSupportedServiceCallable; + } + + @Override + public UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServicesCallable() { + return listMulticloudDataTransferSupportedServicesCallable; + } + + @Override + public UnaryCallable< + ListMulticloudDataTransferSupportedServicesRequest, + ListMulticloudDataTransferSupportedServicesPagedResponse> + listMulticloudDataTransferSupportedServicesPagedCallable() { + return listMulticloudDataTransferSupportedServicesPagedCallable; + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceCallableFactory.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceCallableFactory.java new file mode 100644 index 000000000000..33d09d141e0e --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the HubService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcHubServiceCallableFactory 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceStub.java new file mode 100644 index 000000000000..04e80e33be99 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcHubServiceStub.java @@ -0,0 +1,1514 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGatewayAdvertisedRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.QueryHubStatusPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.GetHubRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest; +import com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +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 HubService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcHubServiceStub extends HubServiceStub { + private static final MethodDescriptor + listHubsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/ListHubs") + .setRequestMarshaller(ProtoUtils.marshaller(ListHubsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListHubsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getHubMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/GetHub") + .setRequestMarshaller(ProtoUtils.marshaller(GetHubRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Hub.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor createHubMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/CreateHub") + .setRequestMarshaller(ProtoUtils.marshaller(CreateHubRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateHubMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/UpdateHub") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateHubRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteHubMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/DeleteHub") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteHubRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listHubSpokesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/ListHubSpokes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListHubSpokesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListHubSpokesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + queryHubStatusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/QueryHubStatus") + .setRequestMarshaller( + ProtoUtils.marshaller(QueryHubStatusRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(QueryHubStatusResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listSpokesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/ListSpokes") + .setRequestMarshaller(ProtoUtils.marshaller(ListSpokesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListSpokesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/GetSpoke") + .setRequestMarshaller(ProtoUtils.marshaller(GetSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Spoke.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor createSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/CreateSpoke") + .setRequestMarshaller(ProtoUtils.marshaller(CreateSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/UpdateSpoke") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + rejectHubSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/RejectHubSpoke") + .setRequestMarshaller( + ProtoUtils.marshaller(RejectHubSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + acceptHubSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/AcceptHubSpoke") + .setRequestMarshaller( + ProtoUtils.marshaller(AcceptHubSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + acceptSpokeUpdateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/AcceptSpokeUpdate") + .setRequestMarshaller( + ProtoUtils.marshaller(AcceptSpokeUpdateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + rejectSpokeUpdateMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/RejectSpokeUpdate") + .setRequestMarshaller( + ProtoUtils.marshaller(RejectSpokeUpdateRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor deleteSpokeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/DeleteSpoke") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSpokeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getRouteTableMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/GetRouteTable") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRouteTableRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RouteTable.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/GetRoute") + .setRequestMarshaller(ProtoUtils.marshaller(GetRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Route.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listRoutesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/ListRoutes") + .setRequestMarshaller(ProtoUtils.marshaller(ListRoutesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListRoutesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listRouteTablesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/ListRouteTables") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRouteTablesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRouteTablesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor getGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/GetGroup") + .setRequestMarshaller(ProtoUtils.marshaller(GetGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Group.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/ListGroups") + .setRequestMarshaller(ProtoUtils.marshaller(ListGroupsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListGroupsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor updateGroupMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkconnectivity.v1beta.HubService/UpdateGroup") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateGroupRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createGatewayAdvertisedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/CreateGatewayAdvertisedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getGatewayAdvertisedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/GetGatewayAdvertisedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(GetGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GatewayAdvertisedRoute.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesResponse> + listGatewayAdvertisedRoutesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/ListGatewayAdvertisedRoutes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListGatewayAdvertisedRoutesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListGatewayAdvertisedRoutesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateGatewayAdvertisedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/UpdateGatewayAdvertisedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteGatewayAdvertisedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.HubService/DeleteGatewayAdvertisedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable listHubsCallable; + private final UnaryCallable listHubsPagedCallable; + private final UnaryCallable getHubCallable; + private final UnaryCallable createHubCallable; + private final OperationCallable + createHubOperationCallable; + private final UnaryCallable updateHubCallable; + private final OperationCallable + updateHubOperationCallable; + private final UnaryCallable deleteHubCallable; + private final OperationCallable + deleteHubOperationCallable; + private final UnaryCallable listHubSpokesCallable; + private final UnaryCallable + listHubSpokesPagedCallable; + private final UnaryCallable queryHubStatusCallable; + private final UnaryCallable + queryHubStatusPagedCallable; + private final UnaryCallable listSpokesCallable; + private final UnaryCallable listSpokesPagedCallable; + private final UnaryCallable getSpokeCallable; + private final UnaryCallable createSpokeCallable; + private final OperationCallable + createSpokeOperationCallable; + private final UnaryCallable updateSpokeCallable; + private final OperationCallable + updateSpokeOperationCallable; + private final UnaryCallable rejectHubSpokeCallable; + private final OperationCallable + rejectHubSpokeOperationCallable; + private final UnaryCallable acceptHubSpokeCallable; + private final OperationCallable + acceptHubSpokeOperationCallable; + private final UnaryCallable acceptSpokeUpdateCallable; + private final OperationCallable< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationCallable; + private final UnaryCallable rejectSpokeUpdateCallable; + private final OperationCallable< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationCallable; + private final UnaryCallable deleteSpokeCallable; + private final OperationCallable + deleteSpokeOperationCallable; + private final UnaryCallable getRouteTableCallable; + private final UnaryCallable getRouteCallable; + private final UnaryCallable listRoutesCallable; + private final UnaryCallable listRoutesPagedCallable; + private final UnaryCallable + listRouteTablesCallable; + private final UnaryCallable + listRouteTablesPagedCallable; + private final UnaryCallable getGroupCallable; + private final UnaryCallable listGroupsCallable; + private final UnaryCallable listGroupsPagedCallable; + private final UnaryCallable updateGroupCallable; + private final OperationCallable + updateGroupOperationCallable; + private final UnaryCallable + createGatewayAdvertisedRouteCallable; + private final OperationCallable< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationCallable; + private final UnaryCallable + getGatewayAdvertisedRouteCallable; + private final UnaryCallable< + ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesResponse> + listGatewayAdvertisedRoutesCallable; + private final UnaryCallable< + ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesPagedCallable; + private final UnaryCallable + updateGatewayAdvertisedRouteCallable; + private final OperationCallable< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationCallable; + private final UnaryCallable + deleteGatewayAdvertisedRouteCallable; + private final OperationCallable + deleteGatewayAdvertisedRouteOperationCallable; + 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 GrpcHubServiceStub create(HubServiceStubSettings settings) + throws IOException { + return new GrpcHubServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcHubServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcHubServiceStub(HubServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcHubServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcHubServiceStub( + HubServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcHubServiceStub, 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 GrpcHubServiceStub(HubServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcHubServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcHubServiceStub, 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 GrpcHubServiceStub( + HubServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listHubsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listHubsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getHubTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getHubMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createHubTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createHubMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateHubTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateHubMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("hub.name", String.valueOf(request.getHub().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteHubTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteHubMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listHubSpokesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listHubSpokesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + queryHubStatusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(queryHubStatusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listSpokesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSpokesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("spoke.name", String.valueOf(request.getSpoke().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings rejectHubSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rejectHubSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings acceptHubSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acceptHubSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings acceptSpokeUpdateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acceptSpokeUpdateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings rejectSpokeUpdateTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rejectSpokeUpdateMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSpokeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSpokeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRouteTableTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRouteTableMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listRoutesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRoutesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listRouteTablesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listRouteTablesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateGroupTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGroupMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("group.name", String.valueOf(request.getGroup().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createGatewayAdvertisedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createGatewayAdvertisedRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getGatewayAdvertisedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getGatewayAdvertisedRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listGatewayAdvertisedRoutesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listGatewayAdvertisedRoutesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateGatewayAdvertisedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateGatewayAdvertisedRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "gateway_advertised_route.name", + String.valueOf(request.getGatewayAdvertisedRoute().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteGatewayAdvertisedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteGatewayAdvertisedRouteMethodDescriptor) + .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.listHubsCallable = + callableFactory.createUnaryCallable( + listHubsTransportSettings, settings.listHubsSettings(), clientContext); + this.listHubsPagedCallable = + callableFactory.createPagedCallable( + listHubsTransportSettings, settings.listHubsSettings(), clientContext); + this.getHubCallable = + callableFactory.createUnaryCallable( + getHubTransportSettings, settings.getHubSettings(), clientContext); + this.createHubCallable = + callableFactory.createUnaryCallable( + createHubTransportSettings, settings.createHubSettings(), clientContext); + this.createHubOperationCallable = + callableFactory.createOperationCallable( + createHubTransportSettings, + settings.createHubOperationSettings(), + clientContext, + operationsStub); + this.updateHubCallable = + callableFactory.createUnaryCallable( + updateHubTransportSettings, settings.updateHubSettings(), clientContext); + this.updateHubOperationCallable = + callableFactory.createOperationCallable( + updateHubTransportSettings, + settings.updateHubOperationSettings(), + clientContext, + operationsStub); + this.deleteHubCallable = + callableFactory.createUnaryCallable( + deleteHubTransportSettings, settings.deleteHubSettings(), clientContext); + this.deleteHubOperationCallable = + callableFactory.createOperationCallable( + deleteHubTransportSettings, + settings.deleteHubOperationSettings(), + clientContext, + operationsStub); + this.listHubSpokesCallable = + callableFactory.createUnaryCallable( + listHubSpokesTransportSettings, settings.listHubSpokesSettings(), clientContext); + this.listHubSpokesPagedCallable = + callableFactory.createPagedCallable( + listHubSpokesTransportSettings, settings.listHubSpokesSettings(), clientContext); + this.queryHubStatusCallable = + callableFactory.createUnaryCallable( + queryHubStatusTransportSettings, settings.queryHubStatusSettings(), clientContext); + this.queryHubStatusPagedCallable = + callableFactory.createPagedCallable( + queryHubStatusTransportSettings, settings.queryHubStatusSettings(), clientContext); + this.listSpokesCallable = + callableFactory.createUnaryCallable( + listSpokesTransportSettings, settings.listSpokesSettings(), clientContext); + this.listSpokesPagedCallable = + callableFactory.createPagedCallable( + listSpokesTransportSettings, settings.listSpokesSettings(), clientContext); + this.getSpokeCallable = + callableFactory.createUnaryCallable( + getSpokeTransportSettings, settings.getSpokeSettings(), clientContext); + this.createSpokeCallable = + callableFactory.createUnaryCallable( + createSpokeTransportSettings, settings.createSpokeSettings(), clientContext); + this.createSpokeOperationCallable = + callableFactory.createOperationCallable( + createSpokeTransportSettings, + settings.createSpokeOperationSettings(), + clientContext, + operationsStub); + this.updateSpokeCallable = + callableFactory.createUnaryCallable( + updateSpokeTransportSettings, settings.updateSpokeSettings(), clientContext); + this.updateSpokeOperationCallable = + callableFactory.createOperationCallable( + updateSpokeTransportSettings, + settings.updateSpokeOperationSettings(), + clientContext, + operationsStub); + this.rejectHubSpokeCallable = + callableFactory.createUnaryCallable( + rejectHubSpokeTransportSettings, settings.rejectHubSpokeSettings(), clientContext); + this.rejectHubSpokeOperationCallable = + callableFactory.createOperationCallable( + rejectHubSpokeTransportSettings, + settings.rejectHubSpokeOperationSettings(), + clientContext, + operationsStub); + this.acceptHubSpokeCallable = + callableFactory.createUnaryCallable( + acceptHubSpokeTransportSettings, settings.acceptHubSpokeSettings(), clientContext); + this.acceptHubSpokeOperationCallable = + callableFactory.createOperationCallable( + acceptHubSpokeTransportSettings, + settings.acceptHubSpokeOperationSettings(), + clientContext, + operationsStub); + this.acceptSpokeUpdateCallable = + callableFactory.createUnaryCallable( + acceptSpokeUpdateTransportSettings, + settings.acceptSpokeUpdateSettings(), + clientContext); + this.acceptSpokeUpdateOperationCallable = + callableFactory.createOperationCallable( + acceptSpokeUpdateTransportSettings, + settings.acceptSpokeUpdateOperationSettings(), + clientContext, + operationsStub); + this.rejectSpokeUpdateCallable = + callableFactory.createUnaryCallable( + rejectSpokeUpdateTransportSettings, + settings.rejectSpokeUpdateSettings(), + clientContext); + this.rejectSpokeUpdateOperationCallable = + callableFactory.createOperationCallable( + rejectSpokeUpdateTransportSettings, + settings.rejectSpokeUpdateOperationSettings(), + clientContext, + operationsStub); + this.deleteSpokeCallable = + callableFactory.createUnaryCallable( + deleteSpokeTransportSettings, settings.deleteSpokeSettings(), clientContext); + this.deleteSpokeOperationCallable = + callableFactory.createOperationCallable( + deleteSpokeTransportSettings, + settings.deleteSpokeOperationSettings(), + clientContext, + operationsStub); + this.getRouteTableCallable = + callableFactory.createUnaryCallable( + getRouteTableTransportSettings, settings.getRouteTableSettings(), clientContext); + this.getRouteCallable = + callableFactory.createUnaryCallable( + getRouteTransportSettings, settings.getRouteSettings(), clientContext); + this.listRoutesCallable = + callableFactory.createUnaryCallable( + listRoutesTransportSettings, settings.listRoutesSettings(), clientContext); + this.listRoutesPagedCallable = + callableFactory.createPagedCallable( + listRoutesTransportSettings, settings.listRoutesSettings(), clientContext); + this.listRouteTablesCallable = + callableFactory.createUnaryCallable( + listRouteTablesTransportSettings, settings.listRouteTablesSettings(), clientContext); + this.listRouteTablesPagedCallable = + callableFactory.createPagedCallable( + listRouteTablesTransportSettings, settings.listRouteTablesSettings(), clientContext); + this.getGroupCallable = + callableFactory.createUnaryCallable( + getGroupTransportSettings, settings.getGroupSettings(), clientContext); + this.listGroupsCallable = + callableFactory.createUnaryCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.listGroupsPagedCallable = + callableFactory.createPagedCallable( + listGroupsTransportSettings, settings.listGroupsSettings(), clientContext); + this.updateGroupCallable = + callableFactory.createUnaryCallable( + updateGroupTransportSettings, settings.updateGroupSettings(), clientContext); + this.updateGroupOperationCallable = + callableFactory.createOperationCallable( + updateGroupTransportSettings, + settings.updateGroupOperationSettings(), + clientContext, + operationsStub); + this.createGatewayAdvertisedRouteCallable = + callableFactory.createUnaryCallable( + createGatewayAdvertisedRouteTransportSettings, + settings.createGatewayAdvertisedRouteSettings(), + clientContext); + this.createGatewayAdvertisedRouteOperationCallable = + callableFactory.createOperationCallable( + createGatewayAdvertisedRouteTransportSettings, + settings.createGatewayAdvertisedRouteOperationSettings(), + clientContext, + operationsStub); + this.getGatewayAdvertisedRouteCallable = + callableFactory.createUnaryCallable( + getGatewayAdvertisedRouteTransportSettings, + settings.getGatewayAdvertisedRouteSettings(), + clientContext); + this.listGatewayAdvertisedRoutesCallable = + callableFactory.createUnaryCallable( + listGatewayAdvertisedRoutesTransportSettings, + settings.listGatewayAdvertisedRoutesSettings(), + clientContext); + this.listGatewayAdvertisedRoutesPagedCallable = + callableFactory.createPagedCallable( + listGatewayAdvertisedRoutesTransportSettings, + settings.listGatewayAdvertisedRoutesSettings(), + clientContext); + this.updateGatewayAdvertisedRouteCallable = + callableFactory.createUnaryCallable( + updateGatewayAdvertisedRouteTransportSettings, + settings.updateGatewayAdvertisedRouteSettings(), + clientContext); + this.updateGatewayAdvertisedRouteOperationCallable = + callableFactory.createOperationCallable( + updateGatewayAdvertisedRouteTransportSettings, + settings.updateGatewayAdvertisedRouteOperationSettings(), + clientContext, + operationsStub); + this.deleteGatewayAdvertisedRouteCallable = + callableFactory.createUnaryCallable( + deleteGatewayAdvertisedRouteTransportSettings, + settings.deleteGatewayAdvertisedRouteSettings(), + clientContext); + this.deleteGatewayAdvertisedRouteOperationCallable = + callableFactory.createOperationCallable( + deleteGatewayAdvertisedRouteTransportSettings, + settings.deleteGatewayAdvertisedRouteOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.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 listHubsCallable() { + return listHubsCallable; + } + + @Override + public UnaryCallable listHubsPagedCallable() { + return listHubsPagedCallable; + } + + @Override + public UnaryCallable getHubCallable() { + return getHubCallable; + } + + @Override + public UnaryCallable createHubCallable() { + return createHubCallable; + } + + @Override + public OperationCallable createHubOperationCallable() { + return createHubOperationCallable; + } + + @Override + public UnaryCallable updateHubCallable() { + return updateHubCallable; + } + + @Override + public OperationCallable updateHubOperationCallable() { + return updateHubOperationCallable; + } + + @Override + public UnaryCallable deleteHubCallable() { + return deleteHubCallable; + } + + @Override + public OperationCallable + deleteHubOperationCallable() { + return deleteHubOperationCallable; + } + + @Override + public UnaryCallable listHubSpokesCallable() { + return listHubSpokesCallable; + } + + @Override + public UnaryCallable + listHubSpokesPagedCallable() { + return listHubSpokesPagedCallable; + } + + @Override + public UnaryCallable queryHubStatusCallable() { + return queryHubStatusCallable; + } + + @Override + public UnaryCallable + queryHubStatusPagedCallable() { + return queryHubStatusPagedCallable; + } + + @Override + public UnaryCallable listSpokesCallable() { + return listSpokesCallable; + } + + @Override + public UnaryCallable listSpokesPagedCallable() { + return listSpokesPagedCallable; + } + + @Override + public UnaryCallable getSpokeCallable() { + return getSpokeCallable; + } + + @Override + public UnaryCallable createSpokeCallable() { + return createSpokeCallable; + } + + @Override + public OperationCallable + createSpokeOperationCallable() { + return createSpokeOperationCallable; + } + + @Override + public UnaryCallable updateSpokeCallable() { + return updateSpokeCallable; + } + + @Override + public OperationCallable + updateSpokeOperationCallable() { + return updateSpokeOperationCallable; + } + + @Override + public UnaryCallable rejectHubSpokeCallable() { + return rejectHubSpokeCallable; + } + + @Override + public OperationCallable + rejectHubSpokeOperationCallable() { + return rejectHubSpokeOperationCallable; + } + + @Override + public UnaryCallable acceptHubSpokeCallable() { + return acceptHubSpokeCallable; + } + + @Override + public OperationCallable + acceptHubSpokeOperationCallable() { + return acceptHubSpokeOperationCallable; + } + + @Override + public UnaryCallable acceptSpokeUpdateCallable() { + return acceptSpokeUpdateCallable; + } + + @Override + public OperationCallable + acceptSpokeUpdateOperationCallable() { + return acceptSpokeUpdateOperationCallable; + } + + @Override + public UnaryCallable rejectSpokeUpdateCallable() { + return rejectSpokeUpdateCallable; + } + + @Override + public OperationCallable + rejectSpokeUpdateOperationCallable() { + return rejectSpokeUpdateOperationCallable; + } + + @Override + public UnaryCallable deleteSpokeCallable() { + return deleteSpokeCallable; + } + + @Override + public OperationCallable + deleteSpokeOperationCallable() { + return deleteSpokeOperationCallable; + } + + @Override + public UnaryCallable getRouteTableCallable() { + return getRouteTableCallable; + } + + @Override + public UnaryCallable getRouteCallable() { + return getRouteCallable; + } + + @Override + public UnaryCallable listRoutesCallable() { + return listRoutesCallable; + } + + @Override + public UnaryCallable listRoutesPagedCallable() { + return listRoutesPagedCallable; + } + + @Override + public UnaryCallable listRouteTablesCallable() { + return listRouteTablesCallable; + } + + @Override + public UnaryCallable + listRouteTablesPagedCallable() { + return listRouteTablesPagedCallable; + } + + @Override + public UnaryCallable getGroupCallable() { + return getGroupCallable; + } + + @Override + public UnaryCallable listGroupsCallable() { + return listGroupsCallable; + } + + @Override + public UnaryCallable listGroupsPagedCallable() { + return listGroupsPagedCallable; + } + + @Override + public UnaryCallable updateGroupCallable() { + return updateGroupCallable; + } + + @Override + public OperationCallable + updateGroupOperationCallable() { + return updateGroupOperationCallable; + } + + @Override + public UnaryCallable + createGatewayAdvertisedRouteCallable() { + return createGatewayAdvertisedRouteCallable; + } + + @Override + public OperationCallable< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationCallable() { + return createGatewayAdvertisedRouteOperationCallable; + } + + @Override + public UnaryCallable + getGatewayAdvertisedRouteCallable() { + return getGatewayAdvertisedRouteCallable; + } + + @Override + public UnaryCallable + listGatewayAdvertisedRoutesCallable() { + return listGatewayAdvertisedRoutesCallable; + } + + @Override + public UnaryCallable + listGatewayAdvertisedRoutesPagedCallable() { + return listGatewayAdvertisedRoutesPagedCallable; + } + + @Override + public UnaryCallable + updateGatewayAdvertisedRouteCallable() { + return updateGatewayAdvertisedRouteCallable; + } + + @Override + public OperationCallable< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationCallable() { + return updateGatewayAdvertisedRouteOperationCallable; + } + + @Override + public UnaryCallable + deleteGatewayAdvertisedRouteCallable() { + return deleteGatewayAdvertisedRouteCallable; + } + + @Override + public OperationCallable + deleteGatewayAdvertisedRouteOperationCallable() { + return deleteGatewayAdvertisedRouteOperationCallable; + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceCallableFactory.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceCallableFactory.java new file mode 100644 index 000000000000..dad54f3d6a7d --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the PolicyBasedRoutingService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPolicyBasedRoutingServiceCallableFactory 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceStub.java new file mode 100644 index 000000000000..baa477ece944 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcPolicyBasedRoutingServiceStub.java @@ -0,0 +1,503 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +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 PolicyBasedRoutingService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPolicyBasedRoutingServiceStub extends PolicyBasedRoutingServiceStub { + private static final MethodDescriptor + listPolicyBasedRoutesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService/ListPolicyBasedRoutes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPolicyBasedRoutesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPolicyBasedRoutesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getPolicyBasedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService/GetPolicyBasedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPolicyBasedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PolicyBasedRoute.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createPolicyBasedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService/CreatePolicyBasedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePolicyBasedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deletePolicyBasedRouteMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService/DeletePolicyBasedRoute") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePolicyBasedRouteRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listPolicyBasedRoutesCallable; + private final UnaryCallable + listPolicyBasedRoutesPagedCallable; + private final UnaryCallable + getPolicyBasedRouteCallable; + private final UnaryCallable + createPolicyBasedRouteCallable; + private final OperationCallable< + CreatePolicyBasedRouteRequest, PolicyBasedRoute, OperationMetadata> + createPolicyBasedRouteOperationCallable; + private final UnaryCallable + deletePolicyBasedRouteCallable; + private final OperationCallable + deletePolicyBasedRouteOperationCallable; + 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 GrpcPolicyBasedRoutingServiceStub create( + PolicyBasedRoutingServiceStubSettings settings) throws IOException { + return new GrpcPolicyBasedRoutingServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPolicyBasedRoutingServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcPolicyBasedRoutingServiceStub( + PolicyBasedRoutingServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPolicyBasedRoutingServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPolicyBasedRoutingServiceStub( + PolicyBasedRoutingServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPolicyBasedRoutingServiceStub, 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 GrpcPolicyBasedRoutingServiceStub( + PolicyBasedRoutingServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPolicyBasedRoutingServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcPolicyBasedRoutingServiceStub, 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 GrpcPolicyBasedRoutingServiceStub( + PolicyBasedRoutingServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listPolicyBasedRoutesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listPolicyBasedRoutesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getPolicyBasedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyBasedRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createPolicyBasedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPolicyBasedRouteMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deletePolicyBasedRouteTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePolicyBasedRouteMethodDescriptor) + .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.listPolicyBasedRoutesCallable = + callableFactory.createUnaryCallable( + listPolicyBasedRoutesTransportSettings, + settings.listPolicyBasedRoutesSettings(), + clientContext); + this.listPolicyBasedRoutesPagedCallable = + callableFactory.createPagedCallable( + listPolicyBasedRoutesTransportSettings, + settings.listPolicyBasedRoutesSettings(), + clientContext); + this.getPolicyBasedRouteCallable = + callableFactory.createUnaryCallable( + getPolicyBasedRouteTransportSettings, + settings.getPolicyBasedRouteSettings(), + clientContext); + this.createPolicyBasedRouteCallable = + callableFactory.createUnaryCallable( + createPolicyBasedRouteTransportSettings, + settings.createPolicyBasedRouteSettings(), + clientContext); + this.createPolicyBasedRouteOperationCallable = + callableFactory.createOperationCallable( + createPolicyBasedRouteTransportSettings, + settings.createPolicyBasedRouteOperationSettings(), + clientContext, + operationsStub); + this.deletePolicyBasedRouteCallable = + callableFactory.createUnaryCallable( + deletePolicyBasedRouteTransportSettings, + settings.deletePolicyBasedRouteSettings(), + clientContext); + this.deletePolicyBasedRouteOperationCallable = + callableFactory.createOperationCallable( + deletePolicyBasedRouteTransportSettings, + settings.deletePolicyBasedRouteOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.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 + listPolicyBasedRoutesCallable() { + return listPolicyBasedRoutesCallable; + } + + @Override + public UnaryCallable + listPolicyBasedRoutesPagedCallable() { + return listPolicyBasedRoutesPagedCallable; + } + + @Override + public UnaryCallable getPolicyBasedRouteCallable() { + return getPolicyBasedRouteCallable; + } + + @Override + public UnaryCallable createPolicyBasedRouteCallable() { + return createPolicyBasedRouteCallable; + } + + @Override + public OperationCallable + createPolicyBasedRouteOperationCallable() { + return createPolicyBasedRouteOperationCallable; + } + + @Override + public UnaryCallable deletePolicyBasedRouteCallable() { + return deletePolicyBasedRouteCallable; + } + + @Override + public OperationCallable + deletePolicyBasedRouteOperationCallable() { + return deletePolicyBasedRouteOperationCallable; + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerCallableFactory.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerCallableFactory.java new file mode 100644 index 000000000000..d7375e8f0f82 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the TransportManager service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcTransportManagerCallableFactory 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerStub.java new file mode 100644 index 000000000000..7a302a7c50b8 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/GrpcTransportManagerStub.java @@ -0,0 +1,657 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListRemoteTransportProfilesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListTransportsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.GetTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +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 TransportManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcTransportManagerStub extends TransportManagerStub { + private static final MethodDescriptor< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesResponse> + listRemoteTransportProfilesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/ListRemoteTransportProfiles") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRemoteTransportProfilesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRemoteTransportProfilesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getRemoteTransportProfileMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/GetRemoteTransportProfile") + .setRequestMarshaller( + ProtoUtils.marshaller(GetRemoteTransportProfileRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoteTransportProfile.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listTransportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/ListTransports") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransportsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getTransportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/GetTransport") + .setRequestMarshaller(ProtoUtils.marshaller(GetTransportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Transport.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getStatusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/GetStatus") + .setRequestMarshaller(ProtoUtils.marshaller(GetStatusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(GetStatusResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createTransportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/CreateTransport") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTransportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateTransportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/UpdateTransport") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTransportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteTransportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkconnectivity.v1beta.TransportManager/DeleteTransport") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTransportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .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())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesResponse> + listRemoteTransportProfilesCallable; + private final UnaryCallable< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesPagedCallable; + private final UnaryCallable + getRemoteTransportProfileCallable; + private final UnaryCallable listTransportsCallable; + private final UnaryCallable + listTransportsPagedCallable; + private final UnaryCallable getTransportCallable; + private final UnaryCallable getStatusCallable; + private final UnaryCallable createTransportCallable; + private final OperationCallable + createTransportOperationCallable; + private final UnaryCallable updateTransportCallable; + private final OperationCallable + updateTransportOperationCallable; + private final UnaryCallable deleteTransportCallable; + private final OperationCallable + deleteTransportOperationCallable; + 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 GrpcTransportManagerStub create(TransportManagerStubSettings settings) + throws IOException { + return new GrpcTransportManagerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcTransportManagerStub create(ClientContext clientContext) + throws IOException { + return new GrpcTransportManagerStub( + TransportManagerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcTransportManagerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcTransportManagerStub( + TransportManagerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcTransportManagerStub, 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 GrpcTransportManagerStub( + TransportManagerStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcTransportManagerCallableFactory()); + } + + /** + * Constructs an instance of GrpcTransportManagerStub, 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 GrpcTransportManagerStub( + TransportManagerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listRemoteTransportProfilesTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listRemoteTransportProfilesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getRemoteTransportProfileTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getRemoteTransportProfileMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listTransportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTransportsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getTransportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTransportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getStatusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getStatusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createTransportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTransportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateTransportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTransportMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("transport.name", String.valueOf(request.getTransport().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteTransportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTransportMethodDescriptor) + .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.listRemoteTransportProfilesCallable = + callableFactory.createUnaryCallable( + listRemoteTransportProfilesTransportSettings, + settings.listRemoteTransportProfilesSettings(), + clientContext); + this.listRemoteTransportProfilesPagedCallable = + callableFactory.createPagedCallable( + listRemoteTransportProfilesTransportSettings, + settings.listRemoteTransportProfilesSettings(), + clientContext); + this.getRemoteTransportProfileCallable = + callableFactory.createUnaryCallable( + getRemoteTransportProfileTransportSettings, + settings.getRemoteTransportProfileSettings(), + clientContext); + this.listTransportsCallable = + callableFactory.createUnaryCallable( + listTransportsTransportSettings, settings.listTransportsSettings(), clientContext); + this.listTransportsPagedCallable = + callableFactory.createPagedCallable( + listTransportsTransportSettings, settings.listTransportsSettings(), clientContext); + this.getTransportCallable = + callableFactory.createUnaryCallable( + getTransportTransportSettings, settings.getTransportSettings(), clientContext); + this.getStatusCallable = + callableFactory.createUnaryCallable( + getStatusTransportSettings, settings.getStatusSettings(), clientContext); + this.createTransportCallable = + callableFactory.createUnaryCallable( + createTransportTransportSettings, settings.createTransportSettings(), clientContext); + this.createTransportOperationCallable = + callableFactory.createOperationCallable( + createTransportTransportSettings, + settings.createTransportOperationSettings(), + clientContext, + operationsStub); + this.updateTransportCallable = + callableFactory.createUnaryCallable( + updateTransportTransportSettings, settings.updateTransportSettings(), clientContext); + this.updateTransportOperationCallable = + callableFactory.createOperationCallable( + updateTransportTransportSettings, + settings.updateTransportOperationSettings(), + clientContext, + operationsStub); + this.deleteTransportCallable = + callableFactory.createUnaryCallable( + deleteTransportTransportSettings, settings.deleteTransportSettings(), clientContext); + this.deleteTransportOperationCallable = + callableFactory.createOperationCallable( + deleteTransportTransportSettings, + settings.deleteTransportOperationSettings(), + clientContext, + operationsStub); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.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 + listRemoteTransportProfilesCallable() { + return listRemoteTransportProfilesCallable; + } + + @Override + public UnaryCallable + listRemoteTransportProfilesPagedCallable() { + return listRemoteTransportProfilesPagedCallable; + } + + @Override + public UnaryCallable + getRemoteTransportProfileCallable() { + return getRemoteTransportProfileCallable; + } + + @Override + public UnaryCallable listTransportsCallable() { + return listTransportsCallable; + } + + @Override + public UnaryCallable + listTransportsPagedCallable() { + return listTransportsPagedCallable; + } + + @Override + public UnaryCallable getTransportCallable() { + return getTransportCallable; + } + + @Override + public UnaryCallable getStatusCallable() { + return getStatusCallable; + } + + @Override + public UnaryCallable createTransportCallable() { + return createTransportCallable; + } + + @Override + public OperationCallable + createTransportOperationCallable() { + return createTransportOperationCallable; + } + + @Override + public UnaryCallable updateTransportCallable() { + return updateTransportCallable; + } + + @Override + public OperationCallable + updateTransportOperationCallable() { + return updateTransportOperationCallable; + } + + @Override + public UnaryCallable deleteTransportCallable() { + return deleteTransportCallable; + } + + @Override + public OperationCallable + deleteTransportOperationCallable() { + return deleteTransportOperationCallable; + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStub.java new file mode 100644 index 000000000000..dc1c1631b02e --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStub.java @@ -0,0 +1,369 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGatewayAdvertisedRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.QueryHubStatusPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.GetHubRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest; +import com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +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 HubService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class HubServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listHubsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listHubsPagedCallable()"); + } + + public UnaryCallable listHubsCallable() { + throw new UnsupportedOperationException("Not implemented: listHubsCallable()"); + } + + public UnaryCallable getHubCallable() { + throw new UnsupportedOperationException("Not implemented: getHubCallable()"); + } + + public OperationCallable createHubOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createHubOperationCallable()"); + } + + public UnaryCallable createHubCallable() { + throw new UnsupportedOperationException("Not implemented: createHubCallable()"); + } + + public OperationCallable updateHubOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateHubOperationCallable()"); + } + + public UnaryCallable updateHubCallable() { + throw new UnsupportedOperationException("Not implemented: updateHubCallable()"); + } + + public OperationCallable + deleteHubOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteHubOperationCallable()"); + } + + public UnaryCallable deleteHubCallable() { + throw new UnsupportedOperationException("Not implemented: deleteHubCallable()"); + } + + public UnaryCallable + listHubSpokesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listHubSpokesPagedCallable()"); + } + + public UnaryCallable listHubSpokesCallable() { + throw new UnsupportedOperationException("Not implemented: listHubSpokesCallable()"); + } + + public UnaryCallable + queryHubStatusPagedCallable() { + throw new UnsupportedOperationException("Not implemented: queryHubStatusPagedCallable()"); + } + + public UnaryCallable queryHubStatusCallable() { + throw new UnsupportedOperationException("Not implemented: queryHubStatusCallable()"); + } + + public UnaryCallable listSpokesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSpokesPagedCallable()"); + } + + public UnaryCallable listSpokesCallable() { + throw new UnsupportedOperationException("Not implemented: listSpokesCallable()"); + } + + public UnaryCallable getSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: getSpokeCallable()"); + } + + public OperationCallable + createSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createSpokeOperationCallable()"); + } + + public UnaryCallable createSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: createSpokeCallable()"); + } + + public OperationCallable + updateSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateSpokeOperationCallable()"); + } + + public UnaryCallable updateSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: updateSpokeCallable()"); + } + + public OperationCallable + rejectHubSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: rejectHubSpokeOperationCallable()"); + } + + public UnaryCallable rejectHubSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: rejectHubSpokeCallable()"); + } + + public OperationCallable + acceptHubSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: acceptHubSpokeOperationCallable()"); + } + + public UnaryCallable acceptHubSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: acceptHubSpokeCallable()"); + } + + public OperationCallable + acceptSpokeUpdateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: acceptSpokeUpdateOperationCallable()"); + } + + public UnaryCallable acceptSpokeUpdateCallable() { + throw new UnsupportedOperationException("Not implemented: acceptSpokeUpdateCallable()"); + } + + public OperationCallable + rejectSpokeUpdateOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: rejectSpokeUpdateOperationCallable()"); + } + + public UnaryCallable rejectSpokeUpdateCallable() { + throw new UnsupportedOperationException("Not implemented: rejectSpokeUpdateCallable()"); + } + + public OperationCallable + deleteSpokeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSpokeOperationCallable()"); + } + + public UnaryCallable deleteSpokeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSpokeCallable()"); + } + + public UnaryCallable getRouteTableCallable() { + throw new UnsupportedOperationException("Not implemented: getRouteTableCallable()"); + } + + public UnaryCallable getRouteCallable() { + throw new UnsupportedOperationException("Not implemented: getRouteCallable()"); + } + + public UnaryCallable listRoutesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutesPagedCallable()"); + } + + public UnaryCallable listRoutesCallable() { + throw new UnsupportedOperationException("Not implemented: listRoutesCallable()"); + } + + public UnaryCallable + listRouteTablesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listRouteTablesPagedCallable()"); + } + + public UnaryCallable listRouteTablesCallable() { + throw new UnsupportedOperationException("Not implemented: listRouteTablesCallable()"); + } + + public UnaryCallable getGroupCallable() { + throw new UnsupportedOperationException("Not implemented: getGroupCallable()"); + } + + public UnaryCallable listGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsPagedCallable()"); + } + + public UnaryCallable listGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listGroupsCallable()"); + } + + public OperationCallable + updateGroupOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateGroupOperationCallable()"); + } + + public UnaryCallable updateGroupCallable() { + throw new UnsupportedOperationException("Not implemented: updateGroupCallable()"); + } + + public OperationCallable< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createGatewayAdvertisedRouteOperationCallable()"); + } + + public UnaryCallable + createGatewayAdvertisedRouteCallable() { + throw new UnsupportedOperationException( + "Not implemented: createGatewayAdvertisedRouteCallable()"); + } + + public UnaryCallable + getGatewayAdvertisedRouteCallable() { + throw new UnsupportedOperationException("Not implemented: getGatewayAdvertisedRouteCallable()"); + } + + public UnaryCallable + listGatewayAdvertisedRoutesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listGatewayAdvertisedRoutesPagedCallable()"); + } + + public UnaryCallable + listGatewayAdvertisedRoutesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listGatewayAdvertisedRoutesCallable()"); + } + + public OperationCallable< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateGatewayAdvertisedRouteOperationCallable()"); + } + + public UnaryCallable + updateGatewayAdvertisedRouteCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateGatewayAdvertisedRouteCallable()"); + } + + public OperationCallable + deleteGatewayAdvertisedRouteOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteGatewayAdvertisedRouteOperationCallable()"); + } + + public UnaryCallable + deleteGatewayAdvertisedRouteCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteGatewayAdvertisedRouteCallable()"); + } + + 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStubSettings.java new file mode 100644 index 000000000000..ec1beab62d1d --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/HubServiceStubSettings.java @@ -0,0 +1,2339 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGatewayAdvertisedRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.QueryHubStatusPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.GetHubRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest; +import com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link HubServiceStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder();
+ * hubServiceSettingsBuilder
+ *     .getHubSettings()
+ *     .setRetrySettings(
+ *         hubServiceSettingsBuilder
+ *             .getHubSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * HubServiceStubSettings hubServiceSettings = hubServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * hubServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class HubServiceStubSettings 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 + listHubsSettings; + private final UnaryCallSettings getHubSettings; + private final UnaryCallSettings createHubSettings; + private final OperationCallSettings + createHubOperationSettings; + private final UnaryCallSettings updateHubSettings; + private final OperationCallSettings + updateHubOperationSettings; + private final UnaryCallSettings deleteHubSettings; + private final OperationCallSettings + deleteHubOperationSettings; + private final PagedCallSettings< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings; + private final PagedCallSettings< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings; + private final PagedCallSettings + listSpokesSettings; + private final UnaryCallSettings getSpokeSettings; + private final UnaryCallSettings createSpokeSettings; + private final OperationCallSettings + createSpokeOperationSettings; + private final UnaryCallSettings updateSpokeSettings; + private final OperationCallSettings + updateSpokeOperationSettings; + private final UnaryCallSettings rejectHubSpokeSettings; + private final OperationCallSettings< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings; + private final UnaryCallSettings acceptHubSpokeSettings; + private final OperationCallSettings< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings; + private final UnaryCallSettings acceptSpokeUpdateSettings; + private final OperationCallSettings< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings; + private final UnaryCallSettings rejectSpokeUpdateSettings; + private final OperationCallSettings< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings; + private final UnaryCallSettings deleteSpokeSettings; + private final OperationCallSettings + deleteSpokeOperationSettings; + private final UnaryCallSettings getRouteTableSettings; + private final UnaryCallSettings getRouteSettings; + private final PagedCallSettings + listRoutesSettings; + private final PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings; + private final UnaryCallSettings getGroupSettings; + private final PagedCallSettings + listGroupsSettings; + private final UnaryCallSettings updateGroupSettings; + private final OperationCallSettings + updateGroupOperationSettings; + private final UnaryCallSettings + createGatewayAdvertisedRouteSettings; + private final OperationCallSettings< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings; + private final UnaryCallSettings + getGatewayAdvertisedRouteSettings; + private final PagedCallSettings< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings; + private final UnaryCallSettings + updateGatewayAdvertisedRouteSettings; + private final OperationCallSettings< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings; + private final UnaryCallSettings + deleteGatewayAdvertisedRouteSettings; + private final OperationCallSettings + deleteGatewayAdvertisedRouteOperationSettings; + 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 + LIST_HUBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHubsRequest injectToken(ListHubsRequest payload, String token) { + return ListHubsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListHubsRequest injectPageSize(ListHubsRequest payload, int pageSize) { + return ListHubsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListHubsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHubsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListHubsResponse payload) { + return payload.getHubsList(); + } + }; + + private static final PagedListDescriptor + LIST_HUB_SPOKES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListHubSpokesRequest injectToken(ListHubSpokesRequest payload, String token) { + return ListHubSpokesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListHubSpokesRequest injectPageSize(ListHubSpokesRequest payload, int pageSize) { + return ListHubSpokesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListHubSpokesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListHubSpokesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListHubSpokesResponse payload) { + return payload.getSpokesList(); + } + }; + + private static final PagedListDescriptor< + QueryHubStatusRequest, QueryHubStatusResponse, HubStatusEntry> + QUERY_HUB_STATUS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public QueryHubStatusRequest injectToken(QueryHubStatusRequest payload, String token) { + return QueryHubStatusRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public QueryHubStatusRequest injectPageSize( + QueryHubStatusRequest payload, int pageSize) { + return QueryHubStatusRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(QueryHubStatusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(QueryHubStatusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(QueryHubStatusResponse payload) { + return payload.getHubStatusEntriesList(); + } + }; + + private static final PagedListDescriptor + LIST_SPOKES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSpokesRequest injectToken(ListSpokesRequest payload, String token) { + return ListSpokesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSpokesRequest injectPageSize(ListSpokesRequest payload, int pageSize) { + return ListSpokesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSpokesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSpokesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSpokesResponse payload) { + return payload.getSpokesList(); + } + }; + + private static final PagedListDescriptor + LIST_ROUTES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRoutesRequest injectToken(ListRoutesRequest payload, String token) { + return ListRoutesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRoutesRequest injectPageSize(ListRoutesRequest payload, int pageSize) { + return ListRoutesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRoutesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRoutesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRoutesResponse payload) { + return payload.getRoutesList(); + } + }; + + private static final PagedListDescriptor< + ListRouteTablesRequest, ListRouteTablesResponse, RouteTable> + LIST_ROUTE_TABLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRouteTablesRequest injectToken( + ListRouteTablesRequest payload, String token) { + return ListRouteTablesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRouteTablesRequest injectPageSize( + ListRouteTablesRequest payload, int pageSize) { + return ListRouteTablesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListRouteTablesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRouteTablesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListRouteTablesResponse payload) { + return payload.getRouteTablesList(); + } + }; + + private static final PagedListDescriptor + LIST_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGroupsRequest injectToken(ListGroupsRequest payload, String token) { + return ListGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListGroupsRequest injectPageSize(ListGroupsRequest payload, int pageSize) { + return ListGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListGroupsResponse payload) { + return payload.getGroupsList(); + } + }; + + private static final PagedListDescriptor< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + LIST_GATEWAY_ADVERTISED_ROUTES_PAGE_STR_DESC = + new PagedListDescriptor< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListGatewayAdvertisedRoutesRequest injectToken( + ListGatewayAdvertisedRoutesRequest payload, String token) { + return ListGatewayAdvertisedRoutesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListGatewayAdvertisedRoutesRequest injectPageSize( + ListGatewayAdvertisedRoutesRequest payload, int pageSize) { + return ListGatewayAdvertisedRoutesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListGatewayAdvertisedRoutesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListGatewayAdvertisedRoutesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListGatewayAdvertisedRoutesResponse payload) { + return payload.getGatewayAdvertisedRoutesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListHubsRequest, ListHubsResponse, ListHubsPagedResponse> + LIST_HUBS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListHubsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_HUBS_PAGE_STR_DESC, request, context); + return ListHubsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + LIST_HUB_SPOKES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListHubSpokesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_HUB_SPOKES_PAGE_STR_DESC, request, context); + return ListHubSpokesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + QUERY_HUB_STATUS_PAGE_STR_FACT = + new PagedListResponseFactory< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + QueryHubStatusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, QUERY_HUB_STATUS_PAGE_STR_DESC, request, context); + return QueryHubStatusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse> + LIST_SPOKES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSpokesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SPOKES_PAGE_STR_DESC, request, context); + return ListSpokesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse> + LIST_ROUTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRoutesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROUTES_PAGE_STR_DESC, request, context); + return ListRoutesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + LIST_ROUTE_TABLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListRouteTablesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ROUTE_TABLES_PAGE_STR_DESC, request, context); + return ListRouteTablesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + LIST_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_GROUPS_PAGE_STR_DESC, request, context); + return ListGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + LIST_GATEWAY_ADVERTISED_ROUTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesResponse> + callable, + ListGatewayAdvertisedRoutesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + GatewayAdvertisedRoute> + pageContext = + PageContext.create( + callable, LIST_GATEWAY_ADVERTISED_ROUTES_PAGE_STR_DESC, request, context); + return ListGatewayAdvertisedRoutesPagedResponse.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 listHubs. */ + public PagedCallSettings + listHubsSettings() { + return listHubsSettings; + } + + /** Returns the object with the settings used for calls to getHub. */ + public UnaryCallSettings getHubSettings() { + return getHubSettings; + } + + /** Returns the object with the settings used for calls to createHub. */ + public UnaryCallSettings createHubSettings() { + return createHubSettings; + } + + /** Returns the object with the settings used for calls to createHub. */ + public OperationCallSettings + createHubOperationSettings() { + return createHubOperationSettings; + } + + /** Returns the object with the settings used for calls to updateHub. */ + public UnaryCallSettings updateHubSettings() { + return updateHubSettings; + } + + /** Returns the object with the settings used for calls to updateHub. */ + public OperationCallSettings + updateHubOperationSettings() { + return updateHubOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteHub. */ + public UnaryCallSettings deleteHubSettings() { + return deleteHubSettings; + } + + /** Returns the object with the settings used for calls to deleteHub. */ + public OperationCallSettings + deleteHubOperationSettings() { + return deleteHubOperationSettings; + } + + /** Returns the object with the settings used for calls to listHubSpokes. */ + public PagedCallSettings + listHubSpokesSettings() { + return listHubSpokesSettings; + } + + /** Returns the object with the settings used for calls to queryHubStatus. */ + public PagedCallSettings< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings() { + return queryHubStatusSettings; + } + + /** Returns the object with the settings used for calls to listSpokes. */ + public PagedCallSettings + listSpokesSettings() { + return listSpokesSettings; + } + + /** Returns the object with the settings used for calls to getSpoke. */ + public UnaryCallSettings getSpokeSettings() { + return getSpokeSettings; + } + + /** Returns the object with the settings used for calls to createSpoke. */ + public UnaryCallSettings createSpokeSettings() { + return createSpokeSettings; + } + + /** Returns the object with the settings used for calls to createSpoke. */ + public OperationCallSettings + createSpokeOperationSettings() { + return createSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateSpoke. */ + public UnaryCallSettings updateSpokeSettings() { + return updateSpokeSettings; + } + + /** Returns the object with the settings used for calls to updateSpoke. */ + public OperationCallSettings + updateSpokeOperationSettings() { + return updateSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings rejectHubSpokeSettings() { + return rejectHubSpokeSettings; + } + + /** Returns the object with the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings + rejectHubSpokeOperationSettings() { + return rejectHubSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings acceptHubSpokeSettings() { + return acceptHubSpokeSettings; + } + + /** Returns the object with the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings + acceptHubSpokeOperationSettings() { + return acceptHubSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to acceptSpokeUpdate. */ + public UnaryCallSettings acceptSpokeUpdateSettings() { + return acceptSpokeUpdateSettings; + } + + /** Returns the object with the settings used for calls to acceptSpokeUpdate. */ + public OperationCallSettings< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings() { + return acceptSpokeUpdateOperationSettings; + } + + /** Returns the object with the settings used for calls to rejectSpokeUpdate. */ + public UnaryCallSettings rejectSpokeUpdateSettings() { + return rejectSpokeUpdateSettings; + } + + /** Returns the object with the settings used for calls to rejectSpokeUpdate. */ + public OperationCallSettings< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings() { + return rejectSpokeUpdateOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteSpoke. */ + public UnaryCallSettings deleteSpokeSettings() { + return deleteSpokeSettings; + } + + /** Returns the object with the settings used for calls to deleteSpoke. */ + public OperationCallSettings + deleteSpokeOperationSettings() { + return deleteSpokeOperationSettings; + } + + /** Returns the object with the settings used for calls to getRouteTable. */ + public UnaryCallSettings getRouteTableSettings() { + return getRouteTableSettings; + } + + /** Returns the object with the settings used for calls to getRoute. */ + public UnaryCallSettings getRouteSettings() { + return getRouteSettings; + } + + /** Returns the object with the settings used for calls to listRoutes. */ + public PagedCallSettings + listRoutesSettings() { + return listRoutesSettings; + } + + /** Returns the object with the settings used for calls to listRouteTables. */ + public PagedCallSettings< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return listRouteTablesSettings; + } + + /** Returns the object with the settings used for calls to getGroup. */ + public UnaryCallSettings getGroupSettings() { + return getGroupSettings; + } + + /** Returns the object with the settings used for calls to listGroups. */ + public PagedCallSettings + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public UnaryCallSettings updateGroupSettings() { + return updateGroupSettings; + } + + /** Returns the object with the settings used for calls to updateGroup. */ + public OperationCallSettings + updateGroupOperationSettings() { + return updateGroupOperationSettings; + } + + /** Returns the object with the settings used for calls to createGatewayAdvertisedRoute. */ + public UnaryCallSettings + createGatewayAdvertisedRouteSettings() { + return createGatewayAdvertisedRouteSettings; + } + + /** Returns the object with the settings used for calls to createGatewayAdvertisedRoute. */ + public OperationCallSettings< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings() { + return createGatewayAdvertisedRouteOperationSettings; + } + + /** Returns the object with the settings used for calls to getGatewayAdvertisedRoute. */ + public UnaryCallSettings + getGatewayAdvertisedRouteSettings() { + return getGatewayAdvertisedRouteSettings; + } + + /** Returns the object with the settings used for calls to listGatewayAdvertisedRoutes. */ + public PagedCallSettings< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings() { + return listGatewayAdvertisedRoutesSettings; + } + + /** Returns the object with the settings used for calls to updateGatewayAdvertisedRoute. */ + public UnaryCallSettings + updateGatewayAdvertisedRouteSettings() { + return updateGatewayAdvertisedRouteSettings; + } + + /** Returns the object with the settings used for calls to updateGatewayAdvertisedRoute. */ + public OperationCallSettings< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings() { + return updateGatewayAdvertisedRouteOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteGatewayAdvertisedRoute. */ + public UnaryCallSettings + deleteGatewayAdvertisedRouteSettings() { + return deleteGatewayAdvertisedRouteSettings; + } + + /** Returns the object with the settings used for calls to deleteGatewayAdvertisedRoute. */ + public OperationCallSettings + deleteGatewayAdvertisedRouteOperationSettings() { + return deleteGatewayAdvertisedRouteOperationSettings; + } + + /** 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 HubServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcHubServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "networkconnectivity"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "networkconnectivity.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkconnectivity.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(HubServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 HubServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listHubsSettings = settingsBuilder.listHubsSettings().build(); + getHubSettings = settingsBuilder.getHubSettings().build(); + createHubSettings = settingsBuilder.createHubSettings().build(); + createHubOperationSettings = settingsBuilder.createHubOperationSettings().build(); + updateHubSettings = settingsBuilder.updateHubSettings().build(); + updateHubOperationSettings = settingsBuilder.updateHubOperationSettings().build(); + deleteHubSettings = settingsBuilder.deleteHubSettings().build(); + deleteHubOperationSettings = settingsBuilder.deleteHubOperationSettings().build(); + listHubSpokesSettings = settingsBuilder.listHubSpokesSettings().build(); + queryHubStatusSettings = settingsBuilder.queryHubStatusSettings().build(); + listSpokesSettings = settingsBuilder.listSpokesSettings().build(); + getSpokeSettings = settingsBuilder.getSpokeSettings().build(); + createSpokeSettings = settingsBuilder.createSpokeSettings().build(); + createSpokeOperationSettings = settingsBuilder.createSpokeOperationSettings().build(); + updateSpokeSettings = settingsBuilder.updateSpokeSettings().build(); + updateSpokeOperationSettings = settingsBuilder.updateSpokeOperationSettings().build(); + rejectHubSpokeSettings = settingsBuilder.rejectHubSpokeSettings().build(); + rejectHubSpokeOperationSettings = settingsBuilder.rejectHubSpokeOperationSettings().build(); + acceptHubSpokeSettings = settingsBuilder.acceptHubSpokeSettings().build(); + acceptHubSpokeOperationSettings = settingsBuilder.acceptHubSpokeOperationSettings().build(); + acceptSpokeUpdateSettings = settingsBuilder.acceptSpokeUpdateSettings().build(); + acceptSpokeUpdateOperationSettings = + settingsBuilder.acceptSpokeUpdateOperationSettings().build(); + rejectSpokeUpdateSettings = settingsBuilder.rejectSpokeUpdateSettings().build(); + rejectSpokeUpdateOperationSettings = + settingsBuilder.rejectSpokeUpdateOperationSettings().build(); + deleteSpokeSettings = settingsBuilder.deleteSpokeSettings().build(); + deleteSpokeOperationSettings = settingsBuilder.deleteSpokeOperationSettings().build(); + getRouteTableSettings = settingsBuilder.getRouteTableSettings().build(); + getRouteSettings = settingsBuilder.getRouteSettings().build(); + listRoutesSettings = settingsBuilder.listRoutesSettings().build(); + listRouteTablesSettings = settingsBuilder.listRouteTablesSettings().build(); + getGroupSettings = settingsBuilder.getGroupSettings().build(); + listGroupsSettings = settingsBuilder.listGroupsSettings().build(); + updateGroupSettings = settingsBuilder.updateGroupSettings().build(); + updateGroupOperationSettings = settingsBuilder.updateGroupOperationSettings().build(); + createGatewayAdvertisedRouteSettings = + settingsBuilder.createGatewayAdvertisedRouteSettings().build(); + createGatewayAdvertisedRouteOperationSettings = + settingsBuilder.createGatewayAdvertisedRouteOperationSettings().build(); + getGatewayAdvertisedRouteSettings = settingsBuilder.getGatewayAdvertisedRouteSettings().build(); + listGatewayAdvertisedRoutesSettings = + settingsBuilder.listGatewayAdvertisedRoutesSettings().build(); + updateGatewayAdvertisedRouteSettings = + settingsBuilder.updateGatewayAdvertisedRouteSettings().build(); + updateGatewayAdvertisedRouteOperationSettings = + settingsBuilder.updateGatewayAdvertisedRouteOperationSettings().build(); + deleteGatewayAdvertisedRouteSettings = + settingsBuilder.deleteGatewayAdvertisedRouteSettings().build(); + deleteGatewayAdvertisedRouteOperationSettings = + settingsBuilder.deleteGatewayAdvertisedRouteOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for HubServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListHubsRequest, ListHubsResponse, ListHubsPagedResponse> + listHubsSettings; + private final UnaryCallSettings.Builder getHubSettings; + private final UnaryCallSettings.Builder createHubSettings; + private final OperationCallSettings.Builder + createHubOperationSettings; + private final UnaryCallSettings.Builder updateHubSettings; + private final OperationCallSettings.Builder + updateHubOperationSettings; + private final UnaryCallSettings.Builder deleteHubSettings; + private final OperationCallSettings.Builder + deleteHubOperationSettings; + private final PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings; + private final PagedCallSettings.Builder< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings; + private final PagedCallSettings.Builder< + ListSpokesRequest, ListSpokesResponse, ListSpokesPagedResponse> + listSpokesSettings; + private final UnaryCallSettings.Builder getSpokeSettings; + private final UnaryCallSettings.Builder createSpokeSettings; + private final OperationCallSettings.Builder + createSpokeOperationSettings; + private final UnaryCallSettings.Builder updateSpokeSettings; + private final OperationCallSettings.Builder + updateSpokeOperationSettings; + private final UnaryCallSettings.Builder + rejectHubSpokeSettings; + private final OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings; + private final UnaryCallSettings.Builder + acceptHubSpokeSettings; + private final OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings; + private final UnaryCallSettings.Builder + acceptSpokeUpdateSettings; + private final OperationCallSettings.Builder< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings; + private final UnaryCallSettings.Builder + rejectSpokeUpdateSettings; + private final OperationCallSettings.Builder< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings; + private final UnaryCallSettings.Builder deleteSpokeSettings; + private final OperationCallSettings.Builder + deleteSpokeOperationSettings; + private final UnaryCallSettings.Builder getRouteTableSettings; + private final UnaryCallSettings.Builder getRouteSettings; + private final PagedCallSettings.Builder< + ListRoutesRequest, ListRoutesResponse, ListRoutesPagedResponse> + listRoutesSettings; + private final PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings; + private final UnaryCallSettings.Builder getGroupSettings; + private final PagedCallSettings.Builder< + ListGroupsRequest, ListGroupsResponse, ListGroupsPagedResponse> + listGroupsSettings; + private final UnaryCallSettings.Builder updateGroupSettings; + private final OperationCallSettings.Builder + updateGroupOperationSettings; + private final UnaryCallSettings.Builder + createGatewayAdvertisedRouteSettings; + private final OperationCallSettings.Builder< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings; + private final UnaryCallSettings.Builder< + GetGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute> + getGatewayAdvertisedRouteSettings; + private final PagedCallSettings.Builder< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings; + private final UnaryCallSettings.Builder + updateGatewayAdvertisedRouteSettings; + private final OperationCallSettings.Builder< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings; + private final UnaryCallSettings.Builder + deleteGatewayAdvertisedRouteSettings; + private final OperationCallSettings.Builder< + DeleteGatewayAdvertisedRouteRequest, Empty, OperationMetadata> + deleteGatewayAdvertisedRouteOperationSettings; + 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( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listHubsSettings = PagedCallSettings.newBuilder(LIST_HUBS_PAGE_STR_FACT); + getHubSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHubSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createHubOperationSettings = OperationCallSettings.newBuilder(); + updateHubSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateHubOperationSettings = OperationCallSettings.newBuilder(); + deleteHubSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteHubOperationSettings = OperationCallSettings.newBuilder(); + listHubSpokesSettings = PagedCallSettings.newBuilder(LIST_HUB_SPOKES_PAGE_STR_FACT); + queryHubStatusSettings = PagedCallSettings.newBuilder(QUERY_HUB_STATUS_PAGE_STR_FACT); + listSpokesSettings = PagedCallSettings.newBuilder(LIST_SPOKES_PAGE_STR_FACT); + getSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createSpokeOperationSettings = OperationCallSettings.newBuilder(); + updateSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateSpokeOperationSettings = OperationCallSettings.newBuilder(); + rejectHubSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rejectHubSpokeOperationSettings = OperationCallSettings.newBuilder(); + acceptHubSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + acceptHubSpokeOperationSettings = OperationCallSettings.newBuilder(); + acceptSpokeUpdateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + acceptSpokeUpdateOperationSettings = OperationCallSettings.newBuilder(); + rejectSpokeUpdateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + rejectSpokeUpdateOperationSettings = OperationCallSettings.newBuilder(); + deleteSpokeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSpokeOperationSettings = OperationCallSettings.newBuilder(); + getRouteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listRoutesSettings = PagedCallSettings.newBuilder(LIST_ROUTES_PAGE_STR_FACT); + listRouteTablesSettings = PagedCallSettings.newBuilder(LIST_ROUTE_TABLES_PAGE_STR_FACT); + getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listGroupsSettings = PagedCallSettings.newBuilder(LIST_GROUPS_PAGE_STR_FACT); + updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGroupOperationSettings = OperationCallSettings.newBuilder(); + createGatewayAdvertisedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createGatewayAdvertisedRouteOperationSettings = OperationCallSettings.newBuilder(); + getGatewayAdvertisedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listGatewayAdvertisedRoutesSettings = + PagedCallSettings.newBuilder(LIST_GATEWAY_ADVERTISED_ROUTES_PAGE_STR_FACT); + updateGatewayAdvertisedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateGatewayAdvertisedRouteOperationSettings = OperationCallSettings.newBuilder(); + deleteGatewayAdvertisedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteGatewayAdvertisedRouteOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listHubsSettings, + getHubSettings, + createHubSettings, + updateHubSettings, + deleteHubSettings, + listHubSpokesSettings, + queryHubStatusSettings, + listSpokesSettings, + getSpokeSettings, + createSpokeSettings, + updateSpokeSettings, + rejectHubSpokeSettings, + acceptHubSpokeSettings, + acceptSpokeUpdateSettings, + rejectSpokeUpdateSettings, + deleteSpokeSettings, + getRouteTableSettings, + getRouteSettings, + listRoutesSettings, + listRouteTablesSettings, + getGroupSettings, + listGroupsSettings, + updateGroupSettings, + createGatewayAdvertisedRouteSettings, + getGatewayAdvertisedRouteSettings, + listGatewayAdvertisedRoutesSettings, + updateGatewayAdvertisedRouteSettings, + deleteGatewayAdvertisedRouteSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(HubServiceStubSettings settings) { + super(settings); + + listHubsSettings = settings.listHubsSettings.toBuilder(); + getHubSettings = settings.getHubSettings.toBuilder(); + createHubSettings = settings.createHubSettings.toBuilder(); + createHubOperationSettings = settings.createHubOperationSettings.toBuilder(); + updateHubSettings = settings.updateHubSettings.toBuilder(); + updateHubOperationSettings = settings.updateHubOperationSettings.toBuilder(); + deleteHubSettings = settings.deleteHubSettings.toBuilder(); + deleteHubOperationSettings = settings.deleteHubOperationSettings.toBuilder(); + listHubSpokesSettings = settings.listHubSpokesSettings.toBuilder(); + queryHubStatusSettings = settings.queryHubStatusSettings.toBuilder(); + listSpokesSettings = settings.listSpokesSettings.toBuilder(); + getSpokeSettings = settings.getSpokeSettings.toBuilder(); + createSpokeSettings = settings.createSpokeSettings.toBuilder(); + createSpokeOperationSettings = settings.createSpokeOperationSettings.toBuilder(); + updateSpokeSettings = settings.updateSpokeSettings.toBuilder(); + updateSpokeOperationSettings = settings.updateSpokeOperationSettings.toBuilder(); + rejectHubSpokeSettings = settings.rejectHubSpokeSettings.toBuilder(); + rejectHubSpokeOperationSettings = settings.rejectHubSpokeOperationSettings.toBuilder(); + acceptHubSpokeSettings = settings.acceptHubSpokeSettings.toBuilder(); + acceptHubSpokeOperationSettings = settings.acceptHubSpokeOperationSettings.toBuilder(); + acceptSpokeUpdateSettings = settings.acceptSpokeUpdateSettings.toBuilder(); + acceptSpokeUpdateOperationSettings = settings.acceptSpokeUpdateOperationSettings.toBuilder(); + rejectSpokeUpdateSettings = settings.rejectSpokeUpdateSettings.toBuilder(); + rejectSpokeUpdateOperationSettings = settings.rejectSpokeUpdateOperationSettings.toBuilder(); + deleteSpokeSettings = settings.deleteSpokeSettings.toBuilder(); + deleteSpokeOperationSettings = settings.deleteSpokeOperationSettings.toBuilder(); + getRouteTableSettings = settings.getRouteTableSettings.toBuilder(); + getRouteSettings = settings.getRouteSettings.toBuilder(); + listRoutesSettings = settings.listRoutesSettings.toBuilder(); + listRouteTablesSettings = settings.listRouteTablesSettings.toBuilder(); + getGroupSettings = settings.getGroupSettings.toBuilder(); + listGroupsSettings = settings.listGroupsSettings.toBuilder(); + updateGroupSettings = settings.updateGroupSettings.toBuilder(); + updateGroupOperationSettings = settings.updateGroupOperationSettings.toBuilder(); + createGatewayAdvertisedRouteSettings = + settings.createGatewayAdvertisedRouteSettings.toBuilder(); + createGatewayAdvertisedRouteOperationSettings = + settings.createGatewayAdvertisedRouteOperationSettings.toBuilder(); + getGatewayAdvertisedRouteSettings = settings.getGatewayAdvertisedRouteSettings.toBuilder(); + listGatewayAdvertisedRoutesSettings = + settings.listGatewayAdvertisedRoutesSettings.toBuilder(); + updateGatewayAdvertisedRouteSettings = + settings.updateGatewayAdvertisedRouteSettings.toBuilder(); + updateGatewayAdvertisedRouteOperationSettings = + settings.updateGatewayAdvertisedRouteOperationSettings.toBuilder(); + deleteGatewayAdvertisedRouteSettings = + settings.deleteGatewayAdvertisedRouteSettings.toBuilder(); + deleteGatewayAdvertisedRouteOperationSettings = + settings.deleteGatewayAdvertisedRouteOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listHubsSettings, + getHubSettings, + createHubSettings, + updateHubSettings, + deleteHubSettings, + listHubSpokesSettings, + queryHubStatusSettings, + listSpokesSettings, + getSpokeSettings, + createSpokeSettings, + updateSpokeSettings, + rejectHubSpokeSettings, + acceptHubSpokeSettings, + acceptSpokeUpdateSettings, + rejectSpokeUpdateSettings, + deleteSpokeSettings, + getRouteTableSettings, + getRouteSettings, + listRoutesSettings, + listRouteTablesSettings, + getGroupSettings, + listGroupsSettings, + updateGroupSettings, + createGatewayAdvertisedRouteSettings, + getGatewayAdvertisedRouteSettings, + listGatewayAdvertisedRoutesSettings, + updateGatewayAdvertisedRouteSettings, + deleteGatewayAdvertisedRouteSettings, + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listHubsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getHubSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createHubSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateHubSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteHubSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listHubSpokesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .queryHubStatusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSpokesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .rejectHubSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .acceptHubSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .acceptSpokeUpdateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .rejectSpokeUpdateSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteSpokeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getRouteTableSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRoutesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listRouteTablesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateGroupSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createGatewayAdvertisedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getGatewayAdvertisedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listGatewayAdvertisedRoutesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateGatewayAdvertisedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteGatewayAdvertisedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createHubOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Hub.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateHubOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Hub.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteHubOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Spoke.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Spoke.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .rejectHubSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(RejectHubSpokeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .acceptHubSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AcceptHubSpokeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .acceptSpokeUpdateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + AcceptSpokeUpdateResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .rejectSpokeUpdateOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + RejectSpokeUpdateResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteSpokeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateGroupOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Group.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .createGatewayAdvertisedRouteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(GatewayAdvertisedRoute.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateGatewayAdvertisedRouteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(GatewayAdvertisedRoute.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteGatewayAdvertisedRouteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listHubs. */ + public PagedCallSettings.Builder + listHubsSettings() { + return listHubsSettings; + } + + /** Returns the builder for the settings used for calls to getHub. */ + public UnaryCallSettings.Builder getHubSettings() { + return getHubSettings; + } + + /** Returns the builder for the settings used for calls to createHub. */ + public UnaryCallSettings.Builder createHubSettings() { + return createHubSettings; + } + + /** Returns the builder for the settings used for calls to createHub. */ + public OperationCallSettings.Builder + createHubOperationSettings() { + return createHubOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateHub. */ + public UnaryCallSettings.Builder updateHubSettings() { + return updateHubSettings; + } + + /** Returns the builder for the settings used for calls to updateHub. */ + public OperationCallSettings.Builder + updateHubOperationSettings() { + return updateHubOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteHub. */ + public UnaryCallSettings.Builder deleteHubSettings() { + return deleteHubSettings; + } + + /** Returns the builder for the settings used for calls to deleteHub. */ + public OperationCallSettings.Builder + deleteHubOperationSettings() { + return deleteHubOperationSettings; + } + + /** Returns the builder for the settings used for calls to listHubSpokes. */ + public PagedCallSettings.Builder< + ListHubSpokesRequest, ListHubSpokesResponse, ListHubSpokesPagedResponse> + listHubSpokesSettings() { + return listHubSpokesSettings; + } + + /** Returns the builder for the settings used for calls to queryHubStatus. */ + public PagedCallSettings.Builder< + QueryHubStatusRequest, QueryHubStatusResponse, QueryHubStatusPagedResponse> + queryHubStatusSettings() { + return queryHubStatusSettings; + } + + /** Returns the builder for the settings used for calls to listSpokes. */ + public PagedCallSettings.Builder + listSpokesSettings() { + return listSpokesSettings; + } + + /** Returns the builder for the settings used for calls to getSpoke. */ + public UnaryCallSettings.Builder getSpokeSettings() { + return getSpokeSettings; + } + + /** Returns the builder for the settings used for calls to createSpoke. */ + public UnaryCallSettings.Builder createSpokeSettings() { + return createSpokeSettings; + } + + /** Returns the builder for the settings used for calls to createSpoke. */ + public OperationCallSettings.Builder + createSpokeOperationSettings() { + return createSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateSpoke. */ + public UnaryCallSettings.Builder updateSpokeSettings() { + return updateSpokeSettings; + } + + /** Returns the builder for the settings used for calls to updateSpoke. */ + public OperationCallSettings.Builder + updateSpokeOperationSettings() { + return updateSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public UnaryCallSettings.Builder rejectHubSpokeSettings() { + return rejectHubSpokeSettings; + } + + /** Returns the builder for the settings used for calls to rejectHubSpoke. */ + public OperationCallSettings.Builder< + RejectHubSpokeRequest, RejectHubSpokeResponse, OperationMetadata> + rejectHubSpokeOperationSettings() { + return rejectHubSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public UnaryCallSettings.Builder acceptHubSpokeSettings() { + return acceptHubSpokeSettings; + } + + /** Returns the builder for the settings used for calls to acceptHubSpoke. */ + public OperationCallSettings.Builder< + AcceptHubSpokeRequest, AcceptHubSpokeResponse, OperationMetadata> + acceptHubSpokeOperationSettings() { + return acceptHubSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to acceptSpokeUpdate. */ + public UnaryCallSettings.Builder + acceptSpokeUpdateSettings() { + return acceptSpokeUpdateSettings; + } + + /** Returns the builder for the settings used for calls to acceptSpokeUpdate. */ + public OperationCallSettings.Builder< + AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata> + acceptSpokeUpdateOperationSettings() { + return acceptSpokeUpdateOperationSettings; + } + + /** Returns the builder for the settings used for calls to rejectSpokeUpdate. */ + public UnaryCallSettings.Builder + rejectSpokeUpdateSettings() { + return rejectSpokeUpdateSettings; + } + + /** Returns the builder for the settings used for calls to rejectSpokeUpdate. */ + public OperationCallSettings.Builder< + RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata> + rejectSpokeUpdateOperationSettings() { + return rejectSpokeUpdateOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteSpoke. */ + public UnaryCallSettings.Builder deleteSpokeSettings() { + return deleteSpokeSettings; + } + + /** Returns the builder for the settings used for calls to deleteSpoke. */ + public OperationCallSettings.Builder + deleteSpokeOperationSettings() { + return deleteSpokeOperationSettings; + } + + /** Returns the builder for the settings used for calls to getRouteTable. */ + public UnaryCallSettings.Builder getRouteTableSettings() { + return getRouteTableSettings; + } + + /** Returns the builder for the settings used for calls to getRoute. */ + public UnaryCallSettings.Builder getRouteSettings() { + return getRouteSettings; + } + + /** Returns the builder for the settings used for calls to listRoutes. */ + public PagedCallSettings.Builder + listRoutesSettings() { + return listRoutesSettings; + } + + /** Returns the builder for the settings used for calls to listRouteTables. */ + public PagedCallSettings.Builder< + ListRouteTablesRequest, ListRouteTablesResponse, ListRouteTablesPagedResponse> + listRouteTablesSettings() { + return listRouteTablesSettings; + } + + /** Returns the builder for the settings used for calls to getGroup. */ + public UnaryCallSettings.Builder getGroupSettings() { + return getGroupSettings; + } + + /** Returns the builder for the settings used for calls to listGroups. */ + public PagedCallSettings.Builder + listGroupsSettings() { + return listGroupsSettings; + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public UnaryCallSettings.Builder updateGroupSettings() { + return updateGroupSettings; + } + + /** Returns the builder for the settings used for calls to updateGroup. */ + public OperationCallSettings.Builder + updateGroupOperationSettings() { + return updateGroupOperationSettings; + } + + /** Returns the builder for the settings used for calls to createGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + createGatewayAdvertisedRouteSettings() { + return createGatewayAdvertisedRouteSettings; + } + + /** Returns the builder for the settings used for calls to createGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + createGatewayAdvertisedRouteOperationSettings() { + return createGatewayAdvertisedRouteOperationSettings; + } + + /** Returns the builder for the settings used for calls to getGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + getGatewayAdvertisedRouteSettings() { + return getGatewayAdvertisedRouteSettings; + } + + /** Returns the builder for the settings used for calls to listGatewayAdvertisedRoutes. */ + public PagedCallSettings.Builder< + ListGatewayAdvertisedRoutesRequest, + ListGatewayAdvertisedRoutesResponse, + ListGatewayAdvertisedRoutesPagedResponse> + listGatewayAdvertisedRoutesSettings() { + return listGatewayAdvertisedRoutesSettings; + } + + /** Returns the builder for the settings used for calls to updateGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + updateGatewayAdvertisedRouteSettings() { + return updateGatewayAdvertisedRouteSettings; + } + + /** Returns the builder for the settings used for calls to updateGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata> + updateGatewayAdvertisedRouteOperationSettings() { + return updateGatewayAdvertisedRouteOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteGatewayAdvertisedRoute. */ + public UnaryCallSettings.Builder + deleteGatewayAdvertisedRouteSettings() { + return deleteGatewayAdvertisedRouteSettings; + } + + /** Returns the builder for the settings used for calls to deleteGatewayAdvertisedRoute. */ + public OperationCallSettings.Builder< + DeleteGatewayAdvertisedRouteRequest, Empty, OperationMetadata> + deleteGatewayAdvertisedRouteOperationSettings() { + return deleteGatewayAdvertisedRouteOperationSettings; + } + + /** 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 HubServiceStubSettings build() throws IOException { + return new HubServiceStubSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStub.java new file mode 100644 index 000000000000..6a3aa693a4c9 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStub.java @@ -0,0 +1,124 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +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 PolicyBasedRoutingService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class PolicyBasedRoutingServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listPolicyBasedRoutesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPolicyBasedRoutesPagedCallable()"); + } + + public UnaryCallable + listPolicyBasedRoutesCallable() { + throw new UnsupportedOperationException("Not implemented: listPolicyBasedRoutesCallable()"); + } + + public UnaryCallable getPolicyBasedRouteCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyBasedRouteCallable()"); + } + + public OperationCallable + createPolicyBasedRouteOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createPolicyBasedRouteOperationCallable()"); + } + + public UnaryCallable createPolicyBasedRouteCallable() { + throw new UnsupportedOperationException("Not implemented: createPolicyBasedRouteCallable()"); + } + + public OperationCallable + deletePolicyBasedRouteOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deletePolicyBasedRouteOperationCallable()"); + } + + public UnaryCallable deletePolicyBasedRouteCallable() { + throw new UnsupportedOperationException("Not implemented: deletePolicyBasedRouteCallable()"); + } + + 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStubSettings.java new file mode 100644 index 000000000000..59a9aeb66f28 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/PolicyBasedRoutingServiceStubSettings.java @@ -0,0 +1,794 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PolicyBasedRoutingServiceStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBasedRoutingServiceStubSettings.Builder policyBasedRoutingServiceSettingsBuilder =
+ *     PolicyBasedRoutingServiceStubSettings.newBuilder();
+ * policyBasedRoutingServiceSettingsBuilder
+ *     .getPolicyBasedRouteSettings()
+ *     .setRetrySettings(
+ *         policyBasedRoutingServiceSettingsBuilder
+ *             .getPolicyBasedRouteSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * PolicyBasedRoutingServiceStubSettings policyBasedRoutingServiceSettings =
+ *     policyBasedRoutingServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * PolicyBasedRoutingServiceStubSettings.Builder policyBasedRoutingServiceSettingsBuilder =
+ *     PolicyBasedRoutingServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * policyBasedRoutingServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PolicyBasedRoutingServiceStubSettings + 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< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings; + private final UnaryCallSettings + getPolicyBasedRouteSettings; + private final UnaryCallSettings + createPolicyBasedRouteSettings; + private final OperationCallSettings< + CreatePolicyBasedRouteRequest, PolicyBasedRoute, OperationMetadata> + createPolicyBasedRouteOperationSettings; + private final UnaryCallSettings + deletePolicyBasedRouteSettings; + private final OperationCallSettings + deletePolicyBasedRouteOperationSettings; + 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< + ListPolicyBasedRoutesRequest, ListPolicyBasedRoutesResponse, PolicyBasedRoute> + LIST_POLICY_BASED_ROUTES_PAGE_STR_DESC = + new PagedListDescriptor< + ListPolicyBasedRoutesRequest, ListPolicyBasedRoutesResponse, PolicyBasedRoute>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPolicyBasedRoutesRequest injectToken( + ListPolicyBasedRoutesRequest payload, String token) { + return ListPolicyBasedRoutesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPolicyBasedRoutesRequest injectPageSize( + ListPolicyBasedRoutesRequest payload, int pageSize) { + return ListPolicyBasedRoutesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPolicyBasedRoutesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPolicyBasedRoutesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPolicyBasedRoutesResponse payload) { + return payload.getPolicyBasedRoutesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + LIST_POLICY_BASED_ROUTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPolicyBasedRoutesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPolicyBasedRoutesRequest, ListPolicyBasedRoutesResponse, PolicyBasedRoute> + pageContext = + PageContext.create( + callable, LIST_POLICY_BASED_ROUTES_PAGE_STR_DESC, request, context); + return ListPolicyBasedRoutesPagedResponse.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 listPolicyBasedRoutes. */ + public PagedCallSettings< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings() { + return listPolicyBasedRoutesSettings; + } + + /** Returns the object with the settings used for calls to getPolicyBasedRoute. */ + public UnaryCallSettings + getPolicyBasedRouteSettings() { + return getPolicyBasedRouteSettings; + } + + /** Returns the object with the settings used for calls to createPolicyBasedRoute. */ + public UnaryCallSettings + createPolicyBasedRouteSettings() { + return createPolicyBasedRouteSettings; + } + + /** Returns the object with the settings used for calls to createPolicyBasedRoute. */ + public OperationCallSettings + createPolicyBasedRouteOperationSettings() { + return createPolicyBasedRouteOperationSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBasedRoute. */ + public UnaryCallSettings + deletePolicyBasedRouteSettings() { + return deletePolicyBasedRouteSettings; + } + + /** Returns the object with the settings used for calls to deletePolicyBasedRoute. */ + public OperationCallSettings + deletePolicyBasedRouteOperationSettings() { + return deletePolicyBasedRouteOperationSettings; + } + + /** 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 PolicyBasedRoutingServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPolicyBasedRoutingServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "networkconnectivity"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "networkconnectivity.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkconnectivity.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(PolicyBasedRoutingServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 PolicyBasedRoutingServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listPolicyBasedRoutesSettings = settingsBuilder.listPolicyBasedRoutesSettings().build(); + getPolicyBasedRouteSettings = settingsBuilder.getPolicyBasedRouteSettings().build(); + createPolicyBasedRouteSettings = settingsBuilder.createPolicyBasedRouteSettings().build(); + createPolicyBasedRouteOperationSettings = + settingsBuilder.createPolicyBasedRouteOperationSettings().build(); + deletePolicyBasedRouteSettings = settingsBuilder.deletePolicyBasedRouteSettings().build(); + deletePolicyBasedRouteOperationSettings = + settingsBuilder.deletePolicyBasedRouteOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for PolicyBasedRoutingServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings; + private final UnaryCallSettings.Builder + getPolicyBasedRouteSettings; + private final UnaryCallSettings.Builder + createPolicyBasedRouteSettings; + private final OperationCallSettings.Builder< + CreatePolicyBasedRouteRequest, PolicyBasedRoute, OperationMetadata> + createPolicyBasedRouteOperationSettings; + private final UnaryCallSettings.Builder + deletePolicyBasedRouteSettings; + private final OperationCallSettings.Builder< + DeletePolicyBasedRouteRequest, Empty, OperationMetadata> + deletePolicyBasedRouteOperationSettings; + 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( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listPolicyBasedRoutesSettings = + PagedCallSettings.newBuilder(LIST_POLICY_BASED_ROUTES_PAGE_STR_FACT); + getPolicyBasedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyBasedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPolicyBasedRouteOperationSettings = OperationCallSettings.newBuilder(); + deletePolicyBasedRouteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePolicyBasedRouteOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPolicyBasedRoutesSettings, + getPolicyBasedRouteSettings, + createPolicyBasedRouteSettings, + deletePolicyBasedRouteSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(PolicyBasedRoutingServiceStubSettings settings) { + super(settings); + + listPolicyBasedRoutesSettings = settings.listPolicyBasedRoutesSettings.toBuilder(); + getPolicyBasedRouteSettings = settings.getPolicyBasedRouteSettings.toBuilder(); + createPolicyBasedRouteSettings = settings.createPolicyBasedRouteSettings.toBuilder(); + createPolicyBasedRouteOperationSettings = + settings.createPolicyBasedRouteOperationSettings.toBuilder(); + deletePolicyBasedRouteSettings = settings.deletePolicyBasedRouteSettings.toBuilder(); + deletePolicyBasedRouteOperationSettings = + settings.deletePolicyBasedRouteOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listPolicyBasedRoutesSettings, + getPolicyBasedRouteSettings, + createPolicyBasedRouteSettings, + deletePolicyBasedRouteSettings, + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listPolicyBasedRoutesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPolicyBasedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyBasedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deletePolicyBasedRouteSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPolicyBasedRouteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(PolicyBasedRoute.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deletePolicyBasedRouteOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + 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 listPolicyBasedRoutes. */ + public PagedCallSettings.Builder< + ListPolicyBasedRoutesRequest, + ListPolicyBasedRoutesResponse, + ListPolicyBasedRoutesPagedResponse> + listPolicyBasedRoutesSettings() { + return listPolicyBasedRoutesSettings; + } + + /** Returns the builder for the settings used for calls to getPolicyBasedRoute. */ + public UnaryCallSettings.Builder + getPolicyBasedRouteSettings() { + return getPolicyBasedRouteSettings; + } + + /** Returns the builder for the settings used for calls to createPolicyBasedRoute. */ + public UnaryCallSettings.Builder + createPolicyBasedRouteSettings() { + return createPolicyBasedRouteSettings; + } + + /** Returns the builder for the settings used for calls to createPolicyBasedRoute. */ + public OperationCallSettings.Builder< + CreatePolicyBasedRouteRequest, PolicyBasedRoute, OperationMetadata> + createPolicyBasedRouteOperationSettings() { + return createPolicyBasedRouteOperationSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBasedRoute. */ + public UnaryCallSettings.Builder + deletePolicyBasedRouteSettings() { + return deletePolicyBasedRouteSettings; + } + + /** Returns the builder for the settings used for calls to deletePolicyBasedRoute. */ + public OperationCallSettings.Builder + deletePolicyBasedRouteOperationSettings() { + return deletePolicyBasedRouteOperationSettings; + } + + /** 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 PolicyBasedRoutingServiceStubSettings build() throws IOException { + return new PolicyBasedRoutingServiceStubSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStub.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStub.java new file mode 100644 index 000000000000..94f61e0227be --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStub.java @@ -0,0 +1,158 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListRemoteTransportProfilesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListTransportsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.GetTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +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 TransportManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class TransportManagerStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listRemoteTransportProfilesPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRemoteTransportProfilesPagedCallable()"); + } + + public UnaryCallable + listRemoteTransportProfilesCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRemoteTransportProfilesCallable()"); + } + + public UnaryCallable + getRemoteTransportProfileCallable() { + throw new UnsupportedOperationException("Not implemented: getRemoteTransportProfileCallable()"); + } + + public UnaryCallable + listTransportsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransportsPagedCallable()"); + } + + public UnaryCallable listTransportsCallable() { + throw new UnsupportedOperationException("Not implemented: listTransportsCallable()"); + } + + public UnaryCallable getTransportCallable() { + throw new UnsupportedOperationException("Not implemented: getTransportCallable()"); + } + + public UnaryCallable getStatusCallable() { + throw new UnsupportedOperationException("Not implemented: getStatusCallable()"); + } + + public OperationCallable + createTransportOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createTransportOperationCallable()"); + } + + public UnaryCallable createTransportCallable() { + throw new UnsupportedOperationException("Not implemented: createTransportCallable()"); + } + + public OperationCallable + updateTransportOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateTransportOperationCallable()"); + } + + public UnaryCallable updateTransportCallable() { + throw new UnsupportedOperationException("Not implemented: updateTransportCallable()"); + } + + public OperationCallable + deleteTransportOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTransportOperationCallable()"); + } + + public UnaryCallable deleteTransportCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTransportCallable()"); + } + + 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-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStubSettings.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStubSettings.java new file mode 100644 index 000000000000..78d4c325bd89 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/java/com/google/cloud/networkconnectivity/v1beta/stub/TransportManagerStubSettings.java @@ -0,0 +1,995 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub; + +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListRemoteTransportProfilesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListTransportsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.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.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.GetTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +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.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link TransportManagerStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TransportManagerStubSettings.Builder transportManagerSettingsBuilder =
+ *     TransportManagerStubSettings.newBuilder();
+ * transportManagerSettingsBuilder
+ *     .getRemoteTransportProfileSettings()
+ *     .setRetrySettings(
+ *         transportManagerSettingsBuilder
+ *             .getRemoteTransportProfileSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * TransportManagerStubSettings transportManagerSettings = transportManagerSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * TransportManagerStubSettings.Builder transportManagerSettingsBuilder =
+ *     TransportManagerStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * transportManagerSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class TransportManagerStubSettings 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< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings; + private final UnaryCallSettings + getRemoteTransportProfileSettings; + private final PagedCallSettings< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings; + private final UnaryCallSettings getTransportSettings; + private final UnaryCallSettings getStatusSettings; + private final UnaryCallSettings createTransportSettings; + private final OperationCallSettings + createTransportOperationSettings; + private final UnaryCallSettings updateTransportSettings; + private final OperationCallSettings + updateTransportOperationSettings; + private final UnaryCallSettings deleteTransportSettings; + private final OperationCallSettings + deleteTransportOperationSettings; + 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< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + LIST_REMOTE_TRANSPORT_PROFILES_PAGE_STR_DESC = + new PagedListDescriptor< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRemoteTransportProfilesRequest injectToken( + ListRemoteTransportProfilesRequest payload, String token) { + return ListRemoteTransportProfilesRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListRemoteTransportProfilesRequest injectPageSize( + ListRemoteTransportProfilesRequest payload, int pageSize) { + return ListRemoteTransportProfilesRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListRemoteTransportProfilesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRemoteTransportProfilesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListRemoteTransportProfilesResponse payload) { + return payload.getRemoteTransportProfilesList(); + } + }; + + private static final PagedListDescriptor + LIST_TRANSPORTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransportsRequest injectToken(ListTransportsRequest payload, String token) { + return ListTransportsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransportsRequest injectPageSize( + ListTransportsRequest payload, int pageSize) { + return ListTransportsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTransportsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransportsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTransportsResponse payload) { + return payload.getTransportsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + LIST_REMOTE_TRANSPORT_PROFILES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + ListRemoteTransportProfilesRequest, ListRemoteTransportProfilesResponse> + callable, + ListRemoteTransportProfilesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + RemoteTransportProfile> + pageContext = + PageContext.create( + callable, LIST_REMOTE_TRANSPORT_PROFILES_PAGE_STR_DESC, request, context); + return ListRemoteTransportProfilesPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + LIST_TRANSPORTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTransportsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TRANSPORTS_PAGE_STR_DESC, request, context); + return ListTransportsPagedResponse.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 listRemoteTransportProfiles. */ + public PagedCallSettings< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings() { + return listRemoteTransportProfilesSettings; + } + + /** Returns the object with the settings used for calls to getRemoteTransportProfile. */ + public UnaryCallSettings + getRemoteTransportProfileSettings() { + return getRemoteTransportProfileSettings; + } + + /** Returns the object with the settings used for calls to listTransports. */ + public PagedCallSettings< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings() { + return listTransportsSettings; + } + + /** Returns the object with the settings used for calls to getTransport. */ + public UnaryCallSettings getTransportSettings() { + return getTransportSettings; + } + + /** Returns the object with the settings used for calls to getStatus. */ + public UnaryCallSettings getStatusSettings() { + return getStatusSettings; + } + + /** Returns the object with the settings used for calls to createTransport. */ + public UnaryCallSettings createTransportSettings() { + return createTransportSettings; + } + + /** Returns the object with the settings used for calls to createTransport. */ + public OperationCallSettings + createTransportOperationSettings() { + return createTransportOperationSettings; + } + + /** Returns the object with the settings used for calls to updateTransport. */ + public UnaryCallSettings updateTransportSettings() { + return updateTransportSettings; + } + + /** Returns the object with the settings used for calls to updateTransport. */ + public OperationCallSettings + updateTransportOperationSettings() { + return updateTransportOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteTransport. */ + public UnaryCallSettings deleteTransportSettings() { + return deleteTransportSettings; + } + + /** Returns the object with the settings used for calls to deleteTransport. */ + public OperationCallSettings + deleteTransportOperationSettings() { + return deleteTransportOperationSettings; + } + + /** 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 TransportManagerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcTransportManagerStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "networkconnectivity"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "networkconnectivity.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "networkconnectivity.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 ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(TransportManagerStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 TransportManagerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listRemoteTransportProfilesSettings = + settingsBuilder.listRemoteTransportProfilesSettings().build(); + getRemoteTransportProfileSettings = settingsBuilder.getRemoteTransportProfileSettings().build(); + listTransportsSettings = settingsBuilder.listTransportsSettings().build(); + getTransportSettings = settingsBuilder.getTransportSettings().build(); + getStatusSettings = settingsBuilder.getStatusSettings().build(); + createTransportSettings = settingsBuilder.createTransportSettings().build(); + createTransportOperationSettings = settingsBuilder.createTransportOperationSettings().build(); + updateTransportSettings = settingsBuilder.updateTransportSettings().build(); + updateTransportOperationSettings = settingsBuilder.updateTransportOperationSettings().build(); + deleteTransportSettings = settingsBuilder.deleteTransportSettings().build(); + deleteTransportOperationSettings = settingsBuilder.deleteTransportOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for TransportManagerStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings; + private final UnaryCallSettings.Builder< + GetRemoteTransportProfileRequest, RemoteTransportProfile> + getRemoteTransportProfileSettings; + private final PagedCallSettings.Builder< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings; + private final UnaryCallSettings.Builder getTransportSettings; + private final UnaryCallSettings.Builder getStatusSettings; + private final UnaryCallSettings.Builder + createTransportSettings; + private final OperationCallSettings.Builder< + CreateTransportRequest, Transport, OperationMetadata> + createTransportOperationSettings; + private final UnaryCallSettings.Builder + updateTransportSettings; + private final OperationCallSettings.Builder< + UpdateTransportRequest, Transport, OperationMetadata> + updateTransportOperationSettings; + private final UnaryCallSettings.Builder + deleteTransportSettings; + private final OperationCallSettings.Builder + deleteTransportOperationSettings; + 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( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listRemoteTransportProfilesSettings = + PagedCallSettings.newBuilder(LIST_REMOTE_TRANSPORT_PROFILES_PAGE_STR_FACT); + getRemoteTransportProfileSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTransportsSettings = PagedCallSettings.newBuilder(LIST_TRANSPORTS_PAGE_STR_FACT); + getTransportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getStatusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTransportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTransportOperationSettings = OperationCallSettings.newBuilder(); + updateTransportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTransportOperationSettings = OperationCallSettings.newBuilder(); + deleteTransportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteTransportOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listRemoteTransportProfilesSettings, + getRemoteTransportProfileSettings, + listTransportsSettings, + getTransportSettings, + getStatusSettings, + createTransportSettings, + updateTransportSettings, + deleteTransportSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(TransportManagerStubSettings settings) { + super(settings); + + listRemoteTransportProfilesSettings = + settings.listRemoteTransportProfilesSettings.toBuilder(); + getRemoteTransportProfileSettings = settings.getRemoteTransportProfileSettings.toBuilder(); + listTransportsSettings = settings.listTransportsSettings.toBuilder(); + getTransportSettings = settings.getTransportSettings.toBuilder(); + getStatusSettings = settings.getStatusSettings.toBuilder(); + createTransportSettings = settings.createTransportSettings.toBuilder(); + createTransportOperationSettings = settings.createTransportOperationSettings.toBuilder(); + updateTransportSettings = settings.updateTransportSettings.toBuilder(); + updateTransportOperationSettings = settings.updateTransportOperationSettings.toBuilder(); + deleteTransportSettings = settings.deleteTransportSettings.toBuilder(); + deleteTransportOperationSettings = settings.deleteTransportOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listRemoteTransportProfilesSettings, + getRemoteTransportProfileSettings, + listTransportsSettings, + getTransportSettings, + getStatusSettings, + createTransportSettings, + updateTransportSettings, + deleteTransportSettings, + 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.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listRemoteTransportProfilesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getRemoteTransportProfileSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTransportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getTransportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getStatusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTransportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateTransportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteTransportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createTransportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Transport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateTransportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Transport.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteTransportOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + 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 listRemoteTransportProfiles. */ + public PagedCallSettings.Builder< + ListRemoteTransportProfilesRequest, + ListRemoteTransportProfilesResponse, + ListRemoteTransportProfilesPagedResponse> + listRemoteTransportProfilesSettings() { + return listRemoteTransportProfilesSettings; + } + + /** Returns the builder for the settings used for calls to getRemoteTransportProfile. */ + public UnaryCallSettings.Builder + getRemoteTransportProfileSettings() { + return getRemoteTransportProfileSettings; + } + + /** Returns the builder for the settings used for calls to listTransports. */ + public PagedCallSettings.Builder< + ListTransportsRequest, ListTransportsResponse, ListTransportsPagedResponse> + listTransportsSettings() { + return listTransportsSettings; + } + + /** Returns the builder for the settings used for calls to getTransport. */ + public UnaryCallSettings.Builder getTransportSettings() { + return getTransportSettings; + } + + /** Returns the builder for the settings used for calls to getStatus. */ + public UnaryCallSettings.Builder getStatusSettings() { + return getStatusSettings; + } + + /** Returns the builder for the settings used for calls to createTransport. */ + public UnaryCallSettings.Builder createTransportSettings() { + return createTransportSettings; + } + + /** Returns the builder for the settings used for calls to createTransport. */ + public OperationCallSettings.Builder + createTransportOperationSettings() { + return createTransportOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateTransport. */ + public UnaryCallSettings.Builder updateTransportSettings() { + return updateTransportSettings; + } + + /** Returns the builder for the settings used for calls to updateTransport. */ + public OperationCallSettings.Builder + updateTransportOperationSettings() { + return updateTransportOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteTransport. */ + public UnaryCallSettings.Builder deleteTransportSettings() { + return deleteTransportSettings; + } + + /** Returns the builder for the settings used for calls to deleteTransport. */ + public OperationCallSettings.Builder + deleteTransportOperationSettings() { + return deleteTransportOperationSettings; + } + + /** 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 TransportManagerStubSettings build() throws IOException { + return new TransportManagerStubSettings(this); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1beta/reflect-config.json b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1beta/reflect-config.json new file mode 100644 index 000000000000..7c0f077a9f84 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/main/resources/META-INF/native-image/com.google.cloud.networkconnectivity.v1beta/reflect-config.json @@ -0,0 +1,4160 @@ +[ + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldInfo$Format", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.TypeReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.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.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AutoAccept", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.AutoAccept$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Destination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Destination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Destination$DestinationEndpoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Destination$DestinationEndpoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Destination$DestinationEndpoint$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Gateway", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Gateway$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Gateway$GatewayCapacity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Gateway$IpRangeReservation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Gateway$IpRangeReservation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute$Recipient", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse$ConnectivityStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse$MacSecStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse$OperationalStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetStatusResponse$OverallStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetTransportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.GetTransportRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Group", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Group$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Hub", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Hub$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.HubStatusEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.HubStatusEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest$SpokeView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListHubsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LocationFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LocationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.LocationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopSpoke", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopSpoke$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.OperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.OperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Filter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Filter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Filter$ProtocolVersion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$InterconnectAttachment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$InterconnectAttachment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$OtherRoutes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$VirtualMachine", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$VirtualMachine$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Warnings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Warnings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute$Warnings$Code", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PolicyMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PresetTopology", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus$Code", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile$Bandwidth", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile$KeyProvisioningFlow", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile$ServiceLevelAvailability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Route", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Route$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RouteTable", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RouteTable$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RouteType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RoutingVPC", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.RoutingVPC$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ServiceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ServiceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.ServiceConfig$EligibilityCriteria", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Spoke", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Spoke$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Spoke$StateReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Spoke$StateReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Spoke$StateReason$Code", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeStateCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeStateCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeStateReasonCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeStateReasonCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeTypeCount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeSummary$SpokeTypeCount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.SpokeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.StateTimeline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.StateTimeline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.StateTimeline$StateMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.StateTimeline$StateMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.StateTimeline$StateMetadata$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Transport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Transport$Bandwidth", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Transport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Transport$StackType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.Transport$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest$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$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.rpc.Status$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClientTest.java new file mode 100644 index 000000000000..8f8cf0c1718e --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceClientTest.java @@ -0,0 +1,1559 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListDestinationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferConfigsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient.ListMulticloudDataTransferSupportedServicesPagedResponse; + +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 DataTransferServiceClientTest { + private static MockDataTransferService mockDataTransferService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataTransferServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataTransferService = new MockDataTransferService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataTransferService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataTransferServiceSettings settings = + DataTransferServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataTransferServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listMulticloudDataTransferConfigsTest() throws Exception { + MulticloudDataTransferConfig responsesElement = + MulticloudDataTransferConfig.newBuilder().build(); + ListMulticloudDataTransferConfigsResponse expectedResponse = + ListMulticloudDataTransferConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMulticloudDataTransferConfigs(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListMulticloudDataTransferConfigsPagedResponse pagedListResponse = + client.listMulticloudDataTransferConfigs(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMulticloudDataTransferConfigsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMulticloudDataTransferConfigsRequest actualRequest = + ((ListMulticloudDataTransferConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMulticloudDataTransferConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMulticloudDataTransferConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMulticloudDataTransferConfigsTest2() throws Exception { + MulticloudDataTransferConfig responsesElement = + MulticloudDataTransferConfig.newBuilder().build(); + ListMulticloudDataTransferConfigsResponse expectedResponse = + ListMulticloudDataTransferConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllMulticloudDataTransferConfigs(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMulticloudDataTransferConfigsPagedResponse pagedListResponse = + client.listMulticloudDataTransferConfigs(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMulticloudDataTransferConfigsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMulticloudDataTransferConfigsRequest actualRequest = + ((ListMulticloudDataTransferConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMulticloudDataTransferConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMulticloudDataTransferConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMulticloudDataTransferConfigTest() throws Exception { + MulticloudDataTransferConfig expectedResponse = + MulticloudDataTransferConfig.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setDestinationsCount(-1276771723) + .setDestinationsActiveCount(-331520400) + .putAllServices(new HashMap()) + .setUid("uid115792") + .build(); + mockDataTransferService.addResponse(expectedResponse); + + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + + MulticloudDataTransferConfig actualResponse = client.getMulticloudDataTransferConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMulticloudDataTransferConfigRequest actualRequest = + ((GetMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMulticloudDataTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + client.getMulticloudDataTransferConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMulticloudDataTransferConfigTest2() throws Exception { + MulticloudDataTransferConfig expectedResponse = + MulticloudDataTransferConfig.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setDestinationsCount(-1276771723) + .setDestinationsActiveCount(-331520400) + .putAllServices(new HashMap()) + .setUid("uid115792") + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String name = "name3373707"; + + MulticloudDataTransferConfig actualResponse = client.getMulticloudDataTransferConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMulticloudDataTransferConfigRequest actualRequest = + ((GetMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMulticloudDataTransferConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String name = "name3373707"; + client.getMulticloudDataTransferConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createMulticloudDataTransferConfigTest() throws Exception { + MulticloudDataTransferConfig expectedResponse = + MulticloudDataTransferConfig.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setDestinationsCount(-1276771723) + .setDestinationsActiveCount(-331520400) + .putAllServices(new HashMap()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMulticloudDataTransferConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + + MulticloudDataTransferConfig actualResponse = + client + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMulticloudDataTransferConfigRequest actualRequest = + ((CreateMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals( + multicloudDataTransferConfig, actualRequest.getMulticloudDataTransferConfig()); + Assert.assertEquals( + multicloudDataTransferConfigId, actualRequest.getMulticloudDataTransferConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMulticloudDataTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + client + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .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 createMulticloudDataTransferConfigTest2() throws Exception { + MulticloudDataTransferConfig expectedResponse = + MulticloudDataTransferConfig.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setDestinationsCount(-1276771723) + .setDestinationsActiveCount(-331520400) + .putAllServices(new HashMap()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createMulticloudDataTransferConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + String parent = "parent-995424086"; + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + + MulticloudDataTransferConfig actualResponse = + client + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateMulticloudDataTransferConfigRequest actualRequest = + ((CreateMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals( + multicloudDataTransferConfig, actualRequest.getMulticloudDataTransferConfig()); + Assert.assertEquals( + multicloudDataTransferConfigId, actualRequest.getMulticloudDataTransferConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createMulticloudDataTransferConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String parent = "parent-995424086"; + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + client + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .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 updateMulticloudDataTransferConfigTest() throws Exception { + MulticloudDataTransferConfig expectedResponse = + MulticloudDataTransferConfig.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setDestinationsCount(-1276771723) + .setDestinationsActiveCount(-331520400) + .putAllServices(new HashMap()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateMulticloudDataTransferConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + MulticloudDataTransferConfig actualResponse = + client + .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, updateMask) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateMulticloudDataTransferConfigRequest actualRequest = + ((UpdateMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + multicloudDataTransferConfig, actualRequest.getMulticloudDataTransferConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateMulticloudDataTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client + .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, 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 deleteMulticloudDataTransferConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteMulticloudDataTransferConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + + client.deleteMulticloudDataTransferConfigAsync(name).get(); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMulticloudDataTransferConfigRequest actualRequest = + ((DeleteMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMulticloudDataTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + client.deleteMulticloudDataTransferConfigAsync(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 deleteMulticloudDataTransferConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteMulticloudDataTransferConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteMulticloudDataTransferConfigAsync(name).get(); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteMulticloudDataTransferConfigRequest actualRequest = + ((DeleteMulticloudDataTransferConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteMulticloudDataTransferConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String name = "name3373707"; + client.deleteMulticloudDataTransferConfigAsync(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 listDestinationsTest() throws Exception { + Destination responsesElement = Destination.newBuilder().build(); + ListDestinationsResponse expectedResponse = + ListDestinationsResponse.newBuilder() + .setNextPageToken("") + .addAllDestinations(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + + ListDestinationsPagedResponse pagedListResponse = client.listDestinations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDestinationsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDestinationsRequest actualRequest = ((ListDestinationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDestinationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + client.listDestinations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDestinationsTest2() throws Exception { + Destination responsesElement = Destination.newBuilder().build(); + ListDestinationsResponse expectedResponse = + ListDestinationsResponse.newBuilder() + .setNextPageToken("") + .addAllDestinations(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDestinationsPagedResponse pagedListResponse = client.listDestinations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDestinationsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDestinationsRequest actualRequest = ((ListDestinationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDestinationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDestinations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDestinationTest() throws Exception { + Destination expectedResponse = + Destination.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setIpPrefix("ipPrefix1326379673") + .addAllEndpoints(new ArrayList()) + .setStateTimeline(StateTimeline.newBuilder().build()) + .setUid("uid115792") + .build(); + mockDataTransferService.addResponse(expectedResponse); + + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + + Destination actualResponse = client.getDestination(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDestinationRequest actualRequest = ((GetDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDestinationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + client.getDestination(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDestinationTest2() throws Exception { + Destination expectedResponse = + Destination.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setIpPrefix("ipPrefix1326379673") + .addAllEndpoints(new ArrayList()) + .setStateTimeline(StateTimeline.newBuilder().build()) + .setUid("uid115792") + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String name = "name3373707"; + + Destination actualResponse = client.getDestination(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDestinationRequest actualRequest = ((GetDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDestinationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String name = "name3373707"; + client.getDestination(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDestinationTest() throws Exception { + Destination expectedResponse = + Destination.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setIpPrefix("ipPrefix1326379673") + .addAllEndpoints(new ArrayList()) + .setStateTimeline(StateTimeline.newBuilder().build()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDestinationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + + Destination actualResponse = + client.createDestinationAsync(parent, destination, destinationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDestinationRequest actualRequest = ((CreateDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(destination, actualRequest.getDestination()); + Assert.assertEquals(destinationId, actualRequest.getDestinationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDestinationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + client.createDestinationAsync(parent, destination, destinationId).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 createDestinationTest2() throws Exception { + Destination expectedResponse = + Destination.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setIpPrefix("ipPrefix1326379673") + .addAllEndpoints(new ArrayList()) + .setStateTimeline(StateTimeline.newBuilder().build()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDestinationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + + Destination actualResponse = + client.createDestinationAsync(parent, destination, destinationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDestinationRequest actualRequest = ((CreateDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(destination, actualRequest.getDestination()); + Assert.assertEquals(destinationId, actualRequest.getDestinationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDestinationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String parent = "parent-995424086"; + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + client.createDestinationAsync(parent, destination, destinationId).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 updateDestinationTest() throws Exception { + Destination expectedResponse = + Destination.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setDescription("description-1724546052") + .setIpPrefix("ipPrefix1326379673") + .addAllEndpoints(new ArrayList()) + .setStateTimeline(StateTimeline.newBuilder().build()) + .setUid("uid115792") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDestinationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + Destination destination = Destination.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Destination actualResponse = client.updateDestinationAsync(destination, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDestinationRequest actualRequest = ((UpdateDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(destination, actualRequest.getDestination()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDestinationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + Destination destination = Destination.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDestinationAsync(destination, 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 deleteDestinationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDestinationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + + client.deleteDestinationAsync(name).get(); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDestinationRequest actualRequest = ((DeleteDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDestinationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + client.deleteDestinationAsync(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 deleteDestinationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDestinationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTransferService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDestinationAsync(name).get(); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDestinationRequest actualRequest = ((DeleteDestinationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDestinationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDestinationAsync(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 getMulticloudDataTransferSupportedServiceTest() throws Exception { + MulticloudDataTransferSupportedService expectedResponse = + MulticloudDataTransferSupportedService.newBuilder() + .setName( + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]") + .toString()) + .addAllServiceConfigs(new ArrayList()) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + MulticloudDataTransferSupportedServiceName name = + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]"); + + MulticloudDataTransferSupportedService actualResponse = + client.getMulticloudDataTransferSupportedService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMulticloudDataTransferSupportedServiceRequest actualRequest = + ((GetMulticloudDataTransferSupportedServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMulticloudDataTransferSupportedServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + MulticloudDataTransferSupportedServiceName name = + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]"); + client.getMulticloudDataTransferSupportedService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMulticloudDataTransferSupportedServiceTest2() throws Exception { + MulticloudDataTransferSupportedService expectedResponse = + MulticloudDataTransferSupportedService.newBuilder() + .setName( + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]") + .toString()) + .addAllServiceConfigs(new ArrayList()) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String name = "name3373707"; + + MulticloudDataTransferSupportedService actualResponse = + client.getMulticloudDataTransferSupportedService(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMulticloudDataTransferSupportedServiceRequest actualRequest = + ((GetMulticloudDataTransferSupportedServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMulticloudDataTransferSupportedServiceExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String name = "name3373707"; + client.getMulticloudDataTransferSupportedService(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMulticloudDataTransferSupportedServicesTest() throws Exception { + MulticloudDataTransferSupportedService responsesElement = + MulticloudDataTransferSupportedService.newBuilder().build(); + ListMulticloudDataTransferSupportedServicesResponse expectedResponse = + ListMulticloudDataTransferSupportedServicesResponse.newBuilder() + .setNextPageToken("") + .addAllMulticloudDataTransferSupportedServices(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListMulticloudDataTransferSupportedServicesPagedResponse pagedListResponse = + client.listMulticloudDataTransferSupportedServices(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMulticloudDataTransferSupportedServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMulticloudDataTransferSupportedServicesRequest actualRequest = + ((ListMulticloudDataTransferSupportedServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMulticloudDataTransferSupportedServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listMulticloudDataTransferSupportedServices(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listMulticloudDataTransferSupportedServicesTest2() throws Exception { + MulticloudDataTransferSupportedService responsesElement = + MulticloudDataTransferSupportedService.newBuilder().build(); + ListMulticloudDataTransferSupportedServicesResponse expectedResponse = + ListMulticloudDataTransferSupportedServicesResponse.newBuilder() + .setNextPageToken("") + .addAllMulticloudDataTransferSupportedServices(Arrays.asList(responsesElement)) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListMulticloudDataTransferSupportedServicesPagedResponse pagedListResponse = + client.listMulticloudDataTransferSupportedServices(parent); + + List resources = + Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals( + expectedResponse.getMulticloudDataTransferSupportedServicesList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListMulticloudDataTransferSupportedServicesRequest actualRequest = + ((ListMulticloudDataTransferSupportedServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listMulticloudDataTransferSupportedServicesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listMulticloudDataTransferSupportedServices(parent); + 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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClientTest.java new file mode 100644 index 000000000000..acc2d9209b02 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/HubServiceClientTest.java @@ -0,0 +1,3375 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGatewayAdvertisedRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListGroupsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListHubsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRouteTablesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListRoutesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.ListSpokesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.HubServiceClient.QueryHubStatusPagedResponse; + +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 HubServiceClientTest { + private static MockHubService mockHubService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private HubServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockHubService = new MockHubService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockHubService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + HubServiceSettings settings = + HubServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = HubServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listHubsTest() throws Exception { + Hub responsesElement = Hub.newBuilder().build(); + ListHubsResponse expectedResponse = + ListHubsResponse.newBuilder() + .setNextPageToken("") + .addAllHubs(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListHubsPagedResponse pagedListResponse = client.listHubs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHubsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubsRequest actualRequest = ((ListHubsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listHubs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHubsTest2() throws Exception { + Hub responsesElement = Hub.newBuilder().build(); + ListHubsResponse expectedResponse = + ListHubsResponse.newBuilder() + .setNextPageToken("") + .addAllHubs(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListHubsPagedResponse pagedListResponse = client.listHubs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHubsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubsRequest actualRequest = ((ListHubsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listHubs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHubTest() throws Exception { + Hub expectedResponse = + Hub.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) + .setPolicyMode(PolicyMode.forNumber(0)) + .setPresetTopology(PresetTopology.forNumber(0)) + .setExportPsc(true) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + + Hub actualResponse = client.getHub(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHubRequest actualRequest = ((GetHubRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHubExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + client.getHub(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getHubTest2() throws Exception { + Hub expectedResponse = + Hub.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) + .setPolicyMode(PolicyMode.forNumber(0)) + .setPresetTopology(PresetTopology.forNumber(0)) + .setExportPsc(true) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Hub actualResponse = client.getHub(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetHubRequest actualRequest = ((GetHubRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getHubExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getHub(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createHubTest() throws Exception { + Hub expectedResponse = + Hub.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) + .setPolicyMode(PolicyMode.forNumber(0)) + .setPresetTopology(PresetTopology.forNumber(0)) + .setExportPsc(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHubTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + + Hub actualResponse = client.createHubAsync(parent, hub, hubId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHubRequest actualRequest = ((CreateHubRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(hub, actualRequest.getHub()); + Assert.assertEquals(hubId, actualRequest.getHubId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHubExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + client.createHubAsync(parent, hub, hubId).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 createHubTest2() throws Exception { + Hub expectedResponse = + Hub.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) + .setPolicyMode(PolicyMode.forNumber(0)) + .setPresetTopology(PresetTopology.forNumber(0)) + .setExportPsc(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createHubTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + + Hub actualResponse = client.createHubAsync(parent, hub, hubId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateHubRequest actualRequest = ((CreateHubRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(hub, actualRequest.getHub()); + Assert.assertEquals(hubId, actualRequest.getHubId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createHubExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + client.createHubAsync(parent, hub, hubId).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 updateHubTest() throws Exception { + Hub expectedResponse = + Hub.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllRoutingVpcs(new ArrayList()) + .addAllRouteTables(new ArrayList()) + .setSpokeSummary(SpokeSummary.newBuilder().build()) + .setPolicyMode(PolicyMode.forNumber(0)) + .setPresetTopology(PresetTopology.forNumber(0)) + .setExportPsc(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateHubTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + Hub hub = Hub.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Hub actualResponse = client.updateHubAsync(hub, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateHubRequest actualRequest = ((UpdateHubRequest) actualRequests.get(0)); + + Assert.assertEquals(hub, actualRequest.getHub()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateHubExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + Hub hub = Hub.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateHubAsync(hub, 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 deleteHubTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHubTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + + client.deleteHubAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHubRequest actualRequest = ((DeleteHubRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHubExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + client.deleteHubAsync(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 deleteHubTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteHubTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteHubAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteHubRequest actualRequest = ((DeleteHubRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteHubExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.deleteHubAsync(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 listHubSpokesTest() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListHubSpokesResponse expectedResponse = + ListHubSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + + ListHubSpokesPagedResponse pagedListResponse = client.listHubSpokes(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubSpokesRequest actualRequest = ((ListHubSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubSpokesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + client.listHubSpokes(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listHubSpokesTest2() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListHubSpokesResponse expectedResponse = + ListHubSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + ListHubSpokesPagedResponse pagedListResponse = client.listHubSpokes(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListHubSpokesRequest actualRequest = ((ListHubSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listHubSpokesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.listHubSpokes(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryHubStatusTest() throws Exception { + HubStatusEntry responsesElement = HubStatusEntry.newBuilder().build(); + QueryHubStatusResponse expectedResponse = + QueryHubStatusResponse.newBuilder() + .setNextPageToken("") + .addAllHubStatusEntries(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + + QueryHubStatusPagedResponse pagedListResponse = client.queryHubStatus(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHubStatusEntriesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryHubStatusRequest actualRequest = ((QueryHubStatusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryHubStatusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + client.queryHubStatus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void queryHubStatusTest2() throws Exception { + HubStatusEntry responsesElement = HubStatusEntry.newBuilder().build(); + QueryHubStatusResponse expectedResponse = + QueryHubStatusResponse.newBuilder() + .setNextPageToken("") + .addAllHubStatusEntries(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + QueryHubStatusPagedResponse pagedListResponse = client.queryHubStatus(name); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getHubStatusEntriesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + QueryHubStatusRequest actualRequest = ((QueryHubStatusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void queryHubStatusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.queryHubStatus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSpokesTest() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListSpokesResponse expectedResponse = + ListSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListSpokesPagedResponse pagedListResponse = client.listSpokes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSpokesRequest actualRequest = ((ListSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSpokesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listSpokes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSpokesTest2() throws Exception { + Spoke responsesElement = Spoke.newBuilder().build(); + ListSpokesResponse expectedResponse = + ListSpokesResponse.newBuilder() + .setNextPageToken("") + .addAllSpokes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSpokesPagedResponse pagedListResponse = client.listSpokes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSpokesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSpokesRequest actualRequest = ((ListSpokesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSpokesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSpokes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSpokeTest() throws Exception { + Spoke expectedResponse = + Spoke.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) + .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) + .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) + .setGateway(Gateway.newBuilder().build()) + .setLinkedProducerVpcNetwork(LinkedProducerVpcNetwork.newBuilder().build()) + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) + .setEtag("etag3123477") + .addAllFieldPathsPendingUpdate(new ArrayList()) + .build(); + mockHubService.addResponse(expectedResponse); + + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + Spoke actualResponse = client.getSpoke(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSpokeRequest actualRequest = ((GetSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.getSpoke(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSpokeTest2() throws Exception { + Spoke expectedResponse = + Spoke.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) + .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) + .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) + .setGateway(Gateway.newBuilder().build()) + .setLinkedProducerVpcNetwork(LinkedProducerVpcNetwork.newBuilder().build()) + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) + .setEtag("etag3123477") + .addAllFieldPathsPendingUpdate(new ArrayList()) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Spoke actualResponse = client.getSpoke(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSpokeRequest actualRequest = ((GetSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getSpoke(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createSpokeTest() throws Exception { + Spoke expectedResponse = + Spoke.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) + .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) + .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) + .setGateway(Gateway.newBuilder().build()) + .setLinkedProducerVpcNetwork(LinkedProducerVpcNetwork.newBuilder().build()) + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) + .setEtag("etag3123477") + .addAllFieldPathsPendingUpdate(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + + Spoke actualResponse = client.createSpokeAsync(parent, spoke, spokeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSpokeRequest actualRequest = ((CreateSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(spoke, actualRequest.getSpoke()); + Assert.assertEquals(spokeId, actualRequest.getSpokeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + client.createSpokeAsync(parent, spoke, spokeId).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 createSpokeTest2() throws Exception { + Spoke expectedResponse = + Spoke.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) + .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) + .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) + .setGateway(Gateway.newBuilder().build()) + .setLinkedProducerVpcNetwork(LinkedProducerVpcNetwork.newBuilder().build()) + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) + .setEtag("etag3123477") + .addAllFieldPathsPendingUpdate(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String parent = "parent-995424086"; + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + + Spoke actualResponse = client.createSpokeAsync(parent, spoke, spokeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateSpokeRequest actualRequest = ((CreateSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(spoke, actualRequest.getSpoke()); + Assert.assertEquals(spokeId, actualRequest.getSpokeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + client.createSpokeAsync(parent, spoke, spokeId).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 updateSpokeTest() throws Exception { + Spoke expectedResponse = + Spoke.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setHub(HubName.of("[PROJECT]", "[HUB]").toString()) + .setGroup(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setLinkedVpnTunnels(LinkedVpnTunnels.newBuilder().build()) + .setLinkedInterconnectAttachments(LinkedInterconnectAttachments.newBuilder().build()) + .setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances.newBuilder().build()) + .setLinkedVpcNetwork(LinkedVpcNetwork.newBuilder().build()) + .setGateway(Gateway.newBuilder().build()) + .setLinkedProducerVpcNetwork(LinkedProducerVpcNetwork.newBuilder().build()) + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .addAllReasons(new ArrayList()) + .setSpokeType(SpokeType.forNumber(0)) + .setEtag("etag3123477") + .addAllFieldPathsPendingUpdate(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + Spoke spoke = Spoke.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Spoke actualResponse = client.updateSpokeAsync(spoke, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateSpokeRequest actualRequest = ((UpdateSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(spoke, actualRequest.getSpoke()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + Spoke spoke = Spoke.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateSpokeAsync(spoke, 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 rejectHubSpokeTest() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.rejectHubSpokeAsync(name, spokeUri).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 rejectHubSpokeTest2() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + client.rejectHubSpokeAsync(name, spokeUri).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 rejectHubSpokeTest3() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.rejectHubSpokeAsync(name, spokeUri).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 rejectHubSpokeTest4() throws Exception { + RejectHubSpokeResponse expectedResponse = + RejectHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + + RejectHubSpokeResponse actualResponse = client.rejectHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectHubSpokeRequest actualRequest = ((RejectHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectHubSpokeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + client.rejectHubSpokeAsync(name, spokeUri).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 acceptHubSpokeTest() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.acceptHubSpokeAsync(name, spokeUri).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 acceptHubSpokeTest2() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + client.acceptHubSpokeAsync(name, spokeUri).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 acceptHubSpokeTest3() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.acceptHubSpokeAsync(name, spokeUri).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 acceptHubSpokeTest4() throws Exception { + AcceptHubSpokeResponse expectedResponse = + AcceptHubSpokeResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptHubSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + + AcceptHubSpokeResponse actualResponse = client.acceptHubSpokeAsync(name, spokeUri).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptHubSpokeRequest actualRequest = ((AcceptHubSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptHubSpokeExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + client.acceptHubSpokeAsync(name, spokeUri).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 acceptSpokeUpdateTest() throws Exception { + AcceptSpokeUpdateResponse expectedResponse = + AcceptSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + + AcceptSpokeUpdateResponse actualResponse = + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptSpokeUpdateRequest actualRequest = ((AcceptSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptSpokeUpdateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).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 acceptSpokeUpdateTest2() throws Exception { + AcceptSpokeUpdateResponse expectedResponse = + AcceptSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + + AcceptSpokeUpdateResponse actualResponse = + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptSpokeUpdateRequest actualRequest = ((AcceptSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptSpokeUpdateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).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 acceptSpokeUpdateTest3() throws Exception { + AcceptSpokeUpdateResponse expectedResponse = + AcceptSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + + AcceptSpokeUpdateResponse actualResponse = + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptSpokeUpdateRequest actualRequest = ((AcceptSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptSpokeUpdateExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).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 acceptSpokeUpdateTest4() throws Exception { + AcceptSpokeUpdateResponse expectedResponse = + AcceptSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("acceptSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + + AcceptSpokeUpdateResponse actualResponse = + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcceptSpokeUpdateRequest actualRequest = ((AcceptSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void acceptSpokeUpdateExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + client.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).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 rejectSpokeUpdateTest() throws Exception { + RejectSpokeUpdateResponse expectedResponse = + RejectSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + + RejectSpokeUpdateResponse actualResponse = + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectSpokeUpdateRequest actualRequest = ((RejectSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectSpokeUpdateExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).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 rejectSpokeUpdateTest2() throws Exception { + RejectSpokeUpdateResponse expectedResponse = + RejectSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + + RejectSpokeUpdateResponse actualResponse = + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectSpokeUpdateRequest actualRequest = ((RejectSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectSpokeUpdateExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).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 rejectSpokeUpdateTest3() throws Exception { + RejectSpokeUpdateResponse expectedResponse = + RejectSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + + RejectSpokeUpdateResponse actualResponse = + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectSpokeUpdateRequest actualRequest = ((RejectSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri.toString(), actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectSpokeUpdateExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).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 rejectSpokeUpdateTest4() throws Exception { + RejectSpokeUpdateResponse expectedResponse = + RejectSpokeUpdateResponse.newBuilder().setSpoke(Spoke.newBuilder().build()).build(); + Operation resultOperation = + Operation.newBuilder() + .setName("rejectSpokeUpdateTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + + RejectSpokeUpdateResponse actualResponse = + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RejectSpokeUpdateRequest actualRequest = ((RejectSpokeUpdateRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(spokeUri, actualRequest.getSpokeUri()); + Assert.assertEquals(spokeEtag, actualRequest.getSpokeEtag()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rejectSpokeUpdateExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + String spokeUri = "spokeUri-1839330496"; + String spokeEtag = "spokeEtag-1185145407"; + client.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).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 deleteSpokeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + client.deleteSpokeAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpokeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.deleteSpokeAsync(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 deleteSpokeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSpokeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSpokeAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSpokeRequest actualRequest = ((DeleteSpokeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSpokeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.deleteSpokeAsync(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 getRouteTableTest() throws Exception { + RouteTable expectedResponse = + RouteTable.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + + RouteTable actualResponse = client.getRouteTable(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteTableRequest actualRequest = ((GetRouteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteTableExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + client.getRouteTable(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTableTest2() throws Exception { + RouteTable expectedResponse = + RouteTable.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + RouteTable actualResponse = client.getRouteTable(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteTableRequest actualRequest = ((GetRouteTableRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteTableExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getRouteTable(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTest() throws Exception { + Route expectedResponse = + Route.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setIpCidrRange("ipCidrRange-866375486") + .setType(RouteType.forNumber(0)) + .setNextHopVpcNetwork(NextHopVpcNetwork.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setSpoke(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setLocation("location1901043637") + .setPriority(-1165461084) + .setNextHopVpnTunnel(NextHopVPNTunnel.newBuilder().build()) + .setNextHopRouterApplianceInstance(NextHopRouterApplianceInstance.newBuilder().build()) + .setNextHopInterconnectAttachment(NextHopInterconnectAttachment.newBuilder().build()) + .setNextHopSpoke(NextHopSpoke.newBuilder().build()) + .build(); + mockHubService.addResponse(expectedResponse); + + HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"); + + Route actualResponse = client.getRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteRequest actualRequest = ((GetRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"); + client.getRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRouteTest2() throws Exception { + Route expectedResponse = + Route.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setIpCidrRange("ipCidrRange-866375486") + .setType(RouteType.forNumber(0)) + .setNextHopVpcNetwork(NextHopVpcNetwork.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setSpoke(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setLocation("location1901043637") + .setPriority(-1165461084) + .setNextHopVpnTunnel(NextHopVPNTunnel.newBuilder().build()) + .setNextHopRouterApplianceInstance(NextHopRouterApplianceInstance.newBuilder().build()) + .setNextHopInterconnectAttachment(NextHopInterconnectAttachment.newBuilder().build()) + .setNextHopSpoke(NextHopSpoke.newBuilder().build()) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Route actualResponse = client.getRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRouteRequest actualRequest = ((GetRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutesTest() throws Exception { + Route responsesElement = Route.newBuilder().build(); + ListRoutesResponse expectedResponse = + ListRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + + ListRoutesPagedResponse pagedListResponse = client.listRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutesRequest actualRequest = ((ListRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + client.listRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRoutesTest2() throws Exception { + Route responsesElement = Route.newBuilder().build(); + ListRoutesResponse expectedResponse = + ListRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRoutesPagedResponse pagedListResponse = client.listRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRoutesRequest actualRequest = ((ListRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRoutesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRouteTablesTest() throws Exception { + RouteTable responsesElement = RouteTable.newBuilder().build(); + ListRouteTablesResponse expectedResponse = + ListRouteTablesResponse.newBuilder() + .setNextPageToken("") + .addAllRouteTables(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + + ListRouteTablesPagedResponse pagedListResponse = client.listRouteTables(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRouteTablesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRouteTablesRequest actualRequest = ((ListRouteTablesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRouteTablesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + client.listRouteTables(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRouteTablesTest2() throws Exception { + RouteTable responsesElement = RouteTable.newBuilder().build(); + ListRouteTablesResponse expectedResponse = + ListRouteTablesResponse.newBuilder() + .setNextPageToken("") + .addAllRouteTables(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRouteTablesPagedResponse pagedListResponse = client.listRouteTables(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRouteTablesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRouteTablesRequest actualRequest = ((ListRouteTablesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRouteTablesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRouteTables(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setAutoAccept(AutoAccept.newBuilder().build()) + .setRouteTable(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .build(); + mockHubService.addResponse(expectedResponse); + + GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGroupTest2() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setAutoAccept(AutoAccept.newBuilder().build()) + .setRouteTable(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + Group actualResponse = client.getGroup(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGroupRequest actualRequest = ((GetGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGroupExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getGroup(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGroupsTest2() throws Exception { + Group responsesElement = Group.newBuilder().build(); + ListGroupsResponse expectedResponse = + ListGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllGroups(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGroupsPagedResponse pagedListResponse = client.listGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGroupsList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGroupsRequest actualRequest = ((ListGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGroupsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGroupTest() throws Exception { + Group expectedResponse = + Group.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUid("uid115792") + .setState(State.forNumber(0)) + .setAutoAccept(AutoAccept.newBuilder().build()) + .setRouteTable(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateGroupTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Group actualResponse = client.updateGroupAsync(group, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGroupRequest actualRequest = ((UpdateGroupRequest) actualRequests.get(0)); + + Assert.assertEquals(group, actualRequest.getGroup()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGroupExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGroupAsync(group, 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 createGatewayAdvertisedRouteTest() throws Exception { + GatewayAdvertisedRoute expectedResponse = + GatewayAdvertisedRoute.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .setIpRange("ipRange1983798358") + .setPriority(-1165461084) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGatewayAdvertisedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + + GatewayAdvertisedRoute actualResponse = + client + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGatewayAdvertisedRouteRequest actualRequest = + ((CreateGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(gatewayAdvertisedRoute, actualRequest.getGatewayAdvertisedRoute()); + Assert.assertEquals(gatewayAdvertisedRouteId, actualRequest.getGatewayAdvertisedRouteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGatewayAdvertisedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + client + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .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 createGatewayAdvertisedRouteTest2() throws Exception { + GatewayAdvertisedRoute expectedResponse = + GatewayAdvertisedRoute.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .setIpRange("ipRange1983798358") + .setPriority(-1165461084) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createGatewayAdvertisedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String parent = "parent-995424086"; + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + + GatewayAdvertisedRoute actualResponse = + client + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGatewayAdvertisedRouteRequest actualRequest = + ((CreateGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(gatewayAdvertisedRoute, actualRequest.getGatewayAdvertisedRoute()); + Assert.assertEquals(gatewayAdvertisedRouteId, actualRequest.getGatewayAdvertisedRouteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGatewayAdvertisedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + client + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .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 getGatewayAdvertisedRouteTest() throws Exception { + GatewayAdvertisedRoute expectedResponse = + GatewayAdvertisedRoute.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .setIpRange("ipRange1983798358") + .setPriority(-1165461084) + .build(); + mockHubService.addResponse(expectedResponse); + + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + + GatewayAdvertisedRoute actualResponse = client.getGatewayAdvertisedRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGatewayAdvertisedRouteRequest actualRequest = + ((GetGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGatewayAdvertisedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + client.getGatewayAdvertisedRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGatewayAdvertisedRouteTest2() throws Exception { + GatewayAdvertisedRoute expectedResponse = + GatewayAdvertisedRoute.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .setIpRange("ipRange1983798358") + .setPriority(-1165461084) + .build(); + mockHubService.addResponse(expectedResponse); + + String name = "name3373707"; + + GatewayAdvertisedRoute actualResponse = client.getGatewayAdvertisedRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGatewayAdvertisedRouteRequest actualRequest = + ((GetGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGatewayAdvertisedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.getGatewayAdvertisedRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGatewayAdvertisedRoutesTest() throws Exception { + GatewayAdvertisedRoute responsesElement = GatewayAdvertisedRoute.newBuilder().build(); + ListGatewayAdvertisedRoutesResponse expectedResponse = + ListGatewayAdvertisedRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllGatewayAdvertisedRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + + ListGatewayAdvertisedRoutesPagedResponse pagedListResponse = + client.listGatewayAdvertisedRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGatewayAdvertisedRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGatewayAdvertisedRoutesRequest actualRequest = + ((ListGatewayAdvertisedRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGatewayAdvertisedRoutesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + client.listGatewayAdvertisedRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGatewayAdvertisedRoutesTest2() throws Exception { + GatewayAdvertisedRoute responsesElement = GatewayAdvertisedRoute.newBuilder().build(); + ListGatewayAdvertisedRoutesResponse expectedResponse = + ListGatewayAdvertisedRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllGatewayAdvertisedRoutes(Arrays.asList(responsesElement)) + .build(); + mockHubService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGatewayAdvertisedRoutesPagedResponse pagedListResponse = + client.listGatewayAdvertisedRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGatewayAdvertisedRoutesList().get(0), resources.get(0)); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGatewayAdvertisedRoutesRequest actualRequest = + ((ListGatewayAdvertisedRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGatewayAdvertisedRoutesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listGatewayAdvertisedRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGatewayAdvertisedRouteTest() throws Exception { + GatewayAdvertisedRoute expectedResponse = + GatewayAdvertisedRoute.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setUniqueId("uniqueId-294460212") + .setState(State.forNumber(0)) + .setIpRange("ipRange1983798358") + .setPriority(-1165461084) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateGatewayAdvertisedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + GatewayAdvertisedRoute actualResponse = + client.updateGatewayAdvertisedRouteAsync(gatewayAdvertisedRoute, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateGatewayAdvertisedRouteRequest actualRequest = + ((UpdateGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(gatewayAdvertisedRoute, actualRequest.getGatewayAdvertisedRoute()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateGatewayAdvertisedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateGatewayAdvertisedRouteAsync(gatewayAdvertisedRoute, 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 deleteGatewayAdvertisedRouteTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGatewayAdvertisedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + + client.deleteGatewayAdvertisedRouteAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGatewayAdvertisedRouteRequest actualRequest = + ((DeleteGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGatewayAdvertisedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + client.deleteGatewayAdvertisedRouteAsync(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 deleteGatewayAdvertisedRouteTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteGatewayAdvertisedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockHubService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteGatewayAdvertisedRouteAsync(name).get(); + + List actualRequests = mockHubService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGatewayAdvertisedRouteRequest actualRequest = + ((DeleteGatewayAdvertisedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGatewayAdvertisedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockHubService.addException(exception); + + try { + String name = "name3373707"; + client.deleteGatewayAdvertisedRouteAsync(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 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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferService.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferService.java new file mode 100644 index 000000000000..b1462baa5c44 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataTransferService implements MockGrpcService { + private final MockDataTransferServiceImpl serviceImpl; + + public MockDataTransferService() { + serviceImpl = new MockDataTransferServiceImpl(); + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferServiceImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferServiceImpl.java new file mode 100644 index 000000000000..b0f31c040f37 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockDataTransferServiceImpl.java @@ -0,0 +1,327 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceGrpc.DataTransferServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockDataTransferServiceImpl extends DataTransferServiceImplBase { + private List requests; + private Queue responses; + + public MockDataTransferServiceImpl() { + 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 listMulticloudDataTransferConfigs( + ListMulticloudDataTransferConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMulticloudDataTransferConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListMulticloudDataTransferConfigsResponse) 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 ListMulticloudDataTransferConfigs," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMulticloudDataTransferConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMulticloudDataTransferConfig( + GetMulticloudDataTransferConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MulticloudDataTransferConfig) { + requests.add(request); + responseObserver.onNext(((MulticloudDataTransferConfig) 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 GetMulticloudDataTransferConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MulticloudDataTransferConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createMulticloudDataTransferConfig( + CreateMulticloudDataTransferConfigRequest 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 CreateMulticloudDataTransferConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateMulticloudDataTransferConfig( + UpdateMulticloudDataTransferConfigRequest 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 UpdateMulticloudDataTransferConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteMulticloudDataTransferConfig( + DeleteMulticloudDataTransferConfigRequest 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 DeleteMulticloudDataTransferConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDestinations( + ListDestinationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDestinationsResponse) { + requests.add(request); + responseObserver.onNext(((ListDestinationsResponse) 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 ListDestinations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDestinationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDestination( + GetDestinationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Destination) { + requests.add(request); + responseObserver.onNext(((Destination) 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 GetDestination, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Destination.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDestination( + CreateDestinationRequest 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 CreateDestination, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDestination( + UpdateDestinationRequest 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 UpdateDestination, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDestination( + DeleteDestinationRequest 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 DeleteDestination, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMulticloudDataTransferSupportedService( + GetMulticloudDataTransferSupportedServiceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof MulticloudDataTransferSupportedService) { + requests.add(request); + responseObserver.onNext(((MulticloudDataTransferSupportedService) 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" + + " GetMulticloudDataTransferSupportedService, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + MulticloudDataTransferSupportedService.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listMulticloudDataTransferSupportedServices( + ListMulticloudDataTransferSupportedServicesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListMulticloudDataTransferSupportedServicesResponse) { + requests.add(request); + responseObserver.onNext(((ListMulticloudDataTransferSupportedServicesResponse) 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" + + " ListMulticloudDataTransferSupportedServices, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListMulticloudDataTransferSupportedServicesResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubService.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubService.java new file mode 100644 index 000000000000..e50f4492067f --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHubService implements MockGrpcService { + private final MockHubServiceImpl serviceImpl; + + public MockHubService() { + serviceImpl = new MockHubServiceImpl(); + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubServiceImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubServiceImpl.java new file mode 100644 index 000000000000..2c4dd625e1a7 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockHubServiceImpl.java @@ -0,0 +1,644 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkconnectivity.v1beta.HubServiceGrpc.HubServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockHubServiceImpl extends HubServiceImplBase { + private List requests; + private Queue responses; + + public MockHubServiceImpl() { + 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 listHubs(ListHubsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListHubsResponse) { + requests.add(request); + responseObserver.onNext(((ListHubsResponse) 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 ListHubs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListHubsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getHub(GetHubRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Hub) { + requests.add(request); + responseObserver.onNext(((Hub) 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 GetHub, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Hub.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createHub(CreateHubRequest 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 CreateHub, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateHub(UpdateHubRequest 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 UpdateHub, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteHub(DeleteHubRequest 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 DeleteHub, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listHubSpokes( + ListHubSpokesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListHubSpokesResponse) { + requests.add(request); + responseObserver.onNext(((ListHubSpokesResponse) 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 ListHubSpokes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListHubSpokesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void queryHubStatus( + QueryHubStatusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof QueryHubStatusResponse) { + requests.add(request); + responseObserver.onNext(((QueryHubStatusResponse) 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 QueryHubStatus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + QueryHubStatusResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSpokes( + ListSpokesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSpokesResponse) { + requests.add(request); + responseObserver.onNext(((ListSpokesResponse) 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 ListSpokes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSpokesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getSpoke(GetSpokeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Spoke) { + requests.add(request); + responseObserver.onNext(((Spoke) 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 GetSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Spoke.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createSpoke(CreateSpokeRequest 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 CreateSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateSpoke(UpdateSpokeRequest 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 UpdateSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rejectHubSpoke( + RejectHubSpokeRequest 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 RejectHubSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void acceptHubSpoke( + AcceptHubSpokeRequest 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 AcceptHubSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void acceptSpokeUpdate( + AcceptSpokeUpdateRequest 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 AcceptSpokeUpdate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void rejectSpokeUpdate( + RejectSpokeUpdateRequest 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 RejectSpokeUpdate, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSpoke(DeleteSpokeRequest 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 DeleteSpoke, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRouteTable( + GetRouteTableRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RouteTable) { + requests.add(request); + responseObserver.onNext(((RouteTable) 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 GetRouteTable, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RouteTable.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRoute(GetRouteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Route) { + requests.add(request); + responseObserver.onNext(((Route) 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 GetRoute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Route.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRoutes( + ListRoutesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRoutesResponse) { + requests.add(request); + responseObserver.onNext(((ListRoutesResponse) 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 ListRoutes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRoutesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listRouteTables( + ListRouteTablesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRouteTablesResponse) { + requests.add(request); + responseObserver.onNext(((ListRouteTablesResponse) 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 ListRouteTables, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRouteTablesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGroup(GetGroupRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Group) { + requests.add(request); + responseObserver.onNext(((Group) 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 GetGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Group.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGroups( + ListGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListGroupsResponse) 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 ListGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGroup(UpdateGroupRequest 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 UpdateGroup, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createGatewayAdvertisedRoute( + CreateGatewayAdvertisedRouteRequest 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 CreateGatewayAdvertisedRoute, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getGatewayAdvertisedRoute( + GetGatewayAdvertisedRouteRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GatewayAdvertisedRoute) { + requests.add(request); + responseObserver.onNext(((GatewayAdvertisedRoute) 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 GetGatewayAdvertisedRoute, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + GatewayAdvertisedRoute.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listGatewayAdvertisedRoutes( + ListGatewayAdvertisedRoutesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListGatewayAdvertisedRoutesResponse) { + requests.add(request); + responseObserver.onNext(((ListGatewayAdvertisedRoutesResponse) 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 ListGatewayAdvertisedRoutes, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + ListGatewayAdvertisedRoutesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateGatewayAdvertisedRoute( + UpdateGatewayAdvertisedRouteRequest 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 UpdateGatewayAdvertisedRoute, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteGatewayAdvertisedRoute( + DeleteGatewayAdvertisedRouteRequest 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 DeleteGatewayAdvertisedRoute, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicy.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicy.java new file mode 100644 index 000000000000..15b2f4bae1ae --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class 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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicyImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicyImpl.java new file mode 100644 index 000000000000..eca86324a14e --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocations.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocations.java new file mode 100644 index 000000000000..509381de6ab5 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class 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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocationsImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocationsImpl.java new file mode 100644 index 000000000000..52ae2eb700dd --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingService.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingService.java new file mode 100644 index 000000000000..9a209b16815e --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBasedRoutingService implements MockGrpcService { + private final MockPolicyBasedRoutingServiceImpl serviceImpl; + + public MockPolicyBasedRoutingService() { + serviceImpl = new MockPolicyBasedRoutingServiceImpl(); + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingServiceImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingServiceImpl.java new file mode 100644 index 000000000000..27469be286e3 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockPolicyBasedRoutingServiceImpl.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceGrpc.PolicyBasedRoutingServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPolicyBasedRoutingServiceImpl extends PolicyBasedRoutingServiceImplBase { + private List requests; + private Queue responses; + + public MockPolicyBasedRoutingServiceImpl() { + 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 listPolicyBasedRoutes( + ListPolicyBasedRoutesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPolicyBasedRoutesResponse) { + requests.add(request); + responseObserver.onNext(((ListPolicyBasedRoutesResponse) 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 ListPolicyBasedRoutes, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListPolicyBasedRoutesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPolicyBasedRoute( + GetPolicyBasedRouteRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PolicyBasedRoute) { + requests.add(request); + responseObserver.onNext(((PolicyBasedRoute) 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 GetPolicyBasedRoute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PolicyBasedRoute.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPolicyBasedRoute( + CreatePolicyBasedRouteRequest 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 CreatePolicyBasedRoute, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePolicyBasedRoute( + DeletePolicyBasedRouteRequest 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 DeletePolicyBasedRoute, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManager.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManager.java new file mode 100644 index 000000000000..ef5dcc990be2 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManager.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTransportManager implements MockGrpcService { + private final MockTransportManagerImpl serviceImpl; + + public MockTransportManager() { + serviceImpl = new MockTransportManagerImpl(); + } + + @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-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManagerImpl.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManagerImpl.java new file mode 100644 index 000000000000..8e0aa692d227 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/MockTransportManagerImpl.java @@ -0,0 +1,233 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerGrpc.TransportManagerImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTransportManagerImpl extends TransportManagerImplBase { + private List requests; + private Queue responses; + + public MockTransportManagerImpl() { + 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 listRemoteTransportProfiles( + ListRemoteTransportProfilesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRemoteTransportProfilesResponse) { + requests.add(request); + responseObserver.onNext(((ListRemoteTransportProfilesResponse) 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 ListRemoteTransportProfiles, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + ListRemoteTransportProfilesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getRemoteTransportProfile( + GetRemoteTransportProfileRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoteTransportProfile) { + requests.add(request); + responseObserver.onNext(((RemoteTransportProfile) 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 GetRemoteTransportProfile, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + RemoteTransportProfile.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTransports( + ListTransportsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTransportsResponse) { + requests.add(request); + responseObserver.onNext(((ListTransportsResponse) 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 ListTransports, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTransportsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTransport( + GetTransportRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Transport) { + requests.add(request); + responseObserver.onNext(((Transport) 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 GetTransport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Transport.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getStatus( + GetStatusRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GetStatusResponse) { + requests.add(request); + responseObserver.onNext(((GetStatusResponse) 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 GetStatus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GetStatusResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createTransport( + CreateTransportRequest 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 CreateTransport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTransport( + UpdateTransportRequest 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 UpdateTransport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTransport( + DeleteTransportRequest 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 DeleteTransport, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClientTest.java new file mode 100644 index 000000000000..5dadd937188c --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceClientTest.java @@ -0,0 +1,758 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient.ListPolicyBasedRoutesPagedResponse; + +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 PolicyBasedRoutingServiceClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockPolicyBasedRoutingService mockPolicyBasedRoutingService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PolicyBasedRoutingServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockPolicyBasedRoutingService = new MockPolicyBasedRoutingService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockPolicyBasedRoutingService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PolicyBasedRoutingServiceSettings settings = + PolicyBasedRoutingServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PolicyBasedRoutingServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listPolicyBasedRoutesTest() throws Exception { + PolicyBasedRoute responsesElement = PolicyBasedRoute.newBuilder().build(); + ListPolicyBasedRoutesResponse expectedResponse = + ListPolicyBasedRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBasedRoutes(Arrays.asList(responsesElement)) + .build(); + mockPolicyBasedRoutingService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListPolicyBasedRoutesPagedResponse pagedListResponse = client.listPolicyBasedRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBasedRoutesList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBasedRoutesRequest actualRequest = + ((ListPolicyBasedRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBasedRoutesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listPolicyBasedRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPolicyBasedRoutesTest2() throws Exception { + PolicyBasedRoute responsesElement = PolicyBasedRoute.newBuilder().build(); + ListPolicyBasedRoutesResponse expectedResponse = + ListPolicyBasedRoutesResponse.newBuilder() + .setNextPageToken("") + .addAllPolicyBasedRoutes(Arrays.asList(responsesElement)) + .build(); + mockPolicyBasedRoutingService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPolicyBasedRoutesPagedResponse pagedListResponse = client.listPolicyBasedRoutes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPolicyBasedRoutesList().get(0), resources.get(0)); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPolicyBasedRoutesRequest actualRequest = + ((ListPolicyBasedRoutesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPolicyBasedRoutesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPolicyBasedRoutes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBasedRouteTest() throws Exception { + PolicyBasedRoute expectedResponse = + PolicyBasedRoute.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork("network1843485230") + .setFilter(PolicyBasedRoute.Filter.newBuilder().build()) + .setPriority(-1165461084) + .addAllWarnings(new ArrayList()) + .setSelfLink("selfLink1191800166") + .setKind("kind3292052") + .build(); + mockPolicyBasedRoutingService.addResponse(expectedResponse); + + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + + PolicyBasedRoute actualResponse = client.getPolicyBasedRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBasedRouteRequest actualRequest = ((GetPolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBasedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + client.getPolicyBasedRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyBasedRouteTest2() throws Exception { + PolicyBasedRoute expectedResponse = + PolicyBasedRoute.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork("network1843485230") + .setFilter(PolicyBasedRoute.Filter.newBuilder().build()) + .setPriority(-1165461084) + .addAllWarnings(new ArrayList()) + .setSelfLink("selfLink1191800166") + .setKind("kind3292052") + .build(); + mockPolicyBasedRoutingService.addResponse(expectedResponse); + + String name = "name3373707"; + + PolicyBasedRoute actualResponse = client.getPolicyBasedRoute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPolicyBasedRouteRequest actualRequest = ((GetPolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyBasedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + String name = "name3373707"; + client.getPolicyBasedRoute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPolicyBasedRouteTest() throws Exception { + PolicyBasedRoute expectedResponse = + PolicyBasedRoute.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork("network1843485230") + .setFilter(PolicyBasedRoute.Filter.newBuilder().build()) + .setPriority(-1165461084) + .addAllWarnings(new ArrayList()) + .setSelfLink("selfLink1191800166") + .setKind("kind3292052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBasedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBasedRoutingService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + + PolicyBasedRoute actualResponse = + client.createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBasedRouteRequest actualRequest = + ((CreatePolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(policyBasedRoute, actualRequest.getPolicyBasedRoute()); + Assert.assertEquals(policyBasedRouteId, actualRequest.getPolicyBasedRouteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBasedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + client.createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId).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 createPolicyBasedRouteTest2() throws Exception { + PolicyBasedRoute expectedResponse = + PolicyBasedRoute.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setNetwork("network1843485230") + .setFilter(PolicyBasedRoute.Filter.newBuilder().build()) + .setPriority(-1165461084) + .addAllWarnings(new ArrayList()) + .setSelfLink("selfLink1191800166") + .setKind("kind3292052") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createPolicyBasedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBasedRoutingService.addResponse(resultOperation); + + String parent = "parent-995424086"; + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + + PolicyBasedRoute actualResponse = + client.createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePolicyBasedRouteRequest actualRequest = + ((CreatePolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(policyBasedRoute, actualRequest.getPolicyBasedRoute()); + Assert.assertEquals(policyBasedRouteId, actualRequest.getPolicyBasedRouteId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPolicyBasedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + String parent = "parent-995424086"; + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + client.createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId).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 deletePolicyBasedRouteTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBasedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBasedRoutingService.addResponse(resultOperation); + + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + + client.deletePolicyBasedRouteAsync(name).get(); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBasedRouteRequest actualRequest = + ((DeletePolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBasedRouteExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + client.deletePolicyBasedRouteAsync(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 deletePolicyBasedRouteTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deletePolicyBasedRouteTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockPolicyBasedRoutingService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deletePolicyBasedRouteAsync(name).get(); + + List actualRequests = mockPolicyBasedRoutingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePolicyBasedRouteRequest actualRequest = + ((DeletePolicyBasedRouteRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePolicyBasedRouteExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPolicyBasedRoutingService.addException(exception); + + try { + String name = "name3373707"; + client.deletePolicyBasedRouteAsync(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 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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClientTest.java b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClientTest.java new file mode 100644 index 000000000000..9f01fdc18225 --- /dev/null +++ b/java-networkconnectivity/google-cloud-networkconnectivity/src/test/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerClientTest.java @@ -0,0 +1,1099 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListLocationsPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListRemoteTransportProfilesPagedResponse; +import static com.google.cloud.networkconnectivity.v1beta.TransportManagerClient.ListTransportsPagedResponse; + +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 TransportManagerClientTest { + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockTransportManager mockTransportManager; + private LocalChannelProvider channelProvider; + private TransportManagerClient client; + + @BeforeClass + public static void startStaticServer() { + mockTransportManager = new MockTransportManager(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockTransportManager, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + TransportManagerSettings settings = + TransportManagerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = TransportManagerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listRemoteTransportProfilesTest() throws Exception { + RemoteTransportProfile responsesElement = RemoteTransportProfile.newBuilder().build(); + ListRemoteTransportProfilesResponse expectedResponse = + ListRemoteTransportProfilesResponse.newBuilder() + .setNextPageToken("") + .addAllRemoteTransportProfiles(Arrays.asList(responsesElement)) + .build(); + mockTransportManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListRemoteTransportProfilesPagedResponse pagedListResponse = + client.listRemoteTransportProfiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRemoteTransportProfilesList().get(0), resources.get(0)); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRemoteTransportProfilesRequest actualRequest = + ((ListRemoteTransportProfilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRemoteTransportProfilesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listRemoteTransportProfiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRemoteTransportProfilesTest2() throws Exception { + RemoteTransportProfile responsesElement = RemoteTransportProfile.newBuilder().build(); + ListRemoteTransportProfilesResponse expectedResponse = + ListRemoteTransportProfilesResponse.newBuilder() + .setNextPageToken("") + .addAllRemoteTransportProfiles(Arrays.asList(responsesElement)) + .build(); + mockTransportManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRemoteTransportProfilesPagedResponse pagedListResponse = + client.listRemoteTransportProfiles(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRemoteTransportProfilesList().get(0), resources.get(0)); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRemoteTransportProfilesRequest actualRequest = + ((ListRemoteTransportProfilesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRemoteTransportProfilesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRemoteTransportProfiles(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRemoteTransportProfileTest() throws Exception { + RemoteTransportProfile expectedResponse = + RemoteTransportProfile.newBuilder() + .setName( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setProvider("provider-987494927") + .setProviderSite("providerSite-419104552") + .addAllSupportedBandwidths(new ArrayList()) + .setDisplayName("displayName1714148973") + .build(); + mockTransportManager.addResponse(expectedResponse); + + RemoteTransportProfileName name = + RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"); + + RemoteTransportProfile actualResponse = client.getRemoteTransportProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRemoteTransportProfileRequest actualRequest = + ((GetRemoteTransportProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRemoteTransportProfileExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + RemoteTransportProfileName name = + RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"); + client.getRemoteTransportProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getRemoteTransportProfileTest2() throws Exception { + RemoteTransportProfile expectedResponse = + RemoteTransportProfile.newBuilder() + .setName( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setProvider("provider-987494927") + .setProviderSite("providerSite-419104552") + .addAllSupportedBandwidths(new ArrayList()) + .setDisplayName("displayName1714148973") + .build(); + mockTransportManager.addResponse(expectedResponse); + + String name = "name3373707"; + + RemoteTransportProfile actualResponse = client.getRemoteTransportProfile(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetRemoteTransportProfileRequest actualRequest = + ((GetRemoteTransportProfileRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getRemoteTransportProfileExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String name = "name3373707"; + client.getRemoteTransportProfile(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransportsTest() throws Exception { + Transport responsesElement = Transport.newBuilder().build(); + ListTransportsResponse expectedResponse = + ListTransportsResponse.newBuilder() + .setNextPageToken("") + .addAllTransports(Arrays.asList(responsesElement)) + .build(); + mockTransportManager.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTransportsPagedResponse pagedListResponse = client.listTransports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransportsList().get(0), resources.get(0)); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransportsRequest actualRequest = ((ListTransportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTransports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransportsTest2() throws Exception { + Transport responsesElement = Transport.newBuilder().build(); + ListTransportsResponse expectedResponse = + ListTransportsResponse.newBuilder() + .setNextPageToken("") + .addAllTransports(Arrays.asList(responsesElement)) + .build(); + mockTransportManager.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTransportsPagedResponse pagedListResponse = client.listTransports(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransportsList().get(0), resources.get(0)); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransportsRequest actualRequest = ((ListTransportsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransportsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTransports(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTransportTest() throws Exception { + Transport expectedResponse = + Transport.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setRemoteProfile( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .setProvidedActivationKey("providedActivationKey-363194298") + .setGeneratedActivationKey("generatedActivationKey1508760602") + .setMtuLimit(144989162) + .setAdminEnabled(true) + .setNetwork("network1843485230") + .addAllAdvertisedRoutes(new ArrayList()) + .setRemoteAccountId("remoteAccountId-416492926") + .setPeeringNetwork("peeringNetwork-975063346") + .build(); + mockTransportManager.addResponse(expectedResponse); + + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + + Transport actualResponse = client.getTransport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTransportRequest actualRequest = ((GetTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTransportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + client.getTransport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTransportTest2() throws Exception { + Transport expectedResponse = + Transport.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setRemoteProfile( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .setProvidedActivationKey("providedActivationKey-363194298") + .setGeneratedActivationKey("generatedActivationKey1508760602") + .setMtuLimit(144989162) + .setAdminEnabled(true) + .setNetwork("network1843485230") + .addAllAdvertisedRoutes(new ArrayList()) + .setRemoteAccountId("remoteAccountId-416492926") + .setPeeringNetwork("peeringNetwork-975063346") + .build(); + mockTransportManager.addResponse(expectedResponse); + + String name = "name3373707"; + + Transport actualResponse = client.getTransport(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTransportRequest actualRequest = ((GetTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTransportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String name = "name3373707"; + client.getTransport(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStatusTest() throws Exception { + GetStatusResponse expectedResponse = GetStatusResponse.newBuilder().build(); + mockTransportManager.addResponse(expectedResponse); + + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + + GetStatusResponse actualResponse = client.getStatus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStatusRequest actualRequest = ((GetStatusRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStatusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + client.getStatus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getStatusTest2() throws Exception { + GetStatusResponse expectedResponse = GetStatusResponse.newBuilder().build(); + mockTransportManager.addResponse(expectedResponse); + + String name = "name3373707"; + + GetStatusResponse actualResponse = client.getStatus(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetStatusRequest actualRequest = ((GetStatusRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getStatusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String name = "name3373707"; + client.getStatus(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransportTest() throws Exception { + Transport expectedResponse = + Transport.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setRemoteProfile( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .setProvidedActivationKey("providedActivationKey-363194298") + .setGeneratedActivationKey("generatedActivationKey1508760602") + .setMtuLimit(144989162) + .setAdminEnabled(true) + .setNetwork("network1843485230") + .addAllAdvertisedRoutes(new ArrayList()) + .setRemoteAccountId("remoteAccountId-416492926") + .setPeeringNetwork("peeringNetwork-975063346") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTransportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTransportManager.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + + Transport actualResponse = client.createTransportAsync(parent, transport, transportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTransportRequest actualRequest = ((CreateTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(transport, actualRequest.getTransport()); + Assert.assertEquals(transportId, actualRequest.getTransportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTransportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + client.createTransportAsync(parent, transport, transportId).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 createTransportTest2() throws Exception { + Transport expectedResponse = + Transport.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setRemoteProfile( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .setProvidedActivationKey("providedActivationKey-363194298") + .setGeneratedActivationKey("generatedActivationKey1508760602") + .setMtuLimit(144989162) + .setAdminEnabled(true) + .setNetwork("network1843485230") + .addAllAdvertisedRoutes(new ArrayList()) + .setRemoteAccountId("remoteAccountId-416492926") + .setPeeringNetwork("peeringNetwork-975063346") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createTransportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTransportManager.addResponse(resultOperation); + + String parent = "parent-995424086"; + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + + Transport actualResponse = client.createTransportAsync(parent, transport, transportId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTransportRequest actualRequest = ((CreateTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(transport, actualRequest.getTransport()); + Assert.assertEquals(transportId, actualRequest.getTransportId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTransportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String parent = "parent-995424086"; + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + client.createTransportAsync(parent, transport, transportId).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 updateTransportTest() throws Exception { + Transport expectedResponse = + Transport.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setRemoteProfile( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .setProvidedActivationKey("providedActivationKey-363194298") + .setGeneratedActivationKey("generatedActivationKey1508760602") + .setMtuLimit(144989162) + .setAdminEnabled(true) + .setNetwork("network1843485230") + .addAllAdvertisedRoutes(new ArrayList()) + .setRemoteAccountId("remoteAccountId-416492926") + .setPeeringNetwork("peeringNetwork-975063346") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateTransportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTransportManager.addResponse(resultOperation); + + Transport transport = Transport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Transport actualResponse = client.updateTransportAsync(transport, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTransportRequest actualRequest = ((UpdateTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(transport, actualRequest.getTransport()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTransportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + Transport transport = Transport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTransportAsync(transport, 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 deleteTransportTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTransportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTransportManager.addResponse(resultOperation); + + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + + client.deleteTransportAsync(name).get(); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTransportRequest actualRequest = ((DeleteTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTransportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + client.deleteTransportAsync(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 deleteTransportTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteTransportTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTransportManager.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteTransportAsync(name).get(); + + List actualRequests = mockTransportManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTransportRequest actualRequest = ((DeleteTransportRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteTransportExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTransportManager.addException(exception); + + try { + String name = "name3373707"; + client.deleteTransportAsync(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 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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").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(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/pom.xml b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/pom.xml new file mode 100644 index 000000000000..e628d1aca9c0 --- /dev/null +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + grpc-google-cloud-networkconnectivity-v1beta + GRPC library for google-cloud-networkconnectivity + + com.google.cloud + google-cloud-networkconnectivity-parent + 1.87.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-networkconnectivity-v1beta + + + com.google.guava + guava + + + diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceGrpc.java b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceGrpc.java new file mode 100644 index 000000000000..6563ea43d586 --- /dev/null +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferServiceGrpc.java @@ -0,0 +1,2125 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.networkconnectivity.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * DataTransferService is the service for the Data Transfer API.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class DataTransferServiceGrpc { + + private DataTransferServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.networkconnectivity.v1beta.DataTransferService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse> + getListMulticloudDataTransferConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMulticloudDataTransferConfigs", + requestType = + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .class, + responseType = + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse> + getListMulticloudDataTransferConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse> + getListMulticloudDataTransferConfigsMethod; + if ((getListMulticloudDataTransferConfigsMethod = + DataTransferServiceGrpc.getListMulticloudDataTransferConfigsMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getListMulticloudDataTransferConfigsMethod = + DataTransferServiceGrpc.getListMulticloudDataTransferConfigsMethod) + == null) { + DataTransferServiceGrpc.getListMulticloudDataTransferConfigsMethod = + getListMulticloudDataTransferConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListMulticloudDataTransferConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "ListMulticloudDataTransferConfigs")) + .build(); + } + } + } + return getListMulticloudDataTransferConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + getGetMulticloudDataTransferConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMulticloudDataTransferConfig", + requestType = + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + getGetMulticloudDataTransferConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + getGetMulticloudDataTransferConfigMethod; + if ((getGetMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getGetMulticloudDataTransferConfigMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getGetMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getGetMulticloudDataTransferConfigMethod) + == null) { + DataTransferServiceGrpc.getGetMulticloudDataTransferConfigMethod = + getGetMulticloudDataTransferConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetMulticloudDataTransferConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferConfig.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "GetMulticloudDataTransferConfig")) + .build(); + } + } + } + return getGetMulticloudDataTransferConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getCreateMulticloudDataTransferConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateMulticloudDataTransferConfig", + requestType = + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getCreateMulticloudDataTransferConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getCreateMulticloudDataTransferConfigMethod; + if ((getCreateMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getCreateMulticloudDataTransferConfigMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getCreateMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getCreateMulticloudDataTransferConfigMethod) + == null) { + DataTransferServiceGrpc.getCreateMulticloudDataTransferConfigMethod = + getCreateMulticloudDataTransferConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "CreateMulticloudDataTransferConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "CreateMulticloudDataTransferConfig")) + .build(); + } + } + } + return getCreateMulticloudDataTransferConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getUpdateMulticloudDataTransferConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateMulticloudDataTransferConfig", + requestType = + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getUpdateMulticloudDataTransferConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getUpdateMulticloudDataTransferConfigMethod; + if ((getUpdateMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getUpdateMulticloudDataTransferConfigMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getUpdateMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getUpdateMulticloudDataTransferConfigMethod) + == null) { + DataTransferServiceGrpc.getUpdateMulticloudDataTransferConfigMethod = + getUpdateMulticloudDataTransferConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "UpdateMulticloudDataTransferConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "UpdateMulticloudDataTransferConfig")) + .build(); + } + } + } + return getUpdateMulticloudDataTransferConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getDeleteMulticloudDataTransferConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteMulticloudDataTransferConfig", + requestType = + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getDeleteMulticloudDataTransferConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation> + getDeleteMulticloudDataTransferConfigMethod; + if ((getDeleteMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getDeleteMulticloudDataTransferConfigMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getDeleteMulticloudDataTransferConfigMethod = + DataTransferServiceGrpc.getDeleteMulticloudDataTransferConfigMethod) + == null) { + DataTransferServiceGrpc.getDeleteMulticloudDataTransferConfigMethod = + getDeleteMulticloudDataTransferConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "DeleteMulticloudDataTransferConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "DeleteMulticloudDataTransferConfig")) + .build(); + } + } + } + return getDeleteMulticloudDataTransferConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + getListDestinationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDestinations", + requestType = com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + getListDestinationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + getListDestinationsMethod; + if ((getListDestinationsMethod = DataTransferServiceGrpc.getListDestinationsMethod) == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getListDestinationsMethod = DataTransferServiceGrpc.getListDestinationsMethod) + == null) { + DataTransferServiceGrpc.getListDestinationsMethod = + getListDestinationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDestinations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier("ListDestinations")) + .build(); + } + } + } + return getListDestinationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest, + com.google.cloud.networkconnectivity.v1beta.Destination> + getGetDestinationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDestination", + requestType = com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Destination.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest, + com.google.cloud.networkconnectivity.v1beta.Destination> + getGetDestinationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest, + com.google.cloud.networkconnectivity.v1beta.Destination> + getGetDestinationMethod; + if ((getGetDestinationMethod = DataTransferServiceGrpc.getGetDestinationMethod) == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getGetDestinationMethod = DataTransferServiceGrpc.getGetDestinationMethod) == null) { + DataTransferServiceGrpc.getGetDestinationMethod = + getGetDestinationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDestination")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Destination + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier("GetDestination")) + .build(); + } + } + } + return getGetDestinationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest, + com.google.longrunning.Operation> + getCreateDestinationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDestination", + requestType = com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest, + com.google.longrunning.Operation> + getCreateDestinationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest, + com.google.longrunning.Operation> + getCreateDestinationMethod; + if ((getCreateDestinationMethod = DataTransferServiceGrpc.getCreateDestinationMethod) == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getCreateDestinationMethod = DataTransferServiceGrpc.getCreateDestinationMethod) + == null) { + DataTransferServiceGrpc.getCreateDestinationMethod = + getCreateDestinationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDestination")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier("CreateDestination")) + .build(); + } + } + } + return getCreateDestinationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest, + com.google.longrunning.Operation> + getUpdateDestinationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDestination", + requestType = com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest, + com.google.longrunning.Operation> + getUpdateDestinationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest, + com.google.longrunning.Operation> + getUpdateDestinationMethod; + if ((getUpdateDestinationMethod = DataTransferServiceGrpc.getUpdateDestinationMethod) == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getUpdateDestinationMethod = DataTransferServiceGrpc.getUpdateDestinationMethod) + == null) { + DataTransferServiceGrpc.getUpdateDestinationMethod = + getUpdateDestinationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDestination")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier("UpdateDestination")) + .build(); + } + } + } + return getUpdateDestinationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest, + com.google.longrunning.Operation> + getDeleteDestinationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDestination", + requestType = com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest, + com.google.longrunning.Operation> + getDeleteDestinationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest, + com.google.longrunning.Operation> + getDeleteDestinationMethod; + if ((getDeleteDestinationMethod = DataTransferServiceGrpc.getDeleteDestinationMethod) == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getDeleteDestinationMethod = DataTransferServiceGrpc.getDeleteDestinationMethod) + == null) { + DataTransferServiceGrpc.getDeleteDestinationMethod = + getDeleteDestinationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDestination")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier("DeleteDestination")) + .build(); + } + } + } + return getDeleteDestinationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getGetMulticloudDataTransferSupportedServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMulticloudDataTransferSupportedService", + requestType = + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.class, + responseType = + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getGetMulticloudDataTransferSupportedServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getGetMulticloudDataTransferSupportedServiceMethod; + if ((getGetMulticloudDataTransferSupportedServiceMethod = + DataTransferServiceGrpc.getGetMulticloudDataTransferSupportedServiceMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getGetMulticloudDataTransferSupportedServiceMethod = + DataTransferServiceGrpc.getGetMulticloudDataTransferSupportedServiceMethod) + == null) { + DataTransferServiceGrpc.getGetMulticloudDataTransferSupportedServiceMethod = + getGetMulticloudDataTransferSupportedServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "GetMulticloudDataTransferSupportedService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService.getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "GetMulticloudDataTransferSupportedService")) + .build(); + } + } + } + return getGetMulticloudDataTransferSupportedServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + getListMulticloudDataTransferSupportedServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListMulticloudDataTransferSupportedServices", + requestType = + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.class, + responseType = + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + getListMulticloudDataTransferSupportedServicesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + getListMulticloudDataTransferSupportedServicesMethod; + if ((getListMulticloudDataTransferSupportedServicesMethod = + DataTransferServiceGrpc.getListMulticloudDataTransferSupportedServicesMethod) + == null) { + synchronized (DataTransferServiceGrpc.class) { + if ((getListMulticloudDataTransferSupportedServicesMethod = + DataTransferServiceGrpc.getListMulticloudDataTransferSupportedServicesMethod) + == null) { + DataTransferServiceGrpc.getListMulticloudDataTransferSupportedServicesMethod = + getListMulticloudDataTransferSupportedServicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "ListMulticloudDataTransferSupportedServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTransferServiceMethodDescriptorSupplier( + "ListMulticloudDataTransferSupportedServices")) + .build(); + } + } + } + return getListMulticloudDataTransferSupportedServicesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataTransferServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTransferServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceStub(channel, callOptions); + } + }; + return DataTransferServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static DataTransferServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTransferServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceBlockingV2Stub(channel, callOptions); + } + }; + return DataTransferServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataTransferServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTransferServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceBlockingStub(channel, callOptions); + } + }; + return DataTransferServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataTransferServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTransferServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceFutureStub(channel, callOptions); + } + }; + return DataTransferServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists the `MulticloudDataTransferConfig` resources in a specified project
+     * and location.
+     * 
+ */ + default void listMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMulticloudDataTransferConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + default void getMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMulticloudDataTransferConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + default void createMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateMulticloudDataTransferConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + default void updateMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateMulticloudDataTransferConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + default void deleteMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteMulticloudDataTransferConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the `Destination` resources in a specified project and location.
+     * 
+ */ + default void listDestinations( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDestinationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a `Destination` resource.
+     * 
+ */ + default void getDestination( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDestinationMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a `Destination` resource in a specified project and location.
+     * 
+ */ + default void createDestination( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDestinationMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a `Destination` resource in a specified project and location.
+     * 
+ */ + default void updateDestination( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDestinationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a `Destination` resource.
+     * 
+ */ + default void deleteDestination( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDestinationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the details of a service that is supported for Data Transfer
+     * Essentials.
+     * 
+ */ + default void getMulticloudDataTransferSupportedService( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetMulticloudDataTransferSupportedServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the services in the project for a region that are supported for
+     * Data Transfer Essentials.
+     * 
+ */ + default void listMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListMulticloudDataTransferSupportedServicesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataTransferService. + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public abstract static class DataTransferServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DataTransferServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataTransferService. + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public static final class DataTransferServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataTransferServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTransferServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the `MulticloudDataTransferConfig` resources in a specified project
+     * and location.
+     * 
+ */ + public void listMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListMulticloudDataTransferConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public void getMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetMulticloudDataTransferConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public void createMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateMulticloudDataTransferConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public void updateMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateMulticloudDataTransferConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public void deleteMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteMulticloudDataTransferConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the `Destination` resources in a specified project and location.
+     * 
+ */ + public void listDestinations( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDestinationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a `Destination` resource.
+     * 
+ */ + public void getDestination( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDestinationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a `Destination` resource in a specified project and location.
+     * 
+ */ + public void createDestination( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDestinationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a `Destination` resource in a specified project and location.
+     * 
+ */ + public void updateDestination( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDestinationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a `Destination` resource.
+     * 
+ */ + public void deleteDestination( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDestinationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the details of a service that is supported for Data Transfer
+     * Essentials.
+     * 
+ */ + public void getMulticloudDataTransferSupportedService( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getGetMulticloudDataTransferSupportedServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the services in the project for a region that are supported for
+     * Data Transfer Essentials.
+     * 
+ */ + public void listMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel() + .newCall(getListMulticloudDataTransferSupportedServicesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataTransferService. + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public static final class DataTransferServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private DataTransferServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTransferServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the `MulticloudDataTransferConfig` resources in a specified project
+     * and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + listMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListMulticloudDataTransferConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation updateMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the `Destination` resources in a specified project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse listDestinations( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListDestinationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a `Destination` resource.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDestination( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation updateDestination( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a `Destination` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteDestination( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a service that is supported for Data Transfer
+     * Essentials.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getMulticloudDataTransferSupportedService( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getGetMulticloudDataTransferSupportedServiceMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Lists the services in the project for a region that are supported for
+     * Data Transfer Essentials.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + listMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), + getListMulticloudDataTransferSupportedServicesMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service DataTransferService. + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public static final class DataTransferServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataTransferServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTransferServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the `MulticloudDataTransferConfig` resources in a specified project
+     * and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + listMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListMulticloudDataTransferConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation updateMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteMulticloudDataTransferConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the `Destination` resources in a specified project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse listDestinations( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDestinationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a `Destination` resource.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation createDestination( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.longrunning.Operation updateDestination( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a `Destination` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteDestination( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDestinationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the details of a service that is supported for Data Transfer
+     * Essentials.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getMulticloudDataTransferSupportedService( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getGetMulticloudDataTransferSupportedServiceMethod(), + getCallOptions(), + request); + } + + /** + * + * + *
+     * Lists the services in the project for a region that are supported for
+     * Data Transfer Essentials.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + listMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), + getListMulticloudDataTransferSupportedServicesMethod(), + getCallOptions(), + request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataTransferService. + * + *
+   * DataTransferService is the service for the Data Transfer API.
+   * 
+ */ + public static final class DataTransferServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataTransferServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTransferServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTransferServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the `MulticloudDataTransferConfig` resources in a specified project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse> + listMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListMulticloudDataTransferConfigsMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets the details of a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + getMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetMulticloudDataTransferConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateMulticloudDataTransferConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates a `MulticloudDataTransferConfig` resource in a specified project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateMulticloudDataTransferConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Deletes a `MulticloudDataTransferConfig` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteMulticloudDataTransferConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists the `Destination` resources in a specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse> + listDestinations( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDestinationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a `Destination` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Destination> + getDestination(com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDestinationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDestination( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDestinationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a `Destination` resource in a specified project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDestination( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDestinationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a `Destination` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDestination( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDestinationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the details of a service that is supported for Data Transfer
+     * Essentials.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedService( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getGetMulticloudDataTransferSupportedServiceMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Lists the services in the project for a region that are supported for
+     * Data Transfer Essentials.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse> + listMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel() + .newCall(getListMulticloudDataTransferSupportedServicesMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS = 0; + private static final int METHODID_GET_MULTICLOUD_DATA_TRANSFER_CONFIG = 1; + private static final int METHODID_CREATE_MULTICLOUD_DATA_TRANSFER_CONFIG = 2; + private static final int METHODID_UPDATE_MULTICLOUD_DATA_TRANSFER_CONFIG = 3; + private static final int METHODID_DELETE_MULTICLOUD_DATA_TRANSFER_CONFIG = 4; + private static final int METHODID_LIST_DESTINATIONS = 5; + private static final int METHODID_GET_DESTINATION = 6; + private static final int METHODID_CREATE_DESTINATION = 7; + private static final int METHODID_UPDATE_DESTINATION = 8; + private static final int METHODID_DELETE_DESTINATION = 9; + private static final int METHODID_GET_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE = 10; + private static final int METHODID_LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES = 11; + + 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_MULTICLOUD_DATA_TRANSFER_CONFIGS: + serviceImpl.listMulticloudDataTransferConfigs( + (com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse>) + responseObserver); + break; + case METHODID_GET_MULTICLOUD_DATA_TRANSFER_CONFIG: + serviceImpl.getMulticloudDataTransferConfig( + (com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig>) + responseObserver); + break; + case METHODID_CREATE_MULTICLOUD_DATA_TRANSFER_CONFIG: + serviceImpl.createMulticloudDataTransferConfig( + (com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_MULTICLOUD_DATA_TRANSFER_CONFIG: + serviceImpl.updateMulticloudDataTransferConfig( + (com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MULTICLOUD_DATA_TRANSFER_CONFIG: + serviceImpl.deleteMulticloudDataTransferConfig( + (com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DESTINATIONS: + serviceImpl.listDestinations( + (com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse>) + responseObserver); + break; + case METHODID_GET_DESTINATION: + serviceImpl.getDestination( + (com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DESTINATION: + serviceImpl.createDestination( + (com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DESTINATION: + serviceImpl.updateDestination( + (com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DESTINATION: + serviceImpl.deleteDestination( + (com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE: + serviceImpl.getMulticloudDataTransferSupportedService( + (com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService>) + responseObserver); + break; + case METHODID_LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES: + serviceImpl.listMulticloudDataTransferSupportedServices( + (com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse>) + 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( + getListMulticloudDataTransferConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsRequest, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse>( + service, METHODID_LIST_MULTICLOUD_DATA_TRANSFER_CONFIGS))) + .addMethod( + getGetMulticloudDataTransferConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferConfigRequest, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig>( + service, METHODID_GET_MULTICLOUD_DATA_TRANSFER_CONFIG))) + .addMethod( + getCreateMulticloudDataTransferConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_MULTICLOUD_DATA_TRANSFER_CONFIG))) + .addMethod( + getUpdateMulticloudDataTransferConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_MULTICLOUD_DATA_TRANSFER_CONFIG))) + .addMethod( + getDeleteMulticloudDataTransferConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_MULTICLOUD_DATA_TRANSFER_CONFIG))) + .addMethod( + getListDestinationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse>( + service, METHODID_LIST_DESTINATIONS))) + .addMethod( + getGetDestinationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest, + com.google.cloud.networkconnectivity.v1beta.Destination>( + service, METHODID_GET_DESTINATION))) + .addMethod( + getCreateDestinationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DESTINATION))) + .addMethod( + getUpdateDestinationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DESTINATION))) + .addMethod( + getDeleteDestinationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DESTINATION))) + .addMethod( + getGetMulticloudDataTransferSupportedServiceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest, + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService>( + service, METHODID_GET_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE))) + .addMethod( + getListMulticloudDataTransferSupportedServicesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse>( + service, METHODID_LIST_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES))) + .build(); + } + + private abstract static class DataTransferServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataTransferServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataTransferService"); + } + } + + private static final class DataTransferServiceFileDescriptorSupplier + extends DataTransferServiceBaseDescriptorSupplier { + DataTransferServiceFileDescriptorSupplier() {} + } + + private static final class DataTransferServiceMethodDescriptorSupplier + extends DataTransferServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + DataTransferServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataTransferServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataTransferServiceFileDescriptorSupplier()) + .addMethod(getListMulticloudDataTransferConfigsMethod()) + .addMethod(getGetMulticloudDataTransferConfigMethod()) + .addMethod(getCreateMulticloudDataTransferConfigMethod()) + .addMethod(getUpdateMulticloudDataTransferConfigMethod()) + .addMethod(getDeleteMulticloudDataTransferConfigMethod()) + .addMethod(getListDestinationsMethod()) + .addMethod(getGetDestinationMethod()) + .addMethod(getCreateDestinationMethod()) + .addMethod(getUpdateDestinationMethod()) + .addMethod(getDeleteDestinationMethod()) + .addMethod(getGetMulticloudDataTransferSupportedServiceMethod()) + .addMethod(getListMulticloudDataTransferSupportedServicesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceGrpc.java b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceGrpc.java new file mode 100644 index 000000000000..98f84af58b88 --- /dev/null +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubServiceGrpc.java @@ -0,0 +1,4064 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.networkconnectivity.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Network Connectivity Center is a hub-and-spoke abstraction for network
+ * connectivity management in Google Cloud. It reduces operational complexity
+ * through a simple, centralized connectivity management model.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class HubServiceGrpc { + + private HubServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.networkconnectivity.v1beta.HubService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse> + getListHubsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHubs", + requestType = com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse> + getListHubsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse> + getListHubsMethod; + if ((getListHubsMethod = HubServiceGrpc.getListHubsMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListHubsMethod = HubServiceGrpc.getListHubsMethod) == null) { + HubServiceGrpc.getListHubsMethod = + getListHubsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHubs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListHubs")) + .build(); + } + } + } + return getListHubsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetHubRequest, + com.google.cloud.networkconnectivity.v1beta.Hub> + getGetHubMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetHub", + requestType = com.google.cloud.networkconnectivity.v1beta.GetHubRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Hub.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetHubRequest, + com.google.cloud.networkconnectivity.v1beta.Hub> + getGetHubMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetHubRequest, + com.google.cloud.networkconnectivity.v1beta.Hub> + getGetHubMethod; + if ((getGetHubMethod = HubServiceGrpc.getGetHubMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetHubMethod = HubServiceGrpc.getGetHubMethod) == null) { + HubServiceGrpc.getGetHubMethod = + getGetHubMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetHub")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetHub")) + .build(); + } + } + } + return getGetHubMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest, + com.google.longrunning.Operation> + getCreateHubMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateHub", + requestType = com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest, + com.google.longrunning.Operation> + getCreateHubMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest, + com.google.longrunning.Operation> + getCreateHubMethod; + if ((getCreateHubMethod = HubServiceGrpc.getCreateHubMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getCreateHubMethod = HubServiceGrpc.getCreateHubMethod) == null) { + HubServiceGrpc.getCreateHubMethod = + getCreateHubMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateHub")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("CreateHub")) + .build(); + } + } + } + return getCreateHubMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest, + com.google.longrunning.Operation> + getUpdateHubMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateHub", + requestType = com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest, + com.google.longrunning.Operation> + getUpdateHubMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest, + com.google.longrunning.Operation> + getUpdateHubMethod; + if ((getUpdateHubMethod = HubServiceGrpc.getUpdateHubMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getUpdateHubMethod = HubServiceGrpc.getUpdateHubMethod) == null) { + HubServiceGrpc.getUpdateHubMethod = + getUpdateHubMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateHub")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("UpdateHub")) + .build(); + } + } + } + return getUpdateHubMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest, + com.google.longrunning.Operation> + getDeleteHubMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteHub", + requestType = com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest, + com.google.longrunning.Operation> + getDeleteHubMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest, + com.google.longrunning.Operation> + getDeleteHubMethod; + if ((getDeleteHubMethod = HubServiceGrpc.getDeleteHubMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getDeleteHubMethod = HubServiceGrpc.getDeleteHubMethod) == null) { + HubServiceGrpc.getDeleteHubMethod = + getDeleteHubMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteHub")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("DeleteHub")) + .build(); + } + } + } + return getDeleteHubMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + getListHubSpokesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListHubSpokes", + requestType = com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + getListHubSpokesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + getListHubSpokesMethod; + if ((getListHubSpokesMethod = HubServiceGrpc.getListHubSpokesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListHubSpokesMethod = HubServiceGrpc.getListHubSpokesMethod) == null) { + HubServiceGrpc.getListHubSpokesMethod = + getListHubSpokesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHubSpokes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListHubSpokes")) + .build(); + } + } + } + return getListHubSpokesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + getQueryHubStatusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "QueryHubStatus", + requestType = com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + getQueryHubStatusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + getQueryHubStatusMethod; + if ((getQueryHubStatusMethod = HubServiceGrpc.getQueryHubStatusMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getQueryHubStatusMethod = HubServiceGrpc.getQueryHubStatusMethod) == null) { + HubServiceGrpc.getQueryHubStatusMethod = + getQueryHubStatusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "QueryHubStatus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("QueryHubStatus")) + .build(); + } + } + } + return getQueryHubStatusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse> + getListSpokesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSpokes", + requestType = com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse> + getListSpokesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse> + getListSpokesMethod; + if ((getListSpokesMethod = HubServiceGrpc.getListSpokesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListSpokesMethod = HubServiceGrpc.getListSpokesMethod) == null) { + HubServiceGrpc.getListSpokesMethod = + getListSpokesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSpokes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListSpokes")) + .build(); + } + } + } + return getListSpokesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest, + com.google.cloud.networkconnectivity.v1beta.Spoke> + getGetSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Spoke.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest, + com.google.cloud.networkconnectivity.v1beta.Spoke> + getGetSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest, + com.google.cloud.networkconnectivity.v1beta.Spoke> + getGetSpokeMethod; + if ((getGetSpokeMethod = HubServiceGrpc.getGetSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetSpokeMethod = HubServiceGrpc.getGetSpokeMethod) == null) { + HubServiceGrpc.getGetSpokeMethod = + getGetSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Spoke + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetSpoke")) + .build(); + } + } + } + return getGetSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest, + com.google.longrunning.Operation> + getCreateSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest, + com.google.longrunning.Operation> + getCreateSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest, + com.google.longrunning.Operation> + getCreateSpokeMethod; + if ((getCreateSpokeMethod = HubServiceGrpc.getCreateSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getCreateSpokeMethod = HubServiceGrpc.getCreateSpokeMethod) == null) { + HubServiceGrpc.getCreateSpokeMethod = + getCreateSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("CreateSpoke")) + .build(); + } + } + } + return getCreateSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest, + com.google.longrunning.Operation> + getUpdateSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest, + com.google.longrunning.Operation> + getUpdateSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest, + com.google.longrunning.Operation> + getUpdateSpokeMethod; + if ((getUpdateSpokeMethod = HubServiceGrpc.getUpdateSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getUpdateSpokeMethod = HubServiceGrpc.getUpdateSpokeMethod) == null) { + HubServiceGrpc.getUpdateSpokeMethod = + getUpdateSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("UpdateSpoke")) + .build(); + } + } + } + return getUpdateSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RejectHubSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest, + com.google.longrunning.Operation> + getRejectHubSpokeMethod; + if ((getRejectHubSpokeMethod = HubServiceGrpc.getRejectHubSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getRejectHubSpokeMethod = HubServiceGrpc.getRejectHubSpokeMethod) == null) { + HubServiceGrpc.getRejectHubSpokeMethod = + getRejectHubSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RejectHubSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("RejectHubSpoke")) + .build(); + } + } + } + return getRejectHubSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcceptHubSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest, + com.google.longrunning.Operation> + getAcceptHubSpokeMethod; + if ((getAcceptHubSpokeMethod = HubServiceGrpc.getAcceptHubSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getAcceptHubSpokeMethod = HubServiceGrpc.getAcceptHubSpokeMethod) == null) { + HubServiceGrpc.getAcceptHubSpokeMethod = + getAcceptHubSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcceptHubSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("AcceptHubSpoke")) + .build(); + } + } + } + return getAcceptHubSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest, + com.google.longrunning.Operation> + getAcceptSpokeUpdateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AcceptSpokeUpdate", + requestType = com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest, + com.google.longrunning.Operation> + getAcceptSpokeUpdateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest, + com.google.longrunning.Operation> + getAcceptSpokeUpdateMethod; + if ((getAcceptSpokeUpdateMethod = HubServiceGrpc.getAcceptSpokeUpdateMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getAcceptSpokeUpdateMethod = HubServiceGrpc.getAcceptSpokeUpdateMethod) == null) { + HubServiceGrpc.getAcceptSpokeUpdateMethod = + getAcceptSpokeUpdateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AcceptSpokeUpdate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("AcceptSpokeUpdate")) + .build(); + } + } + } + return getAcceptSpokeUpdateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest, + com.google.longrunning.Operation> + getRejectSpokeUpdateMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RejectSpokeUpdate", + requestType = com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest, + com.google.longrunning.Operation> + getRejectSpokeUpdateMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest, + com.google.longrunning.Operation> + getRejectSpokeUpdateMethod; + if ((getRejectSpokeUpdateMethod = HubServiceGrpc.getRejectSpokeUpdateMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getRejectSpokeUpdateMethod = HubServiceGrpc.getRejectSpokeUpdateMethod) == null) { + HubServiceGrpc.getRejectSpokeUpdateMethod = + getRejectSpokeUpdateMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RejectSpokeUpdate")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("RejectSpokeUpdate")) + .build(); + } + } + } + return getRejectSpokeUpdateMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest, + com.google.longrunning.Operation> + getDeleteSpokeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSpoke", + requestType = com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest, + com.google.longrunning.Operation> + getDeleteSpokeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest, + com.google.longrunning.Operation> + getDeleteSpokeMethod; + if ((getDeleteSpokeMethod = HubServiceGrpc.getDeleteSpokeMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getDeleteSpokeMethod = HubServiceGrpc.getDeleteSpokeMethod) == null) { + HubServiceGrpc.getDeleteSpokeMethod = + getDeleteSpokeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSpoke")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("DeleteSpoke")) + .build(); + } + } + } + return getDeleteSpokeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1beta.RouteTable> + getGetRouteTableMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRouteTable", + requestType = com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.RouteTable.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1beta.RouteTable> + getGetRouteTableMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1beta.RouteTable> + getGetRouteTableMethod; + if ((getGetRouteTableMethod = HubServiceGrpc.getGetRouteTableMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetRouteTableMethod = HubServiceGrpc.getGetRouteTableMethod) == null) { + HubServiceGrpc.getGetRouteTableMethod = + getGetRouteTableMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRouteTable")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.RouteTable + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetRouteTable")) + .build(); + } + } + } + return getGetRouteTableMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest, + com.google.cloud.networkconnectivity.v1beta.Route> + getGetRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRoute", + requestType = com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Route.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest, + com.google.cloud.networkconnectivity.v1beta.Route> + getGetRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest, + com.google.cloud.networkconnectivity.v1beta.Route> + getGetRouteMethod; + if ((getGetRouteMethod = HubServiceGrpc.getGetRouteMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetRouteMethod = HubServiceGrpc.getGetRouteMethod) == null) { + HubServiceGrpc.getGetRouteMethod = + getGetRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Route + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetRoute")) + .build(); + } + } + } + return getGetRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse> + getListRoutesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRoutes", + requestType = com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse> + getListRoutesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse> + getListRoutesMethod; + if ((getListRoutesMethod = HubServiceGrpc.getListRoutesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListRoutesMethod = HubServiceGrpc.getListRoutesMethod) == null) { + HubServiceGrpc.getListRoutesMethod = + getListRoutesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRoutes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListRoutes")) + .build(); + } + } + } + return getListRoutesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + getListRouteTablesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRouteTables", + requestType = com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + getListRouteTablesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + getListRouteTablesMethod; + if ((getListRouteTablesMethod = HubServiceGrpc.getListRouteTablesMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListRouteTablesMethod = HubServiceGrpc.getListRouteTablesMethod) == null) { + HubServiceGrpc.getListRouteTablesMethod = + getListRouteTablesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListRouteTables")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("ListRouteTables")) + .build(); + } + } + } + return getListRouteTablesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest, + com.google.cloud.networkconnectivity.v1beta.Group> + getGetGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGroup", + requestType = com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Group.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest, + com.google.cloud.networkconnectivity.v1beta.Group> + getGetGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest, + com.google.cloud.networkconnectivity.v1beta.Group> + getGetGroupMethod; + if ((getGetGroupMethod = HubServiceGrpc.getGetGroupMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetGroupMethod = HubServiceGrpc.getGetGroupMethod) == null) { + HubServiceGrpc.getGetGroupMethod = + getGetGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Group + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("GetGroup")) + .build(); + } + } + } + return getGetGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse> + getListGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGroups", + requestType = com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse> + getListGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse> + getListGroupsMethod; + if ((getListGroupsMethod = HubServiceGrpc.getListGroupsMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getListGroupsMethod = HubServiceGrpc.getListGroupsMethod) == null) { + HubServiceGrpc.getListGroupsMethod = + getListGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("ListGroups")) + .build(); + } + } + } + return getListGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest, + com.google.longrunning.Operation> + getUpdateGroupMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGroup", + requestType = com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest, + com.google.longrunning.Operation> + getUpdateGroupMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest, + com.google.longrunning.Operation> + getUpdateGroupMethod; + if ((getUpdateGroupMethod = HubServiceGrpc.getUpdateGroupMethod) == null) { + synchronized (HubServiceGrpc.class) { + if ((getUpdateGroupMethod = HubServiceGrpc.getUpdateGroupMethod) == null) { + HubServiceGrpc.getUpdateGroupMethod = + getUpdateGroupMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateGroup")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new HubServiceMethodDescriptorSupplier("UpdateGroup")) + .build(); + } + } + } + return getUpdateGroupMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getCreateGatewayAdvertisedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateGatewayAdvertisedRoute", + requestType = + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getCreateGatewayAdvertisedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getCreateGatewayAdvertisedRouteMethod; + if ((getCreateGatewayAdvertisedRouteMethod = + HubServiceGrpc.getCreateGatewayAdvertisedRouteMethod) + == null) { + synchronized (HubServiceGrpc.class) { + if ((getCreateGatewayAdvertisedRouteMethod = + HubServiceGrpc.getCreateGatewayAdvertisedRouteMethod) + == null) { + HubServiceGrpc.getCreateGatewayAdvertisedRouteMethod = + getCreateGatewayAdvertisedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateGatewayAdvertisedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .CreateGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("CreateGatewayAdvertisedRoute")) + .build(); + } + } + } + return getCreateGatewayAdvertisedRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + getGetGatewayAdvertisedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGatewayAdvertisedRoute", + requestType = + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + getGetGatewayAdvertisedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + getGetGatewayAdvertisedRouteMethod; + if ((getGetGatewayAdvertisedRouteMethod = HubServiceGrpc.getGetGatewayAdvertisedRouteMethod) + == null) { + synchronized (HubServiceGrpc.class) { + if ((getGetGatewayAdvertisedRouteMethod = HubServiceGrpc.getGetGatewayAdvertisedRouteMethod) + == null) { + HubServiceGrpc.getGetGatewayAdvertisedRouteMethod = + getGetGatewayAdvertisedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetGatewayAdvertisedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .GetGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("GetGatewayAdvertisedRoute")) + .build(); + } + } + } + return getGetGatewayAdvertisedRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + getListGatewayAdvertisedRoutesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListGatewayAdvertisedRoutes", + requestType = + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.class, + responseType = + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + getListGatewayAdvertisedRoutesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + getListGatewayAdvertisedRoutesMethod; + if ((getListGatewayAdvertisedRoutesMethod = HubServiceGrpc.getListGatewayAdvertisedRoutesMethod) + == null) { + synchronized (HubServiceGrpc.class) { + if ((getListGatewayAdvertisedRoutesMethod = + HubServiceGrpc.getListGatewayAdvertisedRoutesMethod) + == null) { + HubServiceGrpc.getListGatewayAdvertisedRoutesMethod = + getListGatewayAdvertisedRoutesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListGatewayAdvertisedRoutes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("ListGatewayAdvertisedRoutes")) + .build(); + } + } + } + return getListGatewayAdvertisedRoutesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getUpdateGatewayAdvertisedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateGatewayAdvertisedRoute", + requestType = + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getUpdateGatewayAdvertisedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getUpdateGatewayAdvertisedRouteMethod; + if ((getUpdateGatewayAdvertisedRouteMethod = + HubServiceGrpc.getUpdateGatewayAdvertisedRouteMethod) + == null) { + synchronized (HubServiceGrpc.class) { + if ((getUpdateGatewayAdvertisedRouteMethod = + HubServiceGrpc.getUpdateGatewayAdvertisedRouteMethod) + == null) { + HubServiceGrpc.getUpdateGatewayAdvertisedRouteMethod = + getUpdateGatewayAdvertisedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateGatewayAdvertisedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .UpdateGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("UpdateGatewayAdvertisedRoute")) + .build(); + } + } + } + return getUpdateGatewayAdvertisedRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getDeleteGatewayAdvertisedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteGatewayAdvertisedRoute", + requestType = + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getDeleteGatewayAdvertisedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation> + getDeleteGatewayAdvertisedRouteMethod; + if ((getDeleteGatewayAdvertisedRouteMethod = + HubServiceGrpc.getDeleteGatewayAdvertisedRouteMethod) + == null) { + synchronized (HubServiceGrpc.class) { + if ((getDeleteGatewayAdvertisedRouteMethod = + HubServiceGrpc.getDeleteGatewayAdvertisedRouteMethod) + == null) { + HubServiceGrpc.getDeleteGatewayAdvertisedRouteMethod = + getDeleteGatewayAdvertisedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteGatewayAdvertisedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .DeleteGatewayAdvertisedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new HubServiceMethodDescriptorSupplier("DeleteGatewayAdvertisedRoute")) + .build(); + } + } + } + return getDeleteGatewayAdvertisedRouteMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static HubServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HubServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceStub(channel, callOptions); + } + }; + return HubServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static HubServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HubServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceBlockingV2Stub(channel, callOptions); + } + }; + return HubServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static HubServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HubServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceBlockingStub(channel, callOptions); + } + }; + return HubServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static HubServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public HubServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceFutureStub(channel, callOptions); + } + }; + return HubServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists the Network Connectivity Center hubs associated with a given project.
+     * 
+ */ + default void listHubs( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListHubsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center hub.
+     * 
+ */ + default void getHub( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetHubMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Network Connectivity Center hub in the specified project.
+     * 
+ */ + default void createHub( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateHubMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the description and/or labels of a Network Connectivity Center
+     * hub.
+     * 
+ */ + default void updateHub( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateHubMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center hub.
+     * 
+ */ + default void deleteHub( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteHubMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + default void listHubSpokes( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListHubSpokesMethod(), responseObserver); + } + + /** + * + * + *
+     * Query the Private Service Connect propagation status of a Network
+     * Connectivity Center hub.
+     * 
+ */ + default void queryHubStatus( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getQueryHubStatusMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + default void listSpokes( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSpokesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + default void getSpoke( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + default void createSpoke( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + default void updateSpoke( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + default void rejectHubSpoke( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRejectHubSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + default void acceptHubSpoke( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcceptHubSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + default void acceptSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAcceptSpokeUpdateMethod(), responseObserver); + } + + /** + * + * + *
+     * Rejects a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + default void rejectSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRejectSpokeUpdateMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + default void deleteSpoke( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteSpokeMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + default void getRouteTable( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRouteTableMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + default void getRoute( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists routes in a given route table.
+     * 
+ */ + default void listRoutes( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListRoutesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists route tables in a given hub.
+     * 
+ */ + default void listRouteTables( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRouteTablesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + default void getGroup( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + default void listGroups( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center group.
+     * 
+ */ + default void updateGroup( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGroupMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a GatewayAdvertisedRoute
+     * 
+ */ + default void createGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateGatewayAdvertisedRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Get a GatewayAdvertisedRoute
+     * 
+ */ + default void getGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetGatewayAdvertisedRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * List GatewayAdvertisedRoutes
+     * 
+ */ + default void listGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListGatewayAdvertisedRoutesMethod(), responseObserver); + } + + /** + * + * + *
+     * Update a GatewayAdvertisedRoute
+     * 
+ */ + default void updateGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateGatewayAdvertisedRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a GatewayAdvertisedRoute
+     * 
+ */ + default void deleteGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteGatewayAdvertisedRouteMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service HubService. + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public abstract static class HubServiceImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return HubServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service HubService. + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public static final class HubServiceStub extends io.grpc.stub.AbstractAsyncStub { + private HubServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HubServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center hubs associated with a given project.
+     * 
+ */ + public void listHubs( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHubsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center hub.
+     * 
+ */ + public void getHub( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetHubMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Network Connectivity Center hub in the specified project.
+     * 
+ */ + public void createHub( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateHubMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the description and/or labels of a Network Connectivity Center
+     * hub.
+     * 
+ */ + public void updateHub( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateHubMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center hub.
+     * 
+ */ + public void deleteHub( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteHubMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public void listHubSpokes( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListHubSpokesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Query the Private Service Connect propagation status of a Network
+     * Connectivity Center hub.
+     * 
+ */ + public void queryHubStatus( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getQueryHubStatusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + public void listSpokes( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSpokesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + public void getSpoke( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSpokeMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + public void createSpoke( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + public void updateSpoke( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public void rejectHubSpoke( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRejectHubSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public void acceptHubSpoke( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcceptHubSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Accepts a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public void acceptSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAcceptSpokeUpdateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Rejects a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public void rejectSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRejectSpokeUpdateMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + public void deleteSpoke( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSpokeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public void getRouteTable( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRouteTableMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public void getRoute( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRouteMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists routes in a given route table.
+     * 
+ */ + public void listRoutes( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRoutesMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists route tables in a given hub.
+     * 
+ */ + public void listRouteTables( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRouteTablesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public void getGroup( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public void listGroups( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center group.
+     * 
+ */ + public void updateGroup( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a GatewayAdvertisedRoute
+     * 
+ */ + public void createGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateGatewayAdvertisedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get a GatewayAdvertisedRoute
+     * 
+ */ + public void getGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGatewayAdvertisedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List GatewayAdvertisedRoutes
+     * 
+ */ + public void listGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListGatewayAdvertisedRoutesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update a GatewayAdvertisedRoute
+     * 
+ */ + public void updateGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateGatewayAdvertisedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a GatewayAdvertisedRoute
+     * 
+ */ + public void deleteGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteGatewayAdvertisedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service HubService. + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public static final class HubServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private HubServiceBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HubServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center hubs associated with a given project.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListHubsResponse listHubs( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListHubsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Hub getHub( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Network Connectivity Center hub in the specified project.
+     * 
+ */ + public com.google.longrunning.Operation createHub( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the description and/or labels of a Network Connectivity Center
+     * hub.
+     * 
+ */ + public com.google.longrunning.Operation updateHub( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center hub.
+     * 
+ */ + public com.google.longrunning.Operation deleteHub( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse listHubSpokes( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListHubSpokesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Query the Private Service Connect propagation status of a Network
+     * Connectivity Center hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse queryHubStatus( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getQueryHubStatusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse listSpokes( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListSpokesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation createSpoke( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation updateSpoke( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public com.google.longrunning.Operation rejectHubSpoke( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRejectHubSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public com.google.longrunning.Operation acceptHubSpoke( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getAcceptHubSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.longrunning.Operation acceptSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getAcceptSpokeUpdateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rejects a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.longrunning.Operation rejectSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRejectSpokeUpdateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation deleteSpoke( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable getRouteTable( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetRouteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Route getRoute( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists routes in a given route table.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse listRoutes( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists route tables in a given hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse listRouteTables( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRouteTablesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Group getGroup( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse listGroups( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center group.
+     * 
+ */ + public com.google.longrunning.Operation updateGroup( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation createGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List GatewayAdvertisedRoutes
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + listGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListGatewayAdvertisedRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation updateGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation deleteGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service HubService. + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public static final class HubServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private HubServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HubServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center hubs associated with a given project.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListHubsResponse listHubs( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListHubsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Hub getHub( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Network Connectivity Center hub in the specified project.
+     * 
+ */ + public com.google.longrunning.Operation createHub( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the description and/or labels of a Network Connectivity Center
+     * hub.
+     * 
+ */ + public com.google.longrunning.Operation updateHub( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center hub.
+     * 
+ */ + public com.google.longrunning.Operation deleteHub( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteHubMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse listHubSpokes( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListHubSpokesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Query the Private Service Connect propagation status of a Network
+     * Connectivity Center hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse queryHubStatus( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getQueryHubStatusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse listSpokes( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSpokesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation createSpoke( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation updateSpoke( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public com.google.longrunning.Operation rejectHubSpoke( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRejectHubSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public com.google.longrunning.Operation acceptHubSpoke( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcceptHubSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Accepts a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.longrunning.Operation acceptSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAcceptSpokeUpdateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Rejects a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.longrunning.Operation rejectSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRejectSpokeUpdateMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.longrunning.Operation deleteSpoke( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSpokeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable getRouteTable( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRouteTableMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Route getRoute( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists routes in a given route table.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse listRoutes( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists route tables in a given hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse listRouteTables( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRouteTablesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Group getGroup( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse listGroups( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center group.
+     * 
+ */ + public com.google.longrunning.Operation updateGroup( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGroupMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation createGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List GatewayAdvertisedRoutes
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + listGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListGatewayAdvertisedRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation updateGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.longrunning.Operation deleteGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteGatewayAdvertisedRouteMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service HubService. + * + *
+   * Network Connectivity Center is a hub-and-spoke abstraction for network
+   * connectivity management in Google Cloud. It reduces operational complexity
+   * through a simple, centralized connectivity management model.
+   * 
+ */ + public static final class HubServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private HubServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected HubServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new HubServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center hubs associated with a given project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse> + listHubs(com.google.cloud.networkconnectivity.v1beta.ListHubsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListHubsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Hub> + getHub(com.google.cloud.networkconnectivity.v1beta.GetHubRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetHubMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Network Connectivity Center hub in the specified project.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createHub(com.google.cloud.networkconnectivity.v1beta.CreateHubRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateHubMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the description and/or labels of a Network Connectivity Center
+     * hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateHub(com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateHubMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteHub(com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteHubMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes associated with a
+     * specified hub and location. The list includes both spokes that are attached
+     * to the hub and spokes that have been proposed but not yet accepted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse> + listHubSpokes(com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListHubSpokesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Query the Private Service Connect propagation status of a Network
+     * Connectivity Center hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse> + queryHubStatus(com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getQueryHubStatusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Network Connectivity Center spokes in a specified project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse> + listSpokes(com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSpokesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Spoke> + getSpoke(com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createSpoke(com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateSpoke(com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Rejects a Network Connectivity Center spoke from being attached to a hub.
+     * If the spoke was previously in the `ACTIVE` state, it
+     * transitions to the `INACTIVE` state and is no longer able to
+     * connect to other spokes that are attached to the hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rejectHubSpoke(com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRejectHubSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Accepts a proposal to attach a Network Connectivity Center spoke
+     * to a hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + acceptHubSpoke(com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcceptHubSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Accepts a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + acceptSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAcceptSpokeUpdateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Rejects a proposal to update a Network Connectivity Center spoke in a hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + rejectSpokeUpdate( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRejectSpokeUpdateMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Network Connectivity Center spoke.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSpoke(com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSpokeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center route table.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.RouteTable> + getRouteTable(com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRouteTableMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about the specified route.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Route> + getRoute(com.google.cloud.networkconnectivity.v1beta.GetRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists routes in a given route table.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse> + listRoutes(com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRoutesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists route tables in a given hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse> + listRouteTables( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRouteTablesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details about a Network Connectivity Center group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Group> + getGroup(com.google.cloud.networkconnectivity.v1beta.GetGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists groups in a given hub.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse> + listGroups(com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a Network Connectivity Center group.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateGroup(com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGroupMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateGatewayAdvertisedRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + getGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGatewayAdvertisedRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List GatewayAdvertisedRoutes
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse> + listGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListGatewayAdvertisedRoutesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateGatewayAdvertisedRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a GatewayAdvertisedRoute
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteGatewayAdvertisedRouteMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_HUBS = 0; + private static final int METHODID_GET_HUB = 1; + private static final int METHODID_CREATE_HUB = 2; + private static final int METHODID_UPDATE_HUB = 3; + private static final int METHODID_DELETE_HUB = 4; + private static final int METHODID_LIST_HUB_SPOKES = 5; + private static final int METHODID_QUERY_HUB_STATUS = 6; + private static final int METHODID_LIST_SPOKES = 7; + private static final int METHODID_GET_SPOKE = 8; + private static final int METHODID_CREATE_SPOKE = 9; + private static final int METHODID_UPDATE_SPOKE = 10; + private static final int METHODID_REJECT_HUB_SPOKE = 11; + private static final int METHODID_ACCEPT_HUB_SPOKE = 12; + private static final int METHODID_ACCEPT_SPOKE_UPDATE = 13; + private static final int METHODID_REJECT_SPOKE_UPDATE = 14; + private static final int METHODID_DELETE_SPOKE = 15; + private static final int METHODID_GET_ROUTE_TABLE = 16; + private static final int METHODID_GET_ROUTE = 17; + private static final int METHODID_LIST_ROUTES = 18; + private static final int METHODID_LIST_ROUTE_TABLES = 19; + private static final int METHODID_GET_GROUP = 20; + private static final int METHODID_LIST_GROUPS = 21; + private static final int METHODID_UPDATE_GROUP = 22; + private static final int METHODID_CREATE_GATEWAY_ADVERTISED_ROUTE = 23; + private static final int METHODID_GET_GATEWAY_ADVERTISED_ROUTE = 24; + private static final int METHODID_LIST_GATEWAY_ADVERTISED_ROUTES = 25; + private static final int METHODID_UPDATE_GATEWAY_ADVERTISED_ROUTE = 26; + private static final int METHODID_DELETE_GATEWAY_ADVERTISED_ROUTE = 27; + + 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_HUBS: + serviceImpl.listHubs( + (com.google.cloud.networkconnectivity.v1beta.ListHubsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse>) + responseObserver); + break; + case METHODID_GET_HUB: + serviceImpl.getHub( + (com.google.cloud.networkconnectivity.v1beta.GetHubRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_HUB: + serviceImpl.createHub( + (com.google.cloud.networkconnectivity.v1beta.CreateHubRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_HUB: + serviceImpl.updateHub( + (com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_HUB: + serviceImpl.deleteHub( + (com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_HUB_SPOKES: + serviceImpl.listHubSpokes( + (com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse>) + responseObserver); + break; + case METHODID_QUERY_HUB_STATUS: + serviceImpl.queryHubStatus( + (com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse>) + responseObserver); + break; + case METHODID_LIST_SPOKES: + serviceImpl.listSpokes( + (com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse>) + responseObserver); + break; + case METHODID_GET_SPOKE: + serviceImpl.getSpoke( + (com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SPOKE: + serviceImpl.createSpoke( + (com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SPOKE: + serviceImpl.updateSpoke( + (com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REJECT_HUB_SPOKE: + serviceImpl.rejectHubSpoke( + (com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACCEPT_HUB_SPOKE: + serviceImpl.acceptHubSpoke( + (com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACCEPT_SPOKE_UPDATE: + serviceImpl.acceptSpokeUpdate( + (com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REJECT_SPOKE_UPDATE: + serviceImpl.rejectSpokeUpdate( + (com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SPOKE: + serviceImpl.deleteSpoke( + (com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ROUTE_TABLE: + serviceImpl.getRouteTable( + (com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ROUTE: + serviceImpl.getRoute( + (com.google.cloud.networkconnectivity.v1beta.GetRouteRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ROUTES: + serviceImpl.listRoutes( + (com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse>) + responseObserver); + break; + case METHODID_LIST_ROUTE_TABLES: + serviceImpl.listRouteTables( + (com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse>) + responseObserver); + break; + case METHODID_GET_GROUP: + serviceImpl.getGroup( + (com.google.cloud.networkconnectivity.v1beta.GetGroupRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_GROUPS: + serviceImpl.listGroups( + (com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse>) + responseObserver); + break; + case METHODID_UPDATE_GROUP: + serviceImpl.updateGroup( + (com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_GATEWAY_ADVERTISED_ROUTE: + serviceImpl.createGatewayAdvertisedRoute( + (com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GATEWAY_ADVERTISED_ROUTE: + serviceImpl.getGatewayAdvertisedRoute( + (com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute>) + responseObserver); + break; + case METHODID_LIST_GATEWAY_ADVERTISED_ROUTES: + serviceImpl.listGatewayAdvertisedRoutes( + (com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesResponse>) + responseObserver); + break; + case METHODID_UPDATE_GATEWAY_ADVERTISED_ROUTE: + serviceImpl.updateGatewayAdvertisedRoute( + (com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_GATEWAY_ADVERTISED_ROUTE: + serviceImpl.deleteGatewayAdvertisedRoute( + (com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + 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( + getListHubsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse>( + service, METHODID_LIST_HUBS))) + .addMethod( + getGetHubMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetHubRequest, + com.google.cloud.networkconnectivity.v1beta.Hub>(service, METHODID_GET_HUB))) + .addMethod( + getCreateHubMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_HUB))) + .addMethod( + getUpdateHubMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_HUB))) + .addMethod( + getDeleteHubMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_HUB))) + .addMethod( + getListHubSpokesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse>( + service, METHODID_LIST_HUB_SPOKES))) + .addMethod( + getQueryHubStatusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse>( + service, METHODID_QUERY_HUB_STATUS))) + .addMethod( + getListSpokesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse>( + service, METHODID_LIST_SPOKES))) + .addMethod( + getGetSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest, + com.google.cloud.networkconnectivity.v1beta.Spoke>( + service, METHODID_GET_SPOKE))) + .addMethod( + getCreateSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_SPOKE))) + .addMethod( + getUpdateSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_SPOKE))) + .addMethod( + getRejectHubSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_REJECT_HUB_SPOKE))) + .addMethod( + getAcceptHubSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_ACCEPT_HUB_SPOKE))) + .addMethod( + getAcceptSpokeUpdateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest, + com.google.longrunning.Operation>(service, METHODID_ACCEPT_SPOKE_UPDATE))) + .addMethod( + getRejectSpokeUpdateMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest, + com.google.longrunning.Operation>(service, METHODID_REJECT_SPOKE_UPDATE))) + .addMethod( + getDeleteSpokeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SPOKE))) + .addMethod( + getGetRouteTableMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest, + com.google.cloud.networkconnectivity.v1beta.RouteTable>( + service, METHODID_GET_ROUTE_TABLE))) + .addMethod( + getGetRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest, + com.google.cloud.networkconnectivity.v1beta.Route>( + service, METHODID_GET_ROUTE))) + .addMethod( + getListRoutesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse>( + service, METHODID_LIST_ROUTES))) + .addMethod( + getListRouteTablesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse>( + service, METHODID_LIST_ROUTE_TABLES))) + .addMethod( + getGetGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest, + com.google.cloud.networkconnectivity.v1beta.Group>( + service, METHODID_GET_GROUP))) + .addMethod( + getListGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse>( + service, METHODID_LIST_GROUPS))) + .addMethod( + getUpdateGroupMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_GROUP))) + .addMethod( + getCreateGatewayAdvertisedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_GATEWAY_ADVERTISED_ROUTE))) + .addMethod( + getGetGatewayAdvertisedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute>( + service, METHODID_GET_GATEWAY_ADVERTISED_ROUTE))) + .addMethod( + getListGatewayAdvertisedRoutesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesResponse>( + service, METHODID_LIST_GATEWAY_ADVERTISED_ROUTES))) + .addMethod( + getUpdateGatewayAdvertisedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_GATEWAY_ADVERTISED_ROUTE))) + .addMethod( + getDeleteGatewayAdvertisedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_GATEWAY_ADVERTISED_ROUTE))) + .build(); + } + + private abstract static class HubServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + HubServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("HubService"); + } + } + + private static final class HubServiceFileDescriptorSupplier + extends HubServiceBaseDescriptorSupplier { + HubServiceFileDescriptorSupplier() {} + } + + private static final class HubServiceMethodDescriptorSupplier + extends HubServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + HubServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (HubServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new HubServiceFileDescriptorSupplier()) + .addMethod(getListHubsMethod()) + .addMethod(getGetHubMethod()) + .addMethod(getCreateHubMethod()) + .addMethod(getUpdateHubMethod()) + .addMethod(getDeleteHubMethod()) + .addMethod(getListHubSpokesMethod()) + .addMethod(getQueryHubStatusMethod()) + .addMethod(getListSpokesMethod()) + .addMethod(getGetSpokeMethod()) + .addMethod(getCreateSpokeMethod()) + .addMethod(getUpdateSpokeMethod()) + .addMethod(getRejectHubSpokeMethod()) + .addMethod(getAcceptHubSpokeMethod()) + .addMethod(getAcceptSpokeUpdateMethod()) + .addMethod(getRejectSpokeUpdateMethod()) + .addMethod(getDeleteSpokeMethod()) + .addMethod(getGetRouteTableMethod()) + .addMethod(getGetRouteMethod()) + .addMethod(getListRoutesMethod()) + .addMethod(getListRouteTablesMethod()) + .addMethod(getGetGroupMethod()) + .addMethod(getListGroupsMethod()) + .addMethod(getUpdateGroupMethod()) + .addMethod(getCreateGatewayAdvertisedRouteMethod()) + .addMethod(getGetGatewayAdvertisedRouteMethod()) + .addMethod(getListGatewayAdvertisedRoutesMethod()) + .addMethod(getUpdateGatewayAdvertisedRouteMethod()) + .addMethod(getDeleteGatewayAdvertisedRouteMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceGrpc.java b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceGrpc.java new file mode 100644 index 000000000000..42ce99145d9d --- /dev/null +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingServiceGrpc.java @@ -0,0 +1,864 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.networkconnectivity.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Policy-Based Routing allows GCP customers to specify flexibile routing
+ * policies for Layer 4 traffic traversing through the connected service.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class PolicyBasedRoutingServiceGrpc { + + private PolicyBasedRoutingServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + getListPolicyBasedRoutesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPolicyBasedRoutes", + requestType = com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.class, + responseType = + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + getListPolicyBasedRoutesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + getListPolicyBasedRoutesMethod; + if ((getListPolicyBasedRoutesMethod = + PolicyBasedRoutingServiceGrpc.getListPolicyBasedRoutesMethod) + == null) { + synchronized (PolicyBasedRoutingServiceGrpc.class) { + if ((getListPolicyBasedRoutesMethod = + PolicyBasedRoutingServiceGrpc.getListPolicyBasedRoutesMethod) + == null) { + PolicyBasedRoutingServiceGrpc.getListPolicyBasedRoutesMethod = + getListPolicyBasedRoutesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPolicyBasedRoutes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListPolicyBasedRoutesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListPolicyBasedRoutesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBasedRoutingServiceMethodDescriptorSupplier( + "ListPolicyBasedRoutes")) + .build(); + } + } + } + return getListPolicyBasedRoutesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute> + getGetPolicyBasedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicyBasedRoute", + requestType = com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute> + getGetPolicyBasedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute> + getGetPolicyBasedRouteMethod; + if ((getGetPolicyBasedRouteMethod = PolicyBasedRoutingServiceGrpc.getGetPolicyBasedRouteMethod) + == null) { + synchronized (PolicyBasedRoutingServiceGrpc.class) { + if ((getGetPolicyBasedRouteMethod = + PolicyBasedRoutingServiceGrpc.getGetPolicyBasedRouteMethod) + == null) { + PolicyBasedRoutingServiceGrpc.getGetPolicyBasedRouteMethod = + getGetPolicyBasedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetPolicyBasedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBasedRoutingServiceMethodDescriptorSupplier( + "GetPolicyBasedRoute")) + .build(); + } + } + } + return getGetPolicyBasedRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getCreatePolicyBasedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePolicyBasedRoute", + requestType = com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getCreatePolicyBasedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getCreatePolicyBasedRouteMethod; + if ((getCreatePolicyBasedRouteMethod = + PolicyBasedRoutingServiceGrpc.getCreatePolicyBasedRouteMethod) + == null) { + synchronized (PolicyBasedRoutingServiceGrpc.class) { + if ((getCreatePolicyBasedRouteMethod = + PolicyBasedRoutingServiceGrpc.getCreatePolicyBasedRouteMethod) + == null) { + PolicyBasedRoutingServiceGrpc.getCreatePolicyBasedRouteMethod = + getCreatePolicyBasedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePolicyBasedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .CreatePolicyBasedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBasedRoutingServiceMethodDescriptorSupplier( + "CreatePolicyBasedRoute")) + .build(); + } + } + } + return getCreatePolicyBasedRouteMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getDeletePolicyBasedRouteMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePolicyBasedRoute", + requestType = com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getDeletePolicyBasedRouteMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest, + com.google.longrunning.Operation> + getDeletePolicyBasedRouteMethod; + if ((getDeletePolicyBasedRouteMethod = + PolicyBasedRoutingServiceGrpc.getDeletePolicyBasedRouteMethod) + == null) { + synchronized (PolicyBasedRoutingServiceGrpc.class) { + if ((getDeletePolicyBasedRouteMethod = + PolicyBasedRoutingServiceGrpc.getDeletePolicyBasedRouteMethod) + == null) { + PolicyBasedRoutingServiceGrpc.getDeletePolicyBasedRouteMethod = + getDeletePolicyBasedRouteMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePolicyBasedRoute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .DeletePolicyBasedRouteRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new PolicyBasedRoutingServiceMethodDescriptorSupplier( + "DeletePolicyBasedRoute")) + .build(); + } + } + } + return getDeletePolicyBasedRouteMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PolicyBasedRoutingServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBasedRoutingServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceStub(channel, callOptions); + } + }; + return PolicyBasedRoutingServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static PolicyBasedRoutingServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBasedRoutingServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceBlockingV2Stub(channel, callOptions); + } + }; + return PolicyBasedRoutingServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PolicyBasedRoutingServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBasedRoutingServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceBlockingStub(channel, callOptions); + } + }; + return PolicyBasedRoutingServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PolicyBasedRoutingServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PolicyBasedRoutingServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceFutureStub(channel, callOptions); + } + }; + return PolicyBasedRoutingServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists policy-based routes in a given project and location.
+     * 
+ */ + default void listPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPolicyBasedRoutesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single policy-based route.
+     * 
+ */ + default void getPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPolicyBasedRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new policy-based route in a given project and location.
+     * 
+ */ + default void createPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePolicyBasedRouteMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single policy-based route.
+     * 
+ */ + default void deletePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePolicyBasedRouteMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service PolicyBasedRoutingService. + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public abstract static class PolicyBasedRoutingServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PolicyBasedRoutingServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service PolicyBasedRoutingService. + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public static final class PolicyBasedRoutingServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private PolicyBasedRoutingServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBasedRoutingServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists policy-based routes in a given project and location.
+     * 
+ */ + public void listPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPolicyBasedRoutesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single policy-based route.
+     * 
+ */ + public void getPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyBasedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new policy-based route in a given project and location.
+     * 
+ */ + public void createPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePolicyBasedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single policy-based route.
+     * 
+ */ + public void deletePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePolicyBasedRouteMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service PolicyBasedRoutingService. + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public static final class PolicyBasedRoutingServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBasedRoutingServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBasedRoutingServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists policy-based routes in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + listPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListPolicyBasedRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single policy-based route.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetPolicyBasedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new policy-based route in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreatePolicyBasedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single policy-based route.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeletePolicyBasedRouteMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * PolicyBasedRoutingService. + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public static final class PolicyBasedRoutingServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PolicyBasedRoutingServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBasedRoutingServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists policy-based routes in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + listPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPolicyBasedRoutesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single policy-based route.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyBasedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new policy-based route in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePolicyBasedRouteMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single policy-based route.
+     * 
+ */ + public com.google.longrunning.Operation deletePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePolicyBasedRouteMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * PolicyBasedRoutingService. + * + *
+   * Policy-Based Routing allows GCP customers to specify flexibile routing
+   * policies for Layer 4 traffic traversing through the connected service.
+   * 
+ */ + public static final class PolicyBasedRoutingServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PolicyBasedRoutingServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PolicyBasedRoutingServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PolicyBasedRoutingServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists policy-based routes in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse> + listPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPolicyBasedRoutesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single policy-based route.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute> + getPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyBasedRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new policy-based route in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePolicyBasedRouteMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single policy-based route.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePolicyBasedRouteMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_POLICY_BASED_ROUTES = 0; + private static final int METHODID_GET_POLICY_BASED_ROUTE = 1; + private static final int METHODID_CREATE_POLICY_BASED_ROUTE = 2; + private static final int METHODID_DELETE_POLICY_BASED_ROUTE = 3; + + 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_POLICY_BASED_ROUTES: + serviceImpl.listPolicyBasedRoutes( + (com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse>) + responseObserver); + break; + case METHODID_GET_POLICY_BASED_ROUTE: + serviceImpl.getPolicyBasedRoute( + (com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute>) + responseObserver); + break; + case METHODID_CREATE_POLICY_BASED_ROUTE: + serviceImpl.createPolicyBasedRoute( + (com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_POLICY_BASED_ROUTE: + serviceImpl.deletePolicyBasedRoute( + (com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) 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( + getListPolicyBasedRoutesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse>( + service, METHODID_LIST_POLICY_BASED_ROUTES))) + .addMethod( + getGetPolicyBasedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute>( + service, METHODID_GET_POLICY_BASED_ROUTE))) + .addMethod( + getCreatePolicyBasedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_POLICY_BASED_ROUTE))) + .addMethod( + getDeletePolicyBasedRouteMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_POLICY_BASED_ROUTE))) + .build(); + } + + private abstract static class PolicyBasedRoutingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PolicyBasedRoutingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PolicyBasedRoutingService"); + } + } + + private static final class PolicyBasedRoutingServiceFileDescriptorSupplier + extends PolicyBasedRoutingServiceBaseDescriptorSupplier { + PolicyBasedRoutingServiceFileDescriptorSupplier() {} + } + + private static final class PolicyBasedRoutingServiceMethodDescriptorSupplier + extends PolicyBasedRoutingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PolicyBasedRoutingServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PolicyBasedRoutingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PolicyBasedRoutingServiceFileDescriptorSupplier()) + .addMethod(getListPolicyBasedRoutesMethod()) + .addMethod(getGetPolicyBasedRouteMethod()) + .addMethod(getCreatePolicyBasedRouteMethod()) + .addMethod(getDeletePolicyBasedRouteMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerGrpc.java b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerGrpc.java new file mode 100644 index 000000000000..b5a819510c17 --- /dev/null +++ b/java-networkconnectivity/grpc-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerGrpc.java @@ -0,0 +1,1390 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.networkconnectivity.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * The CLH based service for managing RemoteTransportProfiles and Transports.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class TransportManagerGrpc { + + private TransportManagerGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.networkconnectivity.v1beta.TransportManager"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + getListRemoteTransportProfilesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRemoteTransportProfiles", + requestType = + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.class, + responseType = + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + getListRemoteTransportProfilesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + getListRemoteTransportProfilesMethod; + if ((getListRemoteTransportProfilesMethod = + TransportManagerGrpc.getListRemoteTransportProfilesMethod) + == null) { + synchronized (TransportManagerGrpc.class) { + if ((getListRemoteTransportProfilesMethod = + TransportManagerGrpc.getListRemoteTransportProfilesMethod) + == null) { + TransportManagerGrpc.getListRemoteTransportProfilesMethod = + getListRemoteTransportProfilesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListRemoteTransportProfiles")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier( + "ListRemoteTransportProfiles")) + .build(); + } + } + } + return getListRemoteTransportProfilesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + getGetRemoteTransportProfileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRemoteTransportProfile", + requestType = + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + getGetRemoteTransportProfileMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + getGetRemoteTransportProfileMethod; + if ((getGetRemoteTransportProfileMethod = + TransportManagerGrpc.getGetRemoteTransportProfileMethod) + == null) { + synchronized (TransportManagerGrpc.class) { + if ((getGetRemoteTransportProfileMethod = + TransportManagerGrpc.getGetRemoteTransportProfileMethod) + == null) { + TransportManagerGrpc.getGetRemoteTransportProfileMethod = + getGetRemoteTransportProfileMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetRemoteTransportProfile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta + .GetRemoteTransportProfileRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("GetRemoteTransportProfile")) + .build(); + } + } + } + return getGetRemoteTransportProfileMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + getListTransportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTransports", + requestType = com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + getListTransportsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + getListTransportsMethod; + if ((getListTransportsMethod = TransportManagerGrpc.getListTransportsMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getListTransportsMethod = TransportManagerGrpc.getListTransportsMethod) == null) { + TransportManagerGrpc.getListTransportsMethod = + getListTransportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTransports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("ListTransports")) + .build(); + } + } + } + return getListTransportsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest, + com.google.cloud.networkconnectivity.v1beta.Transport> + getGetTransportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTransport", + requestType = com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.Transport.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest, + com.google.cloud.networkconnectivity.v1beta.Transport> + getGetTransportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest, + com.google.cloud.networkconnectivity.v1beta.Transport> + getGetTransportMethod; + if ((getGetTransportMethod = TransportManagerGrpc.getGetTransportMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getGetTransportMethod = TransportManagerGrpc.getGetTransportMethod) == null) { + TransportManagerGrpc.getGetTransportMethod = + getGetTransportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.Transport + .getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("GetTransport")) + .build(); + } + } + } + return getGetTransportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse> + getGetStatusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetStatus", + requestType = com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.class, + responseType = com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse> + getGetStatusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse> + getGetStatusMethod; + if ((getGetStatusMethod = TransportManagerGrpc.getGetStatusMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getGetStatusMethod = TransportManagerGrpc.getGetStatusMethod) == null) { + TransportManagerGrpc.getGetStatusMethod = + getGetStatusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetStatus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("GetStatus")) + .build(); + } + } + } + return getGetStatusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest, + com.google.longrunning.Operation> + getCreateTransportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTransport", + requestType = com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest, + com.google.longrunning.Operation> + getCreateTransportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest, + com.google.longrunning.Operation> + getCreateTransportMethod; + if ((getCreateTransportMethod = TransportManagerGrpc.getCreateTransportMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getCreateTransportMethod = TransportManagerGrpc.getCreateTransportMethod) == null) { + TransportManagerGrpc.getCreateTransportMethod = + getCreateTransportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTransport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("CreateTransport")) + .build(); + } + } + } + return getCreateTransportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest, + com.google.longrunning.Operation> + getUpdateTransportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTransport", + requestType = com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest, + com.google.longrunning.Operation> + getUpdateTransportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest, + com.google.longrunning.Operation> + getUpdateTransportMethod; + if ((getUpdateTransportMethod = TransportManagerGrpc.getUpdateTransportMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getUpdateTransportMethod = TransportManagerGrpc.getUpdateTransportMethod) == null) { + TransportManagerGrpc.getUpdateTransportMethod = + getUpdateTransportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTransport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("UpdateTransport")) + .build(); + } + } + } + return getUpdateTransportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest, + com.google.longrunning.Operation> + getDeleteTransportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTransport", + requestType = com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest, + com.google.longrunning.Operation> + getDeleteTransportMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest, + com.google.longrunning.Operation> + getDeleteTransportMethod; + if ((getDeleteTransportMethod = TransportManagerGrpc.getDeleteTransportMethod) == null) { + synchronized (TransportManagerGrpc.class) { + if ((getDeleteTransportMethod = TransportManagerGrpc.getDeleteTransportMethod) == null) { + TransportManagerGrpc.getDeleteTransportMethod = + getDeleteTransportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTransport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new TransportManagerMethodDescriptorSupplier("DeleteTransport")) + .build(); + } + } + } + return getDeleteTransportMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static TransportManagerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransportManagerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerStub(channel, callOptions); + } + }; + return TransportManagerStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static TransportManagerBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransportManagerBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerBlockingV2Stub(channel, callOptions); + } + }; + return TransportManagerBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TransportManagerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransportManagerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerBlockingStub(channel, callOptions); + } + }; + return TransportManagerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static TransportManagerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransportManagerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerFutureStub(channel, callOptions); + } + }; + return TransportManagerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists RemoteTransportProfiles in a given project and location.
+     * 
+ */ + default void listRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRemoteTransportProfilesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single RemoteTransportProfile.
+     * 
+ */ + default void getRemoteTransportProfile( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetRemoteTransportProfileMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Transports in a given project and location.
+     * 
+ */ + default void listTransports( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTransportsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Transport.
+     * 
+ */ + default void getTransport( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTransportMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets the operational status of a single Transport.
+     * 
+ */ + default void getStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStatusMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new Transport in a given project and location.
+     * 
+ */ + default void createTransport( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTransportMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Transport.
+     * 
+ */ + default void updateTransport( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTransportMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Transport.
+     * 
+ */ + default void deleteTransport( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteTransportMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service TransportManager. + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public abstract static class TransportManagerImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return TransportManagerGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service TransportManager. + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public static final class TransportManagerStub + extends io.grpc.stub.AbstractAsyncStub { + private TransportManagerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransportManagerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists RemoteTransportProfiles in a given project and location.
+     * 
+ */ + public void listRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRemoteTransportProfilesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single RemoteTransportProfile.
+     * 
+ */ + public void getRemoteTransportProfile( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRemoteTransportProfileMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Transports in a given project and location.
+     * 
+ */ + public void listTransports( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTransportsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Transport.
+     * 
+ */ + public void getTransport( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTransportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets the operational status of a single Transport.
+     * 
+ */ + public void getStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStatusMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new Transport in a given project and location.
+     * 
+ */ + public void createTransport( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTransportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Transport.
+     * 
+ */ + public void updateTransport( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTransportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Transport.
+     * 
+ */ + public void deleteTransport( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteTransportMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service TransportManager. + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public static final class TransportManagerBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private TransportManagerBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransportManagerBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists RemoteTransportProfiles in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + listRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRemoteTransportProfilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single RemoteTransportProfile.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getRemoteTransportProfile( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetRemoteTransportProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Transports in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse listTransports( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListTransportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Transport.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the operational status of a single Transport.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse getStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetStatusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Transport in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createTransport( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Transport.
+     * 
+ */ + public com.google.longrunning.Operation updateTransport( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Transport.
+     * 
+ */ + public com.google.longrunning.Operation deleteTransport( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteTransportMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service TransportManager. + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public static final class TransportManagerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private TransportManagerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransportManagerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists RemoteTransportProfiles in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + listRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRemoteTransportProfilesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single RemoteTransportProfile.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getRemoteTransportProfile( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRemoteTransportProfileMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Transports in a given project and location.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse listTransports( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTransportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Transport.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets the operational status of a single Transport.
+     * 
+ */ + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse getStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStatusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new Transport in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createTransport( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Transport.
+     * 
+ */ + public com.google.longrunning.Operation updateTransport( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTransportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Transport.
+     * 
+ */ + public com.google.longrunning.Operation deleteTransport( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteTransportMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service TransportManager. + * + *
+   * The CLH based service for managing RemoteTransportProfiles and Transports.
+   * 
+ */ + public static final class TransportManagerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private TransportManagerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransportManagerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransportManagerFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists RemoteTransportProfiles in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse> + listRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRemoteTransportProfilesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single RemoteTransportProfile.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + getRemoteTransportProfile( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRemoteTransportProfileMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Transports in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse> + listTransports(com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTransportsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Transport.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.Transport> + getTransport(com.google.cloud.networkconnectivity.v1beta.GetTransportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTransportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets the operational status of a single Transport.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse> + getStatus(com.google.cloud.networkconnectivity.v1beta.GetStatusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetStatusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new Transport in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createTransport( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTransportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Transport.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateTransport( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTransportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Transport.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteTransport( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteTransportMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_REMOTE_TRANSPORT_PROFILES = 0; + private static final int METHODID_GET_REMOTE_TRANSPORT_PROFILE = 1; + private static final int METHODID_LIST_TRANSPORTS = 2; + private static final int METHODID_GET_TRANSPORT = 3; + private static final int METHODID_GET_STATUS = 4; + private static final int METHODID_CREATE_TRANSPORT = 5; + private static final int METHODID_UPDATE_TRANSPORT = 6; + private static final int METHODID_DELETE_TRANSPORT = 7; + + 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_REMOTE_TRANSPORT_PROFILES: + serviceImpl.listRemoteTransportProfiles( + (com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesResponse>) + responseObserver); + break; + case METHODID_GET_REMOTE_TRANSPORT_PROFILE: + serviceImpl.getRemoteTransportProfile( + (com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile>) + responseObserver); + break; + case METHODID_LIST_TRANSPORTS: + serviceImpl.listTransports( + (com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse>) + responseObserver); + break; + case METHODID_GET_TRANSPORT: + serviceImpl.getTransport( + (com.google.cloud.networkconnectivity.v1beta.GetTransportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_STATUS: + serviceImpl.getStatus( + (com.google.cloud.networkconnectivity.v1beta.GetStatusRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse>) + responseObserver); + break; + case METHODID_CREATE_TRANSPORT: + serviceImpl.createTransport( + (com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_TRANSPORT: + serviceImpl.updateTransport( + (com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TRANSPORT: + serviceImpl.deleteTransport( + (com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) 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( + getListRemoteTransportProfilesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest, + com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesResponse>( + service, METHODID_LIST_REMOTE_TRANSPORT_PROFILES))) + .addMethod( + getGetRemoteTransportProfileMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile>( + service, METHODID_GET_REMOTE_TRANSPORT_PROFILE))) + .addMethod( + getListTransportsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse>( + service, METHODID_LIST_TRANSPORTS))) + .addMethod( + getGetTransportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest, + com.google.cloud.networkconnectivity.v1beta.Transport>( + service, METHODID_GET_TRANSPORT))) + .addMethod( + getGetStatusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse>( + service, METHODID_GET_STATUS))) + .addMethod( + getCreateTransportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_TRANSPORT))) + .addMethod( + getUpdateTransportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_TRANSPORT))) + .addMethod( + getDeleteTransportMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_TRANSPORT))) + .build(); + } + + private abstract static class TransportManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TransportManagerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("TransportManager"); + } + } + + private static final class TransportManagerFileDescriptorSupplier + extends TransportManagerBaseDescriptorSupplier { + TransportManagerFileDescriptorSupplier() {} + } + + private static final class TransportManagerMethodDescriptorSupplier + extends TransportManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + TransportManagerMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TransportManagerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TransportManagerFileDescriptorSupplier()) + .addMethod(getListRemoteTransportProfilesMethod()) + .addMethod(getGetRemoteTransportProfileMethod()) + .addMethod(getListTransportsMethod()) + .addMethod(getGetTransportMethod()) + .addMethod(getGetStatusMethod()) + .addMethod(getCreateTransportMethod()) + .addMethod(getUpdateTransportMethod()) + .addMethod(getDeleteTransportMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-networkconnectivity/pom.xml b/java-networkconnectivity/pom.xml index 926499e4915e..04d6c2d88666 100644 --- a/java-networkconnectivity/pom.xml +++ b/java-networkconnectivity/pom.xml @@ -31,6 +31,16 @@ google-cloud-networkconnectivity 1.87.0-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + com.google.api.grpc proto-google-cloud-networkconnectivity-v1 @@ -58,8 +68,10 @@ google-cloud-networkconnectivity grpc-google-cloud-networkconnectivity-v1alpha1 grpc-google-cloud-networkconnectivity-v1 + grpc-google-cloud-networkconnectivity-v1beta proto-google-cloud-networkconnectivity-v1alpha1 proto-google-cloud-networkconnectivity-v1 + proto-google-cloud-networkconnectivity-v1beta google-cloud-networkconnectivity-bom diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/clirr-ignored-differences.xml b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/clirr-ignored-differences.xml new file mode 100644 index 000000000000..3e5090b44e04 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/cloud/networkconnectivity/v1beta/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/networkconnectivity/v1beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/networkconnectivity/v1beta/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * addRepeatedField(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * clear() + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * clearField(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * clearOneof(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * clone() + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * setField(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * setRepeatedField(*) + ** + + + 7006 + com/google/cloud/networkconnectivity/v1beta/** + * setUnknownFields(*) + ** + + diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/pom.xml b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/pom.xml new file mode 100644 index 000000000000..df4efefdd597 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/pom.xml @@ -0,0 +1,37 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-networkconnectivity-v1beta + 1.87.0-SNAPSHOT + proto-google-cloud-networkconnectivity-v1beta + Proto library for google-cloud-networkconnectivity + + com.google.cloud + google-cloud-networkconnectivity-parent + 1.87.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequest.java new file mode 100644 index 000000000000..e412120cc953 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequest.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest} + */ +@com.google.protobuf.Generated +public final class AcceptHubSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) + AcceptHubSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcceptHubSpokeRequest"); + } + + // Use AcceptHubSpokeRequest.newBuilder() to construct. + private AcceptHubSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AcceptHubSpokeRequest() { + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * 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 hub into which to accept the spoke.
+   * 
+ * + * + * 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 SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.AcceptHubSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().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.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest 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.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest 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.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub into which to accept the spoke.
+     * 
+ * + * + * 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 hub into which to accept the spoke.
+     * 
+ * + * + * 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 hub into which to accept the spoke.
+     * 
+ * + * + * 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 hub into which to accept the spoke.
+     * 
+ * + * + * 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 hub into which to accept the spoke.
+     * 
+ * + * + * 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 spokeUri_ = ""; + + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept into the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptHubSpokeRequest 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.networkconnectivity.v1beta.AcceptHubSpokeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..6f634b2259b2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface AcceptHubSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub into which to accept the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + + /** + * + * + *
+   * Required. The URI of the spoke to accept into the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponse.java new file mode 100644 index 000000000000..c78ae5a44c0c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponse.java @@ -0,0 +1,712 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse} + */ +@com.google.protobuf.Generated +public final class AcceptHubSpokeResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) + AcceptHubSpokeResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcceptHubSpokeResponse"); + } + + // Use AcceptHubSpokeResponse.newBuilder() to construct. + private AcceptHubSpokeResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AcceptHubSpokeResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse.Builder.class); + } + + private int bitField0_; + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + 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.networkconnectivity.v1beta.AcceptHubSpokeResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse other = + (com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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 (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse 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.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse 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.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse build() { + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse result = + new com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + .getDefaultInstance()) return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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(internalGetSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) + private static final com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptHubSpokeResponse 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.networkconnectivity.v1beta.AcceptHubSpokeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponseOrBuilder.java new file mode 100644 index 000000000000..c1350bae6140 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptHubSpokeResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface AcceptHubSpokeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequest.java new file mode 100644 index 000000000000..5e772f304e23 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequest.java @@ -0,0 +1,1310 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest} + */ +@com.google.protobuf.Generated +public final class AcceptSpokeUpdateRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) + AcceptSpokeUpdateRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcceptSpokeUpdateRequest"); + } + + // Use AcceptSpokeUpdateRequest.newBuilder() to construct. + private AcceptSpokeUpdateRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AcceptSpokeUpdateRequest() { + name_ = ""; + spokeUri_ = ""; + spokeEtag_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.class, + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub to accept spoke update.
+   * 
+ * + * + * 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 hub to accept spoke update.
+   * 
+ * + * + * 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 SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + + /** + * + * + *
+   * Required. The URI of the spoke to accept update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the spoke to accept update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeEtag_ = ""; + + /** + * + * + *
+   * Required. The etag of the spoke to accept update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + @java.lang.Override + public java.lang.String getSpokeEtag() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeEtag_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The etag of the spoke to accept update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeEtagBytes() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeEtag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeEtag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, spokeEtag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeEtag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, spokeEtag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.AcceptSpokeUpdateRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest other = + (com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getSpokeEtag().equals(other.getSpokeEtag())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().hashCode(); + hash = (37 * hash) + SPOKE_ETAG_FIELD_NUMBER; + hash = (53 * hash) + getSpokeEtag().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.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest 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.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest 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.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.class, + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + spokeEtag_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest build() { + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest result = + new com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.spokeEtag_ = spokeEtag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSpokeEtag().isEmpty()) { + spokeEtag_ = other.spokeEtag_; + bitField0_ |= 0x00000004; + onChanged(); + } + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + spokeEtag_ = input.readStringRequireUtf8(); + 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 name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub to accept spoke update.
+     * 
+ * + * + * 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 hub to accept spoke update.
+     * 
+ * + * + * 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 hub to accept spoke update.
+     * 
+ * + * + * 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 hub to accept spoke update.
+     * 
+ * + * + * 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 hub to accept spoke update.
+     * 
+ * + * + * 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 spokeUri_ = ""; + + /** + * + * + *
+     * Required. The URI of the spoke to accept update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to accept update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object spokeEtag_ = ""; + + /** + * + * + *
+     * Required. The etag of the spoke to accept update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + public java.lang.String getSpokeEtag() { + java.lang.Object ref = spokeEtag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeEtag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The etag of the spoke to accept update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + public com.google.protobuf.ByteString getSpokeEtagBytes() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeEtag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The etag of the spoke to accept update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The spokeEtag to set. + * @return This builder for chaining. + */ + public Builder setSpokeEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeEtag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The etag of the spoke to accept update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSpokeEtag() { + spokeEtag_ = getDefaultInstance().getSpokeEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The etag of the spoke to accept update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for spokeEtag to set. + * @return This builder for chaining. + */ + public Builder setSpokeEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeEtag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) + private static final com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptSpokeUpdateRequest 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.networkconnectivity.v1beta.AcceptSpokeUpdateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequestOrBuilder.java new file mode 100644 index 000000000000..53c198935f43 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface AcceptSpokeUpdateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub to accept spoke update.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub to accept spoke update.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to accept update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + + /** + * + * + *
+   * Required. The URI of the spoke to accept update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Required. The etag of the spoke to accept update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + java.lang.String getSpokeEtag(); + + /** + * + * + *
+   * Required. The etag of the spoke to accept update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + com.google.protobuf.ByteString getSpokeEtagBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponse.java new file mode 100644 index 000000000000..8ca90b25198f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponse.java @@ -0,0 +1,712 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse} + */ +@com.google.protobuf.Generated +public final class AcceptSpokeUpdateResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) + AcceptSpokeUpdateResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AcceptSpokeUpdateResponse"); + } + + // Use AcceptSpokeUpdateResponse.newBuilder() to construct. + private AcceptSpokeUpdateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AcceptSpokeUpdateResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse.class, + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse.Builder.class); + } + + private int bitField0_; + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + 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.networkconnectivity.v1beta.AcceptSpokeUpdateResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse other = + (com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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 (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse 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.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse 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.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse.class, + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse build() { + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse result = + new com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + .getDefaultInstance()) return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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(internalGetSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) + private static final com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcceptSpokeUpdateResponse 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.networkconnectivity.v1beta.AcceptSpokeUpdateResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponseOrBuilder.java new file mode 100644 index 000000000000..9465a63ecfc7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AcceptSpokeUpdateResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface AcceptSpokeUpdateResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAccept.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAccept.java new file mode 100644 index 000000000000..ce98a844256f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAccept.java @@ -0,0 +1,749 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The auto-accept setting for a group controls whether
+ * proposed spokes are automatically attached to the hub. If auto-accept is
+ * enabled, the spoke immediately is attached to the hub and becomes part of the
+ * group. In this case, the new spoke is in the ACTIVE state.
+ * If auto-accept is disabled, the spoke goes to the INACTIVE
+ * state, and it must be reviewed and accepted by a hub
+ * administrator.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AutoAccept} + */ +@com.google.protobuf.Generated +public final class AutoAccept extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.AutoAccept) + AutoAcceptOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AutoAccept"); + } + + // Use AutoAccept.newBuilder() to construct. + private AutoAccept(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AutoAccept() { + autoAcceptProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AutoAccept.class, + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder.class); + } + + public static final int AUTO_ACCEPT_PROJECTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList autoAcceptProjects_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the autoAcceptProjects. + */ + public com.google.protobuf.ProtocolStringList getAutoAcceptProjectsList() { + return autoAcceptProjects_; + } + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of autoAcceptProjects. + */ + public int getAutoAcceptProjectsCount() { + return autoAcceptProjects_.size(); + } + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The autoAcceptProjects at the given index. + */ + public java.lang.String getAutoAcceptProjects(int index) { + return autoAcceptProjects_.get(index); + } + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the autoAcceptProjects at the given index. + */ + public com.google.protobuf.ByteString getAutoAcceptProjectsBytes(int index) { + return autoAcceptProjects_.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 < autoAcceptProjects_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, autoAcceptProjects_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < autoAcceptProjects_.size(); i++) { + dataSize += computeStringSizeNoTag(autoAcceptProjects_.getRaw(i)); + } + size += dataSize; + size += 1 * getAutoAcceptProjectsList().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.networkconnectivity.v1beta.AutoAccept)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.AutoAccept other = + (com.google.cloud.networkconnectivity.v1beta.AutoAccept) obj; + + if (!getAutoAcceptProjectsList().equals(other.getAutoAcceptProjectsList())) 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 (getAutoAcceptProjectsCount() > 0) { + hash = (37 * hash) + AUTO_ACCEPT_PROJECTS_FIELD_NUMBER; + hash = (53 * hash) + getAutoAcceptProjectsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept 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.networkconnectivity.v1beta.AutoAccept parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept 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.networkconnectivity.v1beta.AutoAccept parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.AutoAccept prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The auto-accept setting for a group controls whether
+   * proposed spokes are automatically attached to the hub. If auto-accept is
+   * enabled, the spoke immediately is attached to the hub and becomes part of the
+   * group. In this case, the new spoke is in the ACTIVE state.
+   * If auto-accept is disabled, the spoke goes to the INACTIVE
+   * state, and it must be reviewed and accepted by a hub
+   * administrator.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.AutoAccept} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.AutoAccept) + com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.AutoAccept.class, + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.AutoAccept.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + autoAcceptProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AutoAccept getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AutoAccept build() { + com.google.cloud.networkconnectivity.v1beta.AutoAccept result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AutoAccept buildPartial() { + com.google.cloud.networkconnectivity.v1beta.AutoAccept result = + new com.google.cloud.networkconnectivity.v1beta.AutoAccept(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.AutoAccept result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + autoAcceptProjects_.makeImmutable(); + result.autoAcceptProjects_ = autoAcceptProjects_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.AutoAccept) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.AutoAccept) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.AutoAccept other) { + if (other == com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance()) + return this; + if (!other.autoAcceptProjects_.isEmpty()) { + if (autoAcceptProjects_.isEmpty()) { + autoAcceptProjects_ = other.autoAcceptProjects_; + bitField0_ |= 0x00000001; + } else { + ensureAutoAcceptProjectsIsMutable(); + autoAcceptProjects_.addAll(other.autoAcceptProjects_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAutoAcceptProjectsIsMutable(); + autoAcceptProjects_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList autoAcceptProjects_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAutoAcceptProjectsIsMutable() { + if (!autoAcceptProjects_.isModifiable()) { + autoAcceptProjects_ = new com.google.protobuf.LazyStringArrayList(autoAcceptProjects_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the autoAcceptProjects. + */ + public com.google.protobuf.ProtocolStringList getAutoAcceptProjectsList() { + autoAcceptProjects_.makeImmutable(); + return autoAcceptProjects_; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of autoAcceptProjects. + */ + public int getAutoAcceptProjectsCount() { + return autoAcceptProjects_.size(); + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The autoAcceptProjects at the given index. + */ + public java.lang.String getAutoAcceptProjects(int index) { + return autoAcceptProjects_.get(index); + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the autoAcceptProjects at the given index. + */ + public com.google.protobuf.ByteString getAutoAcceptProjectsBytes(int index) { + return autoAcceptProjects_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The autoAcceptProjects to set. + * @return This builder for chaining. + */ + public Builder setAutoAcceptProjects(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoAcceptProjectsIsMutable(); + autoAcceptProjects_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The autoAcceptProjects to add. + * @return This builder for chaining. + */ + public Builder addAutoAcceptProjects(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutoAcceptProjectsIsMutable(); + autoAcceptProjects_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The autoAcceptProjects to add. + * @return This builder for chaining. + */ + public Builder addAllAutoAcceptProjects(java.lang.Iterable values) { + ensureAutoAcceptProjectsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoAcceptProjects_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAutoAcceptProjects() { + autoAcceptProjects_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of project ids or project numbers for which you want
+     * to enable auto-accept. The auto-accept setting is applied to
+     * spokes being created or updated in these projects.
+     * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the autoAcceptProjects to add. + * @return This builder for chaining. + */ + public Builder addAutoAcceptProjectsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAutoAcceptProjectsIsMutable(); + autoAcceptProjects_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.AutoAccept) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.AutoAccept) + private static final com.google.cloud.networkconnectivity.v1beta.AutoAccept DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.AutoAccept(); + } + + public static com.google.cloud.networkconnectivity.v1beta.AutoAccept getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutoAccept 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.networkconnectivity.v1beta.AutoAccept getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAcceptOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAcceptOrBuilder.java new file mode 100644 index 000000000000..6fcdee03b146 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/AutoAcceptOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface AutoAcceptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.AutoAccept) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the autoAcceptProjects. + */ + java.util.List getAutoAcceptProjectsList(); + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of autoAcceptProjects. + */ + int getAutoAcceptProjectsCount(); + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The autoAcceptProjects at the given index. + */ + java.lang.String getAutoAcceptProjects(int index); + + /** + * + * + *
+   * Optional. A list of project ids or project numbers for which you want
+   * to enable auto-accept. The auto-accept setting is applied to
+   * spokes being created or updated in these projects.
+   * 
+ * + * repeated string auto_accept_projects = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the autoAcceptProjects at the given index. + */ + com.google.protobuf.ByteString getAutoAcceptProjectsBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CommonProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CommonProto.java new file mode 100644 index 000000000000..019e8782fe3b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CommonProto.java @@ -0,0 +1,117 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public final class CommonProto extends com.google.protobuf.GeneratedFile { + private CommonProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommonProto"); + } + + 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_networkconnectivity_v1beta_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "4google/cloud/networkconnectivity/v1beta/common.proto\022\'google.cloud.networkconn" + + "ectivity.v1beta\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\032\037google/protobuf/timestamp.proto\"\200\002\n" + + "\021OperationMetadata\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023\n" + + "\006target\030\003 \001(\tB\003\340A\003\022\021\n" + + "\004verb\030\004 \001(\tB\003\340A\003\022\033\n" + + "\016status_message\030\005 \001(\tB\003\340A\003\022#\n" + + "\026requested_cancellation\030\006 \001(\010B\003\340A\003\022\030\n" + + "\013api_version\030\007 \001(\tB\003\340A\003B\314\005\n" + + "+com.google.cloud.networkconnectivity.v1betaB\013CommonProtoP\001Z]cloud.go" + + "ogle.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectiv" + + "itypb\252\002\'Google.Cloud.NetworkConnectivity" + + ".V1Beta\312\002\'Google\\Cloud\\NetworkConnectivi" + + "ty\\V1beta\352\002*Google::Cloud::NetworkConnectivity::V1beta\352Az\n" + + "-compute.googleapis.com/InterconnectAttachment\022Iprojects/{proj" + + "ect}/regions/{region}/interconnectAttachments/{resource_id}\352AR\n" + + "\036compute.googleap" + + "is.com/Network\0220projects/{project}/global/networks/{resource_id}\352Aa\n" + + "!compute.googleapis.com/Subnetwork\022 + * Request message to create a `Destination` resource. + * + * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateDestinationRequest} + */ +@com.google.protobuf.Generated +public final class CreateDestinationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) + CreateDestinationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateDestinationRequest"); + } + + // Use CreateDestinationRequest.newBuilder() to construct. + private CreateDestinationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateDestinationRequest() { + parent_ = ""; + destinationId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * 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 name of the parent resource.
+   * 
+ * + * + * 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 DESTINATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the `Destination` resource, which becomes the
+   * final component of the `Destination` resource name.
+   * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destinationId. + */ + @java.lang.Override + public java.lang.String getDestinationId() { + java.lang.Object ref = destinationId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the `Destination` resource, which becomes the
+   * final component of the `Destination` resource name.
+   * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destinationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationIdBytes() { + java.lang.Object ref = destinationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.Destination destination_; + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination() { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder + getDestinationOrBuilder() { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `Destination`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `Destination`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, destinationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getDestination()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, destinationId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDestination()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateDestinationRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDestinationId().equals(other.getDestinationId())) return false; + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) 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) + DESTINATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getDestinationId().hashCode(); + if (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().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.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest 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.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest 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.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to create a `Destination` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateDestinationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDestinationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + destinationId_ = ""; + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destinationId_ = destinationId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.destination_ = + destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDestinationId().isEmpty()) { + destinationId_ = other.destinationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + 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: + { + destinationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetDestinationFieldBuilder().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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 destinationId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the `Destination` resource, which becomes the
+     * final component of the `Destination` resource name.
+     * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destinationId. + */ + public java.lang.String getDestinationId() { + java.lang.Object ref = destinationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the `Destination` resource, which becomes the
+     * final component of the `Destination` resource name.
+     * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destinationId. + */ + public com.google.protobuf.ByteString getDestinationIdBytes() { + java.lang.Object ref = destinationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the `Destination` resource, which becomes the
+     * final component of the `Destination` resource name.
+     * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The destinationId to set. + * @return This builder for chaining. + */ + public Builder setDestinationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the `Destination` resource, which becomes the
+     * final component of the `Destination` resource name.
+     * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationId() { + destinationId_ = getDefaultInstance().getDestinationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the `Destination` resource, which becomes the
+     * final component of the `Destination` resource name.
+     * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for destinationId to set. + * @return This builder for chaining. + */ + public Builder setDestinationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.Destination destination_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + destinationBuilder_; + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination(com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + } else { + destinationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination( + com.google.cloud.networkconnectivity.v1beta.Destination.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDestination(com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && destination_ != null + && destination_ + != com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance()) { + getDestinationBuilder().mergeFrom(value); + } else { + destination_ = value; + } + } else { + destinationBuilder_.mergeFrom(value); + } + if (destination_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDestination() { + bitField0_ = (bitField0_ & ~0x00000004); + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.Builder getDestinationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDestinationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder + getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + } + + /** + * + * + *
+     * Required. The `Destination` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + internalGetDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `Destination`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `Destination`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `Destination`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `Destination`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `Destination`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) + private static final com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDestinationRequest 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.networkconnectivity.v1beta.CreateDestinationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateDestinationRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateDestinationRequestOrBuilder.java new file mode 100644 index 000000000000..f2c74839c380 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateDestinationRequestOrBuilder.java @@ -0,0 +1,185 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateDestinationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateDestinationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the `Destination` resource, which becomes the
+   * final component of the `Destination` resource name.
+   * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The destinationId. + */ + java.lang.String getDestinationId(); + + /** + * + * + *
+   * Required. The ID to use for the `Destination` resource, which becomes the
+   * final component of the `Destination` resource name.
+   * 
+ * + * string destination_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for destinationId. + */ + com.google.protobuf.ByteString getDestinationIdBytes(); + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + com.google.cloud.networkconnectivity.v1beta.Destination getDestination(); + + /** + * + * + *
+   * Required. The `Destination` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `Destination`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `Destination`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequest.java new file mode 100644 index 000000000000..f8105b476f86 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequest.java @@ -0,0 +1,1466 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.CreateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.CreateGatewayAdvertisedRoute].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest} + */ +@com.google.protobuf.Generated +public final class CreateGatewayAdvertisedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + CreateGatewayAdvertisedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateGatewayAdvertisedRouteRequest"); + } + + // Use CreateGatewayAdvertisedRouteRequest.newBuilder() to construct. + private CreateGatewayAdvertisedRouteRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateGatewayAdvertisedRouteRequest() { + parent_ = ""; + gatewayAdvertisedRouteId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * 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 resource.
+   * 
+ * + * + * 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 GATEWAY_ADVERTISED_ROUTE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object gatewayAdvertisedRouteId_ = ""; + + /** + * + * + *
+   * Required. Unique id for the route to create.
+   * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gatewayAdvertisedRouteId. + */ + @java.lang.Override + public java.lang.String getGatewayAdvertisedRouteId() { + java.lang.Object ref = gatewayAdvertisedRouteId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gatewayAdvertisedRouteId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Unique id for the route to create.
+   * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gatewayAdvertisedRouteId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGatewayAdvertisedRouteIdBytes() { + java.lang.Object ref = gatewayAdvertisedRouteId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gatewayAdvertisedRouteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GATEWAY_ADVERTISED_ROUTE_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + gatewayAdvertisedRoute_; + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + @java.lang.Override + public boolean hasGatewayAdvertisedRoute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute() { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.getDefaultInstance() + : gatewayAdvertisedRoute_; + } + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder() { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.getDefaultInstance() + : gatewayAdvertisedRoute_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayAdvertisedRouteId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, gatewayAdvertisedRouteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getGatewayAdvertisedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gatewayAdvertisedRouteId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, gatewayAdvertisedRouteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGatewayAdvertisedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getGatewayAdvertisedRouteId().equals(other.getGatewayAdvertisedRouteId())) return false; + if (hasGatewayAdvertisedRoute() != other.hasGatewayAdvertisedRoute()) return false; + if (hasGatewayAdvertisedRoute()) { + if (!getGatewayAdvertisedRoute().equals(other.getGatewayAdvertisedRoute())) 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) + GATEWAY_ADVERTISED_ROUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getGatewayAdvertisedRouteId().hashCode(); + if (hasGatewayAdvertisedRoute()) { + hash = (37 * hash) + GATEWAY_ADVERTISED_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getGatewayAdvertisedRoute().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.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.CreateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.CreateGatewayAdvertisedRoute].
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetGatewayAdvertisedRouteFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + gatewayAdvertisedRouteId_ = ""; + gatewayAdvertisedRoute_ = null; + if (gatewayAdvertisedRouteBuilder_ != null) { + gatewayAdvertisedRouteBuilder_.dispose(); + gatewayAdvertisedRouteBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gatewayAdvertisedRouteId_ = gatewayAdvertisedRouteId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.gatewayAdvertisedRoute_ = + gatewayAdvertisedRouteBuilder_ == null + ? gatewayAdvertisedRoute_ + : gatewayAdvertisedRouteBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getGatewayAdvertisedRouteId().isEmpty()) { + gatewayAdvertisedRouteId_ = other.gatewayAdvertisedRouteId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasGatewayAdvertisedRoute()) { + mergeGatewayAdvertisedRoute(other.getGatewayAdvertisedRoute()); + } + 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: + { + gatewayAdvertisedRouteId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetGatewayAdvertisedRouteFieldBuilder().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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 gatewayAdvertisedRouteId_ = ""; + + /** + * + * + *
+     * Required. Unique id for the route to create.
+     * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRouteId. + */ + public java.lang.String getGatewayAdvertisedRouteId() { + java.lang.Object ref = gatewayAdvertisedRouteId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gatewayAdvertisedRouteId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the route to create.
+     * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for gatewayAdvertisedRouteId. + */ + public com.google.protobuf.ByteString getGatewayAdvertisedRouteIdBytes() { + java.lang.Object ref = gatewayAdvertisedRouteId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gatewayAdvertisedRouteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the route to create.
+     * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The gatewayAdvertisedRouteId to set. + * @return This builder for chaining. + */ + public Builder setGatewayAdvertisedRouteId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gatewayAdvertisedRouteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the route to create.
+     * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearGatewayAdvertisedRouteId() { + gatewayAdvertisedRouteId_ = getDefaultInstance().getGatewayAdvertisedRouteId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the route to create.
+     * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for gatewayAdvertisedRouteId to set. + * @return This builder for chaining. + */ + public Builder setGatewayAdvertisedRouteIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gatewayAdvertisedRouteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + gatewayAdvertisedRoute_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + gatewayAdvertisedRouteBuilder_; + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + public boolean hasGatewayAdvertisedRoute() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute() { + if (gatewayAdvertisedRouteBuilder_ == null) { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance() + : gatewayAdvertisedRoute_; + } else { + return gatewayAdvertisedRouteBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gatewayAdvertisedRoute_ = value; + } else { + gatewayAdvertisedRouteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + builderForValue) { + if (gatewayAdvertisedRouteBuilder_ == null) { + gatewayAdvertisedRoute_ = builderForValue.build(); + } else { + gatewayAdvertisedRouteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRouteBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && gatewayAdvertisedRoute_ != null + && gatewayAdvertisedRoute_ + != com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance()) { + getGatewayAdvertisedRouteBuilder().mergeFrom(value); + } else { + gatewayAdvertisedRoute_ = value; + } + } else { + gatewayAdvertisedRouteBuilder_.mergeFrom(value); + } + if (gatewayAdvertisedRoute_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGatewayAdvertisedRoute() { + bitField0_ = (bitField0_ & ~0x00000004); + gatewayAdvertisedRoute_ = null; + if (gatewayAdvertisedRouteBuilder_ != null) { + gatewayAdvertisedRouteBuilder_.dispose(); + gatewayAdvertisedRouteBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + getGatewayAdvertisedRouteBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetGatewayAdvertisedRouteFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder() { + if (gatewayAdvertisedRouteBuilder_ != null) { + return gatewayAdvertisedRouteBuilder_.getMessageOrBuilder(); + } else { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance() + : gatewayAdvertisedRoute_; + } + } + + /** + * + * + *
+     * Required. Initial values for the new gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + internalGetGatewayAdvertisedRouteFieldBuilder() { + if (gatewayAdvertisedRouteBuilder_ == null) { + gatewayAdvertisedRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder>( + getGatewayAdvertisedRoute(), getParentForChildren(), isClean()); + gatewayAdvertisedRoute_ = null; + } + return gatewayAdvertisedRouteBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .CreateGatewayAdvertisedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateGatewayAdvertisedRouteRequest 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.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..5c7f95af789a --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateGatewayAdvertisedRouteRequestOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateGatewayAdvertisedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique id for the route to create.
+   * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The gatewayAdvertisedRouteId. + */ + java.lang.String getGatewayAdvertisedRouteId(); + + /** + * + * + *
+   * Required. Unique id for the route to create.
+   * 
+ * + * string gateway_advertised_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for gatewayAdvertisedRouteId. + */ + com.google.protobuf.ByteString getGatewayAdvertisedRouteIdBytes(); + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + boolean hasGatewayAdvertisedRoute(); + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute getGatewayAdvertisedRoute(); + + /** + * + * + *
+   * Required. Initial values for the new gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequest.java new file mode 100644 index 000000000000..df7bd962be03 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequest.java @@ -0,0 +1,1403 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.CreateHub][google.cloud.networkconnectivity.v1beta.HubService.CreateHub]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateHubRequest} + */ +@com.google.protobuf.Generated +public final class CreateHubRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateHubRequest) + CreateHubRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateHubRequest"); + } + + // Use CreateHubRequest.newBuilder() to construct. + private CreateHubRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateHubRequest() { + parent_ = ""; + hubId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * 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 resource.
+   * 
+ * + * + * 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 HUB_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object hubId_ = ""; + + /** + * + * + *
+   * Required. A unique identifier for the hub.
+   * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hubId. + */ + @java.lang.Override + public java.lang.String getHubId() { + java.lang.Object ref = hubId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hubId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. A unique identifier for the hub.
+   * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hubId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHubIdBytes() { + java.lang.Object ref = hubId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hubId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HUB_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.Hub hub_; + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + @java.lang.Override + public boolean hasHub() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub getHub() { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder() { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hubId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, hubId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHub()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hubId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, hubId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHub()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateHubRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateHubRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getHubId().equals(other.getHubId())) return false; + if (hasHub() != other.hasHub()) return false; + if (hasHub()) { + if (!getHub().equals(other.getHub())) 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) + HUB_ID_FIELD_NUMBER; + hash = (53 * hash) + getHubId().hashCode(); + if (hasHub()) { + hash = (37 * hash) + HUB_FIELD_NUMBER; + hash = (53 * hash) + getHub().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.networkconnectivity.v1beta.CreateHubRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest 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.networkconnectivity.v1beta.CreateHubRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest 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.networkconnectivity.v1beta.CreateHubRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.CreateHub][google.cloud.networkconnectivity.v1beta.HubService.CreateHub]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateHubRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateHubRequest) + com.google.cloud.networkconnectivity.v1beta.CreateHubRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetHubFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + hubId_ = ""; + hub_ = null; + if (hubBuilder_ != null) { + hubBuilder_.dispose(); + hubBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateHubRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateHubRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateHubRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateHubRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateHubRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hubId_ = hubId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hub_ = hubBuilder_ == null ? hub_ : hubBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.CreateHubRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.CreateHubRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.CreateHubRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateHubRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHubId().isEmpty()) { + hubId_ = other.hubId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasHub()) { + mergeHub(other.getHub()); + } + 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: + { + hubId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetHubFieldBuilder().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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 hubId_ = ""; + + /** + * + * + *
+     * Required. A unique identifier for the hub.
+     * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hubId. + */ + public java.lang.String getHubId() { + java.lang.Object ref = hubId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hubId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. A unique identifier for the hub.
+     * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hubId. + */ + public com.google.protobuf.ByteString getHubIdBytes() { + java.lang.Object ref = hubId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hubId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. A unique identifier for the hub.
+     * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The hubId to set. + * @return This builder for chaining. + */ + public Builder setHubId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hubId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique identifier for the hub.
+     * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHubId() { + hubId_ = getDefaultInstance().getHubId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. A unique identifier for the hub.
+     * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for hubId to set. + * @return This builder for chaining. + */ + public Builder setHubIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hubId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.Hub hub_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + hubBuilder_; + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + public boolean hasHub() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + public com.google.cloud.networkconnectivity.v1beta.Hub getHub() { + if (hubBuilder_ == null) { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } else { + return hubBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHub(com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hub_ = value; + } else { + hubBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHub(com.google.cloud.networkconnectivity.v1beta.Hub.Builder builderForValue) { + if (hubBuilder_ == null) { + hub_ = builderForValue.build(); + } else { + hubBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHub(com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hub_ != null + && hub_ != com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance()) { + getHubBuilder().mergeFrom(value); + } else { + hub_ = value; + } + } else { + hubBuilder_.mergeFrom(value); + } + if (hub_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHub() { + bitField0_ = (bitField0_ & ~0x00000004); + hub_ = null; + if (hubBuilder_ != null) { + hubBuilder_.dispose(); + hubBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Hub.Builder getHubBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetHubFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder() { + if (hubBuilder_ != null) { + return hubBuilder_.getMessageOrBuilder(); + } else { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + } + + /** + * + * + *
+     * Required. The initial values for a new hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + internalGetHubFieldBuilder() { + if (hubBuilder_ == null) { + hubBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder>( + getHub(), getParentForChildren(), isClean()); + hub_ = null; + } + return hubBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateHubRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateHubRequest) + private static final com.google.cloud.networkconnectivity.v1beta.CreateHubRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.CreateHubRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateHubRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateHubRequest 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.networkconnectivity.v1beta.CreateHubRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequestOrBuilder.java new file mode 100644 index 000000000000..cb1a942805ab --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateHubRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateHubRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateHubRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. A unique identifier for the hub.
+   * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hubId. + */ + java.lang.String getHubId(); + + /** + * + * + *
+   * Required. A unique identifier for the hub.
+   * 
+ * + * string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hubId. + */ + com.google.protobuf.ByteString getHubIdBytes(); + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + boolean hasHub(); + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + com.google.cloud.networkconnectivity.v1beta.Hub getHub(); + + /** + * + * + *
+   * Required. The initial values for a new hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequest.java new file mode 100644 index 000000000000..42d185fd544a --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequest.java @@ -0,0 +1,1517 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to create a `MulticloudDataTransferConfig` resource.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest} + */ +@com.google.protobuf.Generated +public final class CreateMulticloudDataTransferConfigRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + CreateMulticloudDataTransferConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateMulticloudDataTransferConfigRequest"); + } + + // Use CreateMulticloudDataTransferConfigRequest.newBuilder() to construct. + private CreateMulticloudDataTransferConfigRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateMulticloudDataTransferConfigRequest() { + parent_ = ""; + multicloudDataTransferConfigId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * 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 name of the parent resource.
+   * 
+ * + * + * 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 MULTICLOUD_DATA_TRANSFER_CONFIG_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object multicloudDataTransferConfigId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+   * which becomes the final component of the `MulticloudDataTransferConfig`
+   * resource name.
+   * 
+ * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfigId. + */ + @java.lang.Override + public java.lang.String getMulticloudDataTransferConfigId() { + java.lang.Object ref = multicloudDataTransferConfigId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + multicloudDataTransferConfigId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+   * which becomes the final component of the `MulticloudDataTransferConfig`
+   * resource name.
+   * 
+ * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for multicloudDataTransferConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMulticloudDataTransferConfigIdBytes() { + java.lang.Object ref = multicloudDataTransferConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + multicloudDataTransferConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MULTICLOUD_DATA_TRANSFER_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + multicloudDataTransferConfig_; + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + @java.lang.Override + public boolean hasMulticloudDataTransferConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder() { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(multicloudDataTransferConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, multicloudDataTransferConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getMulticloudDataTransferConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(multicloudDataTransferConfigId_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 2, multicloudDataTransferConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getMulticloudDataTransferConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getMulticloudDataTransferConfigId().equals(other.getMulticloudDataTransferConfigId())) + return false; + if (hasMulticloudDataTransferConfig() != other.hasMulticloudDataTransferConfig()) return false; + if (hasMulticloudDataTransferConfig()) { + if (!getMulticloudDataTransferConfig().equals(other.getMulticloudDataTransferConfig())) + 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) + MULTICLOUD_DATA_TRANSFER_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getMulticloudDataTransferConfigId().hashCode(); + if (hasMulticloudDataTransferConfig()) { + hash = (37 * hash) + MULTICLOUD_DATA_TRANSFER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMulticloudDataTransferConfig().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.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to create a `MulticloudDataTransferConfig` resource.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMulticloudDataTransferConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + multicloudDataTransferConfigId_ = ""; + multicloudDataTransferConfig_ = null; + if (multicloudDataTransferConfigBuilder_ != null) { + multicloudDataTransferConfigBuilder_.dispose(); + multicloudDataTransferConfigBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + build() { + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.multicloudDataTransferConfigId_ = multicloudDataTransferConfigId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.multicloudDataTransferConfig_ = + multicloudDataTransferConfigBuilder_ == null + ? multicloudDataTransferConfig_ + : multicloudDataTransferConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMulticloudDataTransferConfigId().isEmpty()) { + multicloudDataTransferConfigId_ = other.multicloudDataTransferConfigId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMulticloudDataTransferConfig()) { + mergeMulticloudDataTransferConfig(other.getMulticloudDataTransferConfig()); + } + 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: + { + multicloudDataTransferConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetMulticloudDataTransferConfigFieldBuilder().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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 multicloudDataTransferConfigId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+     * which becomes the final component of the `MulticloudDataTransferConfig`
+     * resource name.
+     * 
+ * + * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfigId. + */ + public java.lang.String getMulticloudDataTransferConfigId() { + java.lang.Object ref = multicloudDataTransferConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + multicloudDataTransferConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+     * which becomes the final component of the `MulticloudDataTransferConfig`
+     * resource name.
+     * 
+ * + * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for multicloudDataTransferConfigId. + */ + public com.google.protobuf.ByteString getMulticloudDataTransferConfigIdBytes() { + java.lang.Object ref = multicloudDataTransferConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + multicloudDataTransferConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+     * which becomes the final component of the `MulticloudDataTransferConfig`
+     * resource name.
+     * 
+ * + * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The multicloudDataTransferConfigId to set. + * @return This builder for chaining. + */ + public Builder setMulticloudDataTransferConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + multicloudDataTransferConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+     * which becomes the final component of the `MulticloudDataTransferConfig`
+     * resource name.
+     * 
+ * + * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMulticloudDataTransferConfigId() { + multicloudDataTransferConfigId_ = getDefaultInstance().getMulticloudDataTransferConfigId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+     * which becomes the final component of the `MulticloudDataTransferConfig`
+     * resource name.
+     * 
+ * + * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for multicloudDataTransferConfigId to set. + * @return This builder for chaining. + */ + public Builder setMulticloudDataTransferConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + multicloudDataTransferConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + multicloudDataTransferConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + multicloudDataTransferConfigBuilder_; + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + public boolean hasMulticloudDataTransferConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig() { + if (multicloudDataTransferConfigBuilder_ == null) { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } else { + return multicloudDataTransferConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + multicloudDataTransferConfig_ = value; + } else { + multicloudDataTransferConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + builderForValue) { + if (multicloudDataTransferConfigBuilder_ == null) { + multicloudDataTransferConfig_ = builderForValue.build(); + } else { + multicloudDataTransferConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && multicloudDataTransferConfig_ != null + && multicloudDataTransferConfig_ + != com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance()) { + getMulticloudDataTransferConfigBuilder().mergeFrom(value); + } else { + multicloudDataTransferConfig_ = value; + } + } else { + multicloudDataTransferConfigBuilder_.mergeFrom(value); + } + if (multicloudDataTransferConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMulticloudDataTransferConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + multicloudDataTransferConfig_ = null; + if (multicloudDataTransferConfigBuilder_ != null) { + multicloudDataTransferConfigBuilder_.dispose(); + multicloudDataTransferConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + getMulticloudDataTransferConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetMulticloudDataTransferConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder() { + if (multicloudDataTransferConfigBuilder_ != null) { + return multicloudDataTransferConfigBuilder_.getMessageOrBuilder(); + } else { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to create.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + internalGetMulticloudDataTransferConfigFieldBuilder() { + if (multicloudDataTransferConfigBuilder_ == null) { + multicloudDataTransferConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder>( + getMulticloudDataTransferConfig(), getParentForChildren(), isClean()); + multicloudDataTransferConfig_ = null; + } + return multicloudDataTransferConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .CreateMulticloudDataTransferConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateMulticloudDataTransferConfigRequest 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.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequestOrBuilder.java new file mode 100644 index 000000000000..7ed847fbb7cc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateMulticloudDataTransferConfigRequestOrBuilder.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateMulticloudDataTransferConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+   * which becomes the final component of the `MulticloudDataTransferConfig`
+   * resource name.
+   * 
+ * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfigId. + */ + java.lang.String getMulticloudDataTransferConfigId(); + + /** + * + * + *
+   * Required. The ID to use for the `MulticloudDataTransferConfig` resource,
+   * which becomes the final component of the `MulticloudDataTransferConfig`
+   * resource name.
+   * 
+ * + * string multicloud_data_transfer_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for multicloudDataTransferConfigId. + */ + com.google.protobuf.ByteString getMulticloudDataTransferConfigIdBytes(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + boolean hasMulticloudDataTransferConfig(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to create.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequest.java new file mode 100644 index 000000000000..4c692aea9a8e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequest.java @@ -0,0 +1,1469 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [PolicyBasedRoutingService.CreatePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.CreatePolicyBasedRoute]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest} + */ +@com.google.protobuf.Generated +public final class CreatePolicyBasedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) + CreatePolicyBasedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreatePolicyBasedRouteRequest"); + } + + // Use CreatePolicyBasedRouteRequest.newBuilder() to construct. + private CreatePolicyBasedRouteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreatePolicyBasedRouteRequest() { + parent_ = ""; + policyBasedRouteId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.Builder + .class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name of the PolicyBasedRoute.
+   * 
+ * + * + * 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 resource's name of the PolicyBasedRoute.
+   * 
+ * + * + * 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 POLICY_BASED_ROUTE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object policyBasedRouteId_ = ""; + + /** + * + * + *
+   * Required. Unique id for the policy-based route to create. Provided by the
+   * client when the resource is created. The name must comply with
+   * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+   * must be 1-63 characters long and match the regular expression
+   * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+   * and all following characters (except for the last character) must be a
+   * dash, lowercase letter, or digit. The last character must be a lowercase
+   * letter or digit.
+   * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBasedRouteId. + */ + @java.lang.Override + public java.lang.String getPolicyBasedRouteId() { + java.lang.Object ref = policyBasedRouteId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBasedRouteId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Unique id for the policy-based route to create. Provided by the
+   * client when the resource is created. The name must comply with
+   * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+   * must be 1-63 characters long and match the regular expression
+   * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+   * and all following characters (except for the last character) must be a
+   * dash, lowercase letter, or digit. The last character must be a lowercase
+   * letter or digit.
+   * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBasedRouteId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBasedRouteIdBytes() { + java.lang.Object ref = policyBasedRouteId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBasedRouteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POLICY_BASED_ROUTE_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policyBasedRoute_; + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBasedRoute field is set. + */ + @java.lang.Override + public boolean hasPolicyBasedRoute() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBasedRoute. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoute() { + return policyBasedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance() + : policyBasedRoute_; + } + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRouteOrBuilder() { + return policyBasedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance() + : policyBasedRoute_; + } + + 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBasedRouteId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, policyBasedRouteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPolicyBasedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policyBasedRouteId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, policyBasedRouteId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPolicyBasedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getPolicyBasedRouteId().equals(other.getPolicyBasedRouteId())) return false; + if (hasPolicyBasedRoute() != other.hasPolicyBasedRoute()) return false; + if (hasPolicyBasedRoute()) { + if (!getPolicyBasedRoute().equals(other.getPolicyBasedRoute())) 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) + POLICY_BASED_ROUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBasedRouteId().hashCode(); + if (hasPolicyBasedRoute()) { + hash = (37 * hash) + POLICY_BASED_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBasedRoute().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.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest 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.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest 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.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [PolicyBasedRoutingService.CreatePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.CreatePolicyBasedRoute]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPolicyBasedRouteFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + policyBasedRouteId_ = ""; + policyBasedRoute_ = null; + if (policyBasedRouteBuilder_ != null) { + policyBasedRouteBuilder_.dispose(); + policyBasedRouteBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyBasedRouteId_ = policyBasedRouteId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.policyBasedRoute_ = + policyBasedRouteBuilder_ == null ? policyBasedRoute_ : policyBasedRouteBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPolicyBasedRouteId().isEmpty()) { + policyBasedRouteId_ = other.policyBasedRouteId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPolicyBasedRoute()) { + mergePolicyBasedRoute(other.getPolicyBasedRoute()); + } + 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: + { + policyBasedRouteId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPolicyBasedRouteFieldBuilder().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 resource's name of the PolicyBasedRoute.
+     * 
+ * + * + * 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 resource's name of the PolicyBasedRoute.
+     * 
+ * + * + * 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 resource's name of the PolicyBasedRoute.
+     * 
+ * + * + * 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 resource's name of the PolicyBasedRoute.
+     * 
+ * + * + * 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 resource's name of the PolicyBasedRoute.
+     * 
+ * + * + * 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 policyBasedRouteId_ = ""; + + /** + * + * + *
+     * Required. Unique id for the policy-based route to create. Provided by the
+     * client when the resource is created. The name must comply with
+     * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+     * must be 1-63 characters long and match the regular expression
+     * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+     * and all following characters (except for the last character) must be a
+     * dash, lowercase letter, or digit. The last character must be a lowercase
+     * letter or digit.
+     * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBasedRouteId. + */ + public java.lang.String getPolicyBasedRouteId() { + java.lang.Object ref = policyBasedRouteId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policyBasedRouteId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the policy-based route to create. Provided by the
+     * client when the resource is created. The name must comply with
+     * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+     * must be 1-63 characters long and match the regular expression
+     * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+     * and all following characters (except for the last character) must be a
+     * dash, lowercase letter, or digit. The last character must be a lowercase
+     * letter or digit.
+     * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBasedRouteId. + */ + public com.google.protobuf.ByteString getPolicyBasedRouteIdBytes() { + java.lang.Object ref = policyBasedRouteId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policyBasedRouteId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the policy-based route to create. Provided by the
+     * client when the resource is created. The name must comply with
+     * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+     * must be 1-63 characters long and match the regular expression
+     * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+     * and all following characters (except for the last character) must be a
+     * dash, lowercase letter, or digit. The last character must be a lowercase
+     * letter or digit.
+     * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The policyBasedRouteId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBasedRouteId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policyBasedRouteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the policy-based route to create. Provided by the
+     * client when the resource is created. The name must comply with
+     * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+     * must be 1-63 characters long and match the regular expression
+     * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+     * and all following characters (except for the last character) must be a
+     * dash, lowercase letter, or digit. The last character must be a lowercase
+     * letter or digit.
+     * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPolicyBasedRouteId() { + policyBasedRouteId_ = getDefaultInstance().getPolicyBasedRouteId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the policy-based route to create. Provided by the
+     * client when the resource is created. The name must comply with
+     * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+     * must be 1-63 characters long and match the regular expression
+     * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+     * and all following characters (except for the last character) must be a
+     * dash, lowercase letter, or digit. The last character must be a lowercase
+     * letter or digit.
+     * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for policyBasedRouteId to set. + * @return This builder for chaining. + */ + public Builder setPolicyBasedRouteIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policyBasedRouteId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policyBasedRoute_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + policyBasedRouteBuilder_; + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBasedRoute field is set. + */ + public boolean hasPolicyBasedRoute() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBasedRoute. + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoute() { + if (policyBasedRouteBuilder_ == null) { + return policyBasedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance() + : policyBasedRoute_; + } else { + return policyBasedRouteBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute value) { + if (policyBasedRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policyBasedRoute_ = value; + } else { + policyBasedRouteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder builderForValue) { + if (policyBasedRouteBuilder_ == null) { + policyBasedRoute_ = builderForValue.build(); + } else { + policyBasedRouteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicyBasedRoute( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute value) { + if (policyBasedRouteBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && policyBasedRoute_ != null + && policyBasedRoute_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .getDefaultInstance()) { + getPolicyBasedRouteBuilder().mergeFrom(value); + } else { + policyBasedRoute_ = value; + } + } else { + policyBasedRouteBuilder_.mergeFrom(value); + } + if (policyBasedRoute_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicyBasedRoute() { + bitField0_ = (bitField0_ & ~0x00000004); + policyBasedRoute_ = null; + if (policyBasedRouteBuilder_ != null) { + policyBasedRouteBuilder_.dispose(); + policyBasedRouteBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder + getPolicyBasedRouteBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPolicyBasedRouteFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRouteOrBuilder() { + if (policyBasedRouteBuilder_ != null) { + return policyBasedRouteBuilder_.getMessageOrBuilder(); + } else { + return policyBasedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance() + : policyBasedRoute_; + } + } + + /** + * + * + *
+     * Required. Initial values for a new policy-based route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + internalGetPolicyBasedRouteFieldBuilder() { + if (policyBasedRouteBuilder_ == null) { + policyBasedRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder>( + getPolicyBasedRoute(), getParentForChildren(), isClean()); + policyBasedRoute_ = null; + } + return policyBasedRouteBuilder_; + } + + 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePolicyBasedRouteRequest 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.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..3e652f9eea26 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreatePolicyBasedRouteRequestOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreatePolicyBasedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name of the PolicyBasedRoute.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name of the PolicyBasedRoute.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique id for the policy-based route to create. Provided by the
+   * client when the resource is created. The name must comply with
+   * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+   * must be 1-63 characters long and match the regular expression
+   * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+   * and all following characters (except for the last character) must be a
+   * dash, lowercase letter, or digit. The last character must be a lowercase
+   * letter or digit.
+   * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The policyBasedRouteId. + */ + java.lang.String getPolicyBasedRouteId(); + + /** + * + * + *
+   * Required. Unique id for the policy-based route to create. Provided by the
+   * client when the resource is created. The name must comply with
+   * https://google.aip.dev/122#resource-id-segments. Specifically, the name
+   * must be 1-63 characters long and match the regular expression
+   * [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter,
+   * and all following characters (except for the last character) must be a
+   * dash, lowercase letter, or digit. The last character must be a lowercase
+   * letter or digit.
+   * 
+ * + * string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for policyBasedRouteId. + */ + com.google.protobuf.ByteString getPolicyBasedRouteIdBytes(); + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policyBasedRoute field is set. + */ + boolean hasPolicyBasedRoute(); + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policyBasedRoute. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoute(); + + /** + * + * + *
+   * Required. Initial values for a new policy-based route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRouteOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequest.java new file mode 100644 index 000000000000..759a825fe400 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequest.java @@ -0,0 +1,1404 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.CreateSpoke][google.cloud.networkconnectivity.v1beta.HubService.CreateSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateSpokeRequest} + */ +@com.google.protobuf.Generated +public final class CreateSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) + CreateSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateSpokeRequest"); + } + + // Use CreateSpokeRequest.newBuilder() to construct. + private CreateSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateSpokeRequest() { + parent_ = ""; + spokeId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * 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 resource.
+   * 
+ * + * + * 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 SPOKE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeId_ = ""; + + /** + * + * + *
+   * Required. Unique id for the spoke to create.
+   * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeId. + */ + @java.lang.Override + public java.lang.String getSpokeId() { + java.lang.Object ref = spokeId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Unique id for the spoke to create.
+   * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeIdBytes() { + java.lang.Object ref = spokeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSpoke()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, spokeId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSpoke()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSpokeId().equals(other.getSpokeId())) return false; + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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) + SPOKE_ID_FIELD_NUMBER; + hash = (53 * hash) + getSpokeId().hashCode(); + if (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().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.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest 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.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest 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.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.CreateSpoke][google.cloud.networkconnectivity.v1beta.HubService.CreateSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + spokeId_ = ""; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeId_ = spokeId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeId().isEmpty()) { + spokeId_ = other.spokeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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: + { + spokeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetSpokeFieldBuilder().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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 spokeId_ = ""; + + /** + * + * + *
+     * Required. Unique id for the spoke to create.
+     * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeId. + */ + public java.lang.String getSpokeId() { + java.lang.Object ref = spokeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the spoke to create.
+     * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeId. + */ + public com.google.protobuf.ByteString getSpokeIdBytes() { + java.lang.Object ref = spokeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Unique id for the spoke to create.
+     * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The spokeId to set. + * @return This builder for chaining. + */ + public Builder setSpokeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the spoke to create.
+     * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSpokeId() { + spokeId_ = getDefaultInstance().getSpokeId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Unique id for the spoke to create.
+     * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for spokeId to set. + * @return This builder for chaining. + */ + public Builder setSpokeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000004); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * Required. The initial values for a new spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSpokeRequest 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.networkconnectivity.v1beta.CreateSpokeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..b6227e985e63 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateSpokeRequestOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Unique id for the spoke to create.
+   * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeId. + */ + java.lang.String getSpokeId(); + + /** + * + * + *
+   * Required. Unique id for the spoke to create.
+   * 
+ * + * string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeId. + */ + com.google.protobuf.ByteString getSpokeIdBytes(); + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * Required. The initial values for a new spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequest.java new file mode 100644 index 000000000000..67aad78bbf38 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequest.java @@ -0,0 +1,1416 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for creating a Transport
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateTransportRequest} + */ +@com.google.protobuf.Generated +public final class CreateTransportRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.CreateTransportRequest) + CreateTransportRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateTransportRequest"); + } + + // Use CreateTransportRequest.newBuilder() to construct. + private CreateTransportRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateTransportRequest() { + parent_ = ""; + transportId_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSPORT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object transportId_ = ""; + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The transportId. + */ + @java.lang.Override + public java.lang.String getTransportId() { + java.lang.Object ref = transportId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transportId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for transportId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransportIdBytes() { + java.lang.Object ref = transportId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSPORT_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.Transport transport_; + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + @java.lang.Override + public boolean hasTransport() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport() { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder() { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transportId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, transportId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTransport()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transportId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, transportId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTransport()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.CreateTransportRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest other = + (com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getTransportId().equals(other.getTransportId())) return false; + if (hasTransport() != other.hasTransport()) return false; + if (hasTransport()) { + if (!getTransport().equals(other.getTransport())) 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) + TRANSPORT_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransportId().hashCode(); + if (hasTransport()) { + hash = (37 * hash) + TRANSPORT_FIELD_NUMBER; + hash = (53 * hash) + getTransport().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.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest 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.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest 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.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a Transport
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.CreateTransportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.CreateTransportRequest) + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTransportFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + transportId_ = ""; + transport_ = null; + if (transportBuilder_ != null) { + transportBuilder_.dispose(); + transportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest build() { + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest result = + new com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.transportId_ = transportId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.transport_ = transportBuilder_ == null ? transport_ : transportBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTransportId().isEmpty()) { + transportId_ = other.transportId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTransport()) { + mergeTransport(other.getTransport()); + } + 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: + { + transportId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetTransportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object transportId_ = ""; + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The transportId. + */ + public java.lang.String getTransportId() { + java.lang.Object ref = transportId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transportId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for transportId. + */ + public com.google.protobuf.ByteString getTransportIdBytes() { + java.lang.Object ref = transportId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transportId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The transportId to set. + * @return This builder for chaining. + */ + public Builder setTransportId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTransportId() { + transportId_ = getDefaultInstance().getTransportId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Id of the requesting object
+     * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for transportId to set. + * @return This builder for chaining. + */ + public Builder setTransportIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transportId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.Transport transport_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + transportBuilder_; + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + public boolean hasTransport() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport() { + if (transportBuilder_ == null) { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } else { + return transportBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransport(com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transport_ = value; + } else { + transportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransport( + com.google.cloud.networkconnectivity.v1beta.Transport.Builder builderForValue) { + if (transportBuilder_ == null) { + transport_ = builderForValue.build(); + } else { + transportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTransport(com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && transport_ != null + && transport_ + != com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance()) { + getTransportBuilder().mergeFrom(value); + } else { + transport_ = value; + } + } else { + transportBuilder_.mergeFrom(value); + } + if (transport_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTransport() { + bitField0_ = (bitField0_ & ~0x00000004); + transport_ = null; + if (transportBuilder_ != null) { + transportBuilder_.dispose(); + transportBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Transport.Builder getTransportBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetTransportFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder() { + if (transportBuilder_ != null) { + return transportBuilder_.getMessageOrBuilder(); + } else { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + } + + /** + * + * + *
+     * Required. The resource being created
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + internalGetTransportFieldBuilder() { + if (transportBuilder_ == null) { + transportBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder>( + getTransport(), getParentForChildren(), isClean()); + transport_ = null; + } + return transportBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.CreateTransportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.CreateTransportRequest) + private static final com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTransportRequest 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.networkconnectivity.v1beta.CreateTransportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequestOrBuilder.java new file mode 100644 index 000000000000..8a98fbcd8782 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/CreateTransportRequestOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface CreateTransportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.CreateTransportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The transportId. + */ + java.lang.String getTransportId(); + + /** + * + * + *
+   * Required. Id of the requesting object
+   * 
+ * + * string transport_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for transportId. + */ + com.google.protobuf.ByteString getTransportIdBytes(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + boolean hasTransport(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + com.google.cloud.networkconnectivity.v1beta.Transport getTransport(); + + /** + * + * + *
+   * Required. The resource being created
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferProto.java new file mode 100644 index 000000000000..e89aed223aa8 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DataTransferProto.java @@ -0,0 +1,675 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public final class DataTransferProto extends com.google.protobuf.GeneratedFile { + private DataTransferProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataTransferProto"); + } + + 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_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Destination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_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/networkconnectivity/v1beta/data_transfer.proto\022\'google.cloud.netw" + + "orkconnectivity.v1beta\032\034google/api/annot" + + "ations.proto\032\027google/api/client.proto\032\037g" + + "oogle/api/field_behavior.proto\032\033google/a" + + "pi/field_info.proto\032\031google/api/resource" + + ".proto\0324google/cloud/networkconnectivity/v1beta/common.proto\032#google/longrunning" + + "/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\202\007\n" + + "\034MulticloudDataTransferConfig\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022f\n" + + "\006labels\030\004 \003(\0132Q.google.cloud.networkconnecti" + + "vity.v1beta.MulticloudDataTransferConfig.LabelsEntryB\003\340A\001\022\014\n" + + "\004etag\030\005 \001(\t\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\001\022\037\n" + + "\022destinations_count\030\007 \001(\005B\003\340A\003\022&\n" + + "\031destinations_active_count\030\010 \001(\005B\003\340A\003\022j\n" + + "\010services\030\t \003(\0132S.google.cloud.networkconnectivity.v1beta.Multiclou" + + "dDataTransferConfig.ServicesEntryB\003\340A\001\022\030\n" + + "\003uid\030\n" + + " \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032g\n\r" + + "ServicesEntry\022\013\n" + + "\003key\030\001 \001(\t\022E\n" + + "\005value\030\002 \001(\01326.g" + + "oogle.cloud.networkconnectivity.v1beta.StateTimeline:\0028\001:\353\001\352A\347\001\n" + + "?networkconnectivity.googleapis.com/MulticloudDataTransf" + + "erConfig\022gprojects/{project}/locations/{location}/multicloudDataTransferConfigs/" + + "{multicloud_data_transfer_config}*\035multi" + + "cloudDataTransferConfigs2\034multicloudDataTransferConfig\"\347\001\n" + + "(ListMulticloudDataTransferConfigsRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022#\n" + + "\026return_partial_success\030\006 \001(\010B\003\340A\001\"\312\001\n" + + ")ListMulticloudDataTransferConfigsResponse\022o\n" + + " multicloud_data_transfer_configs\030\001 \003(\0132E.google.cloud.networkc" + + "onnectivity.v1beta.MulticloudDataTransferConfig\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\177\n" + + "&GetMulticloudDataTransferConfigRequest\022U\n" + + "\004name\030\001 \001(\tBG\340A\002\372AA\n" + + "?networkconnectivity.googleapis.com/MulticloudDataTransferConfig\"\255\002\n" + + ")CreateMulticloudDataTransferConfigRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022/\n" + + "\"multicloud_data_transfer_config_id\030\002 \001(\tB\003\340A\002\022s\n" + + "\037multicloud_data_transfer_config\030\003 \001(\0132E.google.cloud.network" + + "connectivity.v1beta.MulticloudDataTransferConfigB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\367\001\n" + + ")UpdateMulticloudDataTransferConfigRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022s\n" + + "\037multicloud_data_transfer_config\030\002 \001(\0132E.google.clo" + + "ud.networkconnectivity.v1beta.MulticloudDataTransferConfigB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\266\001\n" + + ")DeleteMulticloudDataTransferConfigRequest\022U\n" + + "\004name\030\001 \001(\tBG\340A\002\372AA\n" + + "?networkconnectivity.googleapis.com/MulticloudDataTransferConfig\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\"\216\010\n" + + "\013Destination\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022U\n" + + "\006labels\030\004 \003(\013" + + "2@.google.cloud.networkconnectivity.v1beta.Destination.LabelsEntryB\003\340A\001\022\014\n" + + "\004etag\030\005 \001(\t\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\001\022\031\n" + + "\tip_prefix\030\007 \001(\tB\006\340A\002\340A\005\022c\n" + + "\tendpoints\030\010 \003(\0132H.google.cloud.networkconnectivity.v1beta." + + "Destination.DestinationEndpointB\006\340A\006\340A\002\022S\n" + + "\016state_timeline\030\t \001(\01326.google.cloud.n" + + "etworkconnectivity.v1beta.StateTimelineB\003\340A\003\022\030\n" + + "\003uid\030\n" + + " \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\032\213\002\n" + + "\023DestinationEndpoint\022\020\n" + + "\003asn\030\001 \001(\003B\003\340A\002\022\020\n" + + "\003csp\030\002 \001(\tB\003\340A\002\022b\n" + + "\005state\030\003 \001(\0162N.google.cloud" + + ".networkconnectivity.v1beta.Destination.DestinationEndpoint.StateB\003\340A\003\0224\n" + + "\013update_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"6\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\t\n" + + "\005VALID\020\001\022\013\n" + + "\007INVALID\020\002\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\324\001\352A\320\001\n" + + ".networkconnectivity.googleapis.com/Destinati" + + "on\022\202\001projects/{project}/locations/{locat" + + "ion}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destination" + + "s/{destination}*\014destinations2\013destination\"\364\001\n" + + "\027ListDestinationsRequest\022W\n" + + "\006parent\030\001 \001(\tBG\340A\002\372AA\n" + + "?networkconnectivity.googleapis.com/MulticloudDataTransferConfig\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022#\n" + + "\026return_partial_success\030\006 \001(\010B\003\340A\001\"\224\001\n" + + "\030ListDestinationsResponse\022J\n" + + "\014destinations\030\001" + + " \003(\01324.google.cloud.networkconnectivity.v1beta.Destination\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"]\n" + + "\025GetDestinationRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".networkconnectivity.googleapis.com/Destination\"\201\002\n" + + "\030CreateDestinationRequest\022W\n" + + "\006parent\030\001 \001(\tBG\340A\002\372AA\n" + + "?networkconnectivity.googleapis.com/MulticloudDataTransferConfig\022\033\n" + + "\016destination_id\030\002 \001(\tB\003\340A\002\022N\n" + + "\013destination\030\003 \001(\01324.google.cloud.n" + + "etworkconnectivity.v1beta.DestinationB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\301\001\n" + + "\030UpdateDestinationRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022N\n" + + "\013destination\030\002 \001(\01324.google.cloud.netwo" + + "rkconnectivity.v1beta.DestinationB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\224\001\n" + + "\030DeleteDestinationRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".networkconnectivity.googleapis.com/Destination\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\021\n" + + "\004etag\030\003 \001(\tB\003\340A\001\"\372\002\n\r" + + "StateTimeline\022Y\n" + + "\006states\030\001 \003(\0132D.google.cloud.networkc" + + "onnectivity.v1beta.StateTimeline.StateMetadataB\003\340A\003\032\215\002\n\r" + + "StateMetadata\022^\n" + + "\005state\030\001 \001(\0162J.google.cloud.networkconnectivity." + + "v1beta.StateTimeline.StateMetadata.StateB\003\340A\003\0227\n" + + "\016effective_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"c\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ADDING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\016\n\n" + + "SUSPENDING\020\004\022\r\n" + + "\tSUSPENDED\020\005\"\262\003\n" + + "&MulticloudDataTransferSupportedService\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022T\n" + + "\017service_configs\030\002" + + " \003(\01326.google.cloud.networkconnectivity.v1beta.ServiceConfigB\003\340A\003:\236\002\352A\232\002\n" + + "Inetworkconnectivity.googleapis.com/MulticloudDataTransferSupportedService\022|proje" + + "cts/{project}/locations/{location}/multicloudDataTransferSupportedServices/{mult" + + "icloud_data_transfer_supported_service}*\'multicloudDataTransferSupportedServices" + + "2&multicloudDataTransferSupportedService\"\363\002\n\r" + + "ServiceConfig\022m\n" + + "\024eligibility_criteria\030\001 \001(\0162J.google.cloud.networkconnectiv" + + "ity.v1beta.ServiceConfig.EligibilityCriteriaB\003\340A\003\0229\n" + + "\020support_end_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"\267\001\n" + + "\023EligibilityCriteria\022$\n" + + " ELIGIBILITY_CRITERIA_UNSPECIFIED\020\000\022%\n" + + "!NETWORK_SERVICE_TIER_PREMIUM_ONLY\020\001\022&\n" + + "\"NETWORK_SERVICE_TIER_STANDARD_ONLY\020\002\022+\n" + + "\'REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY\020\003\"\223\001\n" + + "0GetMulticloudDataTransferSupportedServiceRequest\022_\n" + + "\004name\030\001 \001(\tBQ\340A\002\372AK\n" + + "Inetworkconnectivity.googleapis.com/MulticloudDataTransferSupportedService\"\240\001\n" + + "2ListMulticloudDataTransferSupportedServicesRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\325\001\n" + + "3ListMulticloudDataTransferSupportedServicesResponse\022\204\001\n" + + "+multicloud_data_transfer_supported_services\030\001 \003(\0132O." + + "google.cloud.networkconnectivity.v1beta." + + "MulticloudDataTransferSupportedService\022\027\n" + + "\017next_page_token\030\002 \001(\t2\264\035\n" + + "\023DataTransferService\022\242\002\n" + + "!ListMulticloudDataTransferConfigs\022Q.google.cloud.networkconnectivity" + + ".v1beta.ListMulticloudDataTransferConfigsRequest\032R.google.cloud.networkconnectiv" + + "ity.v1beta.ListMulticloudDataTransferCon" + + "figsResponse\"V\332A\006parent\202\323\344\223\002G\022E/v1beta/{" + + "parent=projects/*/locations/*}/multicloudDataTransferConfigs\022\217\002\n" + + "\037GetMulticloudDataTransferConfig\022O.google.cloud.networkc" + + "onnectivity.v1beta.GetMulticloudDataTransferConfigRequest\032E.google.cloud.network" + + "connectivity.v1beta.MulticloudDataTransf" + + "erConfig\"T\332A\004name\202\323\344\223\002G\022E/v1beta/{name=p" + + "rojects/*/locations/*/multicloudDataTransferConfigs/*}\022\210\003\n" + + "\"CreateMulticloudDataTransferConfig\022R.google.cloud.networkconn" + + "ectivity.v1beta.CreateMulticloudDataTran" + + "sferConfigRequest\032\035.google.longrunning.Operation\"\356\001\312A1\n" + + "\034MulticloudDataTransferConfig\022\021OperationMetadata\332AIparent,multicl" + + "oud_data_transfer_config,multicloud_data" + + "_transfer_config_id\202\323\344\223\002h\"E/v1beta/{pare" + + "nt=projects/*/locations/*}/multicloudDat" + + "aTransferConfigs:\037multicloud_data_transfer_config\022\213\003\n" + + "\"UpdateMulticloudDataTransferConfig\022R.google.cloud.networkconnectiv" + + "ity.v1beta.UpdateMulticloudDataTransferC" + + "onfigRequest\032\035.google.longrunning.Operation\"\361\001\312A1\n" + + "\034MulticloudDataTransferConfig\022\021OperationMetadata\332A+multicloud_data_tra" + + "nsfer_config,update_mask\202\323\344\223\002\210\0012e/v1beta" + + "/{multicloud_data_transfer_config.name=projects/*/locations/*/multicloudDataTran" + + "sferConfigs/*}:\037multicloud_data_transfer_config\022\233\002\n" + + "\"DeleteMulticloudDataTransferConfig\022R.google.cloud.networkconnectivit" + + "y.v1beta.DeleteMulticloudDataTransferCon" + + "figRequest\032\035.google.longrunning.Operation\"\201\001\312A*\n" + + "\025google.protobuf.Empty\022\021Operatio" + + "nMetadata\332A\004name\202\323\344\223\002G*E/v1beta/{name=pr" + + "ojects/*/locations/*/multicloudDataTransferConfigs/*}\022\376\001\n" + + "\020ListDestinations\022@.google.cloud.networkconnectivity.v1beta.Lis" + + "tDestinationsRequest\032A.google.cloud.networkconnectivity.v1beta.ListDestinationsR" + + "esponse\"e\332A\006parent\202\323\344\223\002V\022T/v1beta/{paren" + + "t=projects/*/locations/*/multicloudDataTransferConfigs/*}/destinations\022\353\001\n" + + "\016GetDestination\022>.google.cloud.networkconnecti" + + "vity.v1beta.GetDestinationRequest\0324.google.cloud.networkconnectivity.v1beta.Dest" + + "ination\"c\332A\004name\202\323\344\223\002V\022T/v1beta/{name=pr" + + "ojects/*/locations/*/multicloudDataTransferConfigs/*/destinations/*}\022\250\002\n" + + "\021CreateDestination\022A.google.cloud.networkconnect" + + "ivity.v1beta.CreateDestinationRequest\032\035.google.longrunning.Operation\"\260\001\312A" + + " \n" + + "\013Destination\022\021OperationMetadata\332A!parent,dest" + + "ination,destination_id\202\323\344\223\002c\"T/v1beta/{p" + + "arent=projects/*/locations/*/multicloudD" + + "ataTransferConfigs/*}/destinations:\013destination\022\252\002\n" + + "\021UpdateDestination\022A.google.cloud.networkconnectivity.v1beta.UpdateDe" + + "stinationRequest\032\035.google.longrunning.Operation\"\262\001\312A \n" + + "\013Destination\022\021OperationMet" + + "adata\332A\027destination,update_mask\202\323\344\223\002o2`/" + + "v1beta/{destination.name=projects/*/loca" + + "tions/*/multicloudDataTransferConfigs/*/destinations/*}:\013destination\022\210\002\n" + + "\021DeleteDestination\022A.google.cloud.networkconnect" + + "ivity.v1beta.DeleteDestinationRequest\032\035.google.longrunning.Operation\"\220\001\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004n" + + "ame\202\323\344\223\002V*T/v1beta/{name=projects/*/loca" + + "tions/*/multicloudDataTransferConfigs/*/destinations/*}\022\267\002\n" + + ")GetMulticloudDataTransferSupportedService\022Y.google.cloud.net" + + "workconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest\032O.googl" + + "e.cloud.networkconnectivity.v1beta.Multi" + + "cloudDataTransferSupportedService\"^\332A\004na" + + "me\202\323\344\223\002Q\022O/v1beta/{name=projects/*/locat" + + "ions/*/multicloudDataTransferSupportedServices/*}\022\312\002\n" + + "+ListMulticloudDataTransferSupportedServices\022[.google.cloud.network" + + "connectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest\032\\.google." + + "cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResp" + + "onse\"`\332A\006parent\202\323\344\223\002Q\022O/v1beta/{parent=p" + + "rojects/*/locations/*}/multicloudDataTra" + + "nsferSupportedServices\032V\312A\"networkconnec" + + "tivity.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\242\002\n" + + "+com.google.cloud.networkconnectivity.v1betaB\021" + + "DataTransferProtoP\001Z]cloud.google.com/go/networkconnectivity/apiv1beta/networkco" + + "nnectivitypb;networkconnectivitypb\252\002\'Goo" + + "gle.Cloud.NetworkConnectivity.V1Beta\312\002\'G" + + "oogle\\Cloud\\NetworkConnectivity\\V1beta\352\002" + + "*Google::Cloud::NetworkConnectivity::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.networkconnectivity.v1beta.CommonProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Etag", + "Description", + "DestinationsCount", + "DestinationsActiveCount", + "Services", + "Uid", + }); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "ReturnPartialSuccess", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor, + new java.lang.String[] { + "MulticloudDataTransferConfigs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_CreateMulticloudDataTransferConfigRequest_descriptor, + new java.lang.String[] { + "Parent", + "MulticloudDataTransferConfigId", + "MulticloudDataTransferConfig", + "RequestId", + }); + internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "MulticloudDataTransferConfig", "RequestId", + }); + internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Etag", + }); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Etag", + "Description", + "IpPrefix", + "Endpoints", + "StateTimeline", + "Uid", + }); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor + .getNestedType(0); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor, + new java.lang.String[] { + "Asn", "Csp", "State", "UpdateTime", + }); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor + .getNestedType(1); + internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", "ReturnPartialSuccess", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor, + new java.lang.String[] { + "Destinations", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_CreateDestinationRequest_descriptor, + new java.lang.String[] { + "Parent", "DestinationId", "Destination", "RequestId", + }); + internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor = + getDescriptor().getMessageType(12); + internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Destination", "RequestId", + }); + internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor = + getDescriptor().getMessageType(13); + internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "Etag", + }); + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor = + getDescriptor().getMessageType(14); + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor, + new java.lang.String[] { + "States", + }); + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor + .getNestedType(0); + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor, + new java.lang.String[] { + "State", "EffectiveTime", + }); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor = + getDescriptor().getMessageType(15); + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor, + new java.lang.String[] { + "Name", "ServiceConfigs", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor = + getDescriptor().getMessageType(16); + internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor, + new java.lang.String[] { + "EligibilityCriteria", "SupportEndTime", + }); + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor = + getDescriptor().getMessageType(17); + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor = + getDescriptor().getMessageType(18); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor = + getDescriptor().getMessageType(19); + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor, + new java.lang.String[] { + "MulticloudDataTransferSupportedServices", "NextPageToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.networkconnectivity.v1beta.CommonProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequest.java new file mode 100644 index 000000000000..94cb24789b10 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequest.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to delete a `Destination` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest} + */ +@com.google.protobuf.Generated +public final class DeleteDestinationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) + DeleteDestinationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteDestinationRequest"); + } + + // Use DeleteDestinationRequest.newBuilder() to construct. + private DeleteDestinationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteDestinationRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `Destination` resource to delete.
+   * 
+ * + * + * 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 `Destination` resource to delete.
+   * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + 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.networkconnectivity.v1beta.DeleteDestinationRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest 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.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest 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.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to delete a `Destination` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteDestinationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest 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.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + .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.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the `Destination` resource to delete.
+     * 
+ * + * + * 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 `Destination` resource to delete.
+     * 
+ * + * + * 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 `Destination` resource to delete.
+     * 
+ * + * + * 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 `Destination` resource to delete.
+     * 
+ * + * + * 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 `Destination` resource to delete.
+     * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) + private static final com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDestinationRequest 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.networkconnectivity.v1beta.DeleteDestinationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequestOrBuilder.java new file mode 100644 index 000000000000..44a3c48507d3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteDestinationRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteDestinationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `Destination` resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `Destination` resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequest.java new file mode 100644 index 000000000000..7653f57e62c9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequest.java @@ -0,0 +1,938 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.DeleteGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.DeleteGatewayAdvertisedRoute]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest} + */ +@com.google.protobuf.Generated +public final class DeleteGatewayAdvertisedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + DeleteGatewayAdvertisedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteGatewayAdvertisedRouteRequest"); + } + + // Use DeleteGatewayAdvertisedRouteRequest.newBuilder() to construct. + private DeleteGatewayAdvertisedRouteRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteGatewayAdvertisedRouteRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the gateway advertised route to delete.
+   * 
+ * + * + * 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 gateway advertised route to delete.
+   * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.DeleteGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.DeleteGatewayAdvertisedRoute]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the gateway advertised route to delete.
+     * 
+ * + * + * 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 gateway advertised route to delete.
+     * 
+ * + * + * 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 gateway advertised route to delete.
+     * 
+ * + * + * 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 gateway advertised route to delete.
+     * 
+ * + * + * 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 gateway advertised route to delete.
+     * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .DeleteGatewayAdvertisedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteGatewayAdvertisedRouteRequest 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.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..8546d245f39e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteGatewayAdvertisedRouteRequestOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteGatewayAdvertisedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the gateway advertised route to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the gateway advertised route to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequest.java new file mode 100644 index 000000000000..48f24fcdd465 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequest.java @@ -0,0 +1,897 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.DeleteHub][google.cloud.networkconnectivity.v1beta.HubService.DeleteHub].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteHubRequest} + */ +@com.google.protobuf.Generated +public final class DeleteHubRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteHubRequest) + DeleteHubRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteHubRequest"); + } + + // Use DeleteHubRequest.newBuilder() to construct. + private DeleteHubRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteHubRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub to delete.
+   * 
+ * + * + * 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 hub to delete.
+   * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest 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.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest 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.networkconnectivity.v1beta.DeleteHubRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.DeleteHub][google.cloud.networkconnectivity.v1beta.HubService.DeleteHub].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteHubRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteHubRequest) + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub to delete.
+     * 
+ * + * + * 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 hub to delete.
+     * 
+ * + * + * 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 hub to delete.
+     * 
+ * + * + * 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 hub to delete.
+     * 
+ * + * + * 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 hub to delete.
+     * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteHubRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteHubRequest) + private static final com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteHubRequest 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.networkconnectivity.v1beta.DeleteHubRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequestOrBuilder.java new file mode 100644 index 000000000000..6f4cf4998850 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteHubRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteHubRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteHubRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequest.java new file mode 100644 index 000000000000..6dbcb270c5ff --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequest.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to delete a `MulticloudDataTransferConfig` resource.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest} + */ +@com.google.protobuf.Generated +public final class DeleteMulticloudDataTransferConfigRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + DeleteMulticloudDataTransferConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteMulticloudDataTransferConfigRequest"); + } + + // Use DeleteMulticloudDataTransferConfigRequest.newBuilder() to construct. + private DeleteMulticloudDataTransferConfigRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteMulticloudDataTransferConfigRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to
+   * delete.
+   * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to
+   * delete.
+   * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, etag_); + } + 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.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to delete a `MulticloudDataTransferConfig` resource.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + build() { + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + 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.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + .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.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the `MulticloudDataTransferConfig` resource to
+     * delete.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to
+     * delete.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to
+     * delete.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to
+     * delete.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to
+     * delete.
+     * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The etag is computed by the server, and might be sent with update
+     * and delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .DeleteMulticloudDataTransferConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteMulticloudDataTransferConfigRequest 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.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequestOrBuilder.java new file mode 100644 index 000000000000..8c784ba1e47a --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteMulticloudDataTransferConfigRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteMulticloudDataTransferConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to
+   * delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to
+   * delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The etag is computed by the server, and might be sent with update
+   * and delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequest.java new file mode 100644 index 000000000000..16cdbf2963ae --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequest.java @@ -0,0 +1,906 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [PolicyBasedRoutingService.DeletePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.DeletePolicyBasedRoute]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest} + */ +@com.google.protobuf.Generated +public final class DeletePolicyBasedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) + DeletePolicyBasedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeletePolicyBasedRouteRequest"); + } + + // Use DeletePolicyBasedRouteRequest.newBuilder() to construct. + private DeletePolicyBasedRouteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeletePolicyBasedRouteRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the policy-based route resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the policy-based route resource to delete.
+   * 
+ * + * + * 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest 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.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest 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.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [PolicyBasedRoutingService.DeletePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.DeletePolicyBasedRoute]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the policy-based route resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the policy-based route resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the policy-based route resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the policy-based route resource to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the policy-based route resource to delete.
+     * 
+ * + * + * 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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 knows to
+     * ignore the request if it has already been completed. The server guarantees
+     * 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, ignores 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePolicyBasedRouteRequest 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.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..2de01123dd53 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeletePolicyBasedRouteRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeletePolicyBasedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the policy-based route resource to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the policy-based route resource to delete.
+   * 
+ * + * + * 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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 knows to
+   * ignore the request if it has already been completed. The server guarantees
+   * 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, ignores 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(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequest.java new file mode 100644 index 000000000000..a0e098bb8525 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequest.java @@ -0,0 +1,899 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1beta.HubService.DeleteSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest} + */ +@com.google.protobuf.Generated +public final class DeleteSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) + DeleteSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteSpokeRequest"); + } + + // Use DeleteSpokeRequest.newBuilder() to construct. + private DeleteSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteSpokeRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the spoke to delete.
+   * 
+ * + * + * 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 spoke to delete.
+   * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest 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.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest 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.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1beta.HubService.DeleteSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the spoke to delete.
+     * 
+ * + * + * 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 spoke to delete.
+     * 
+ * + * + * 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 spoke to delete.
+     * 
+ * + * + * 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 spoke to delete.
+     * 
+ * + * + * 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 spoke to delete.
+     * 
+ * + * + * 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSpokeRequest 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.networkconnectivity.v1beta.DeleteSpokeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..0ec9bd97dc2e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteSpokeRequestOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the spoke to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the spoke to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequest.java new file mode 100644 index 000000000000..a4a5a835cf41 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequest.java @@ -0,0 +1,909 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for deleting a Transport.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteTransportRequest} + */ +@com.google.protobuf.Generated +public final class DeleteTransportRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) + DeleteTransportRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteTransportRequest"); + } + + // Use DeleteTransportRequest.newBuilder() to construct. + private DeleteTransportRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteTransportRequest() { + name_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, requestId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest other = + (com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest 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.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest 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.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a Transport.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.DeleteTransportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest build() { + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest result = + new com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) + private static final com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTransportRequest 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.networkconnectivity.v1beta.DeleteTransportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequestOrBuilder.java new file mode 100644 index 000000000000..1de8a97e37a1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DeleteTransportRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DeleteTransportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.DeleteTransportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Destination.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Destination.java new file mode 100644 index 000000000000..1733a9e9140e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Destination.java @@ -0,0 +1,5042 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The `Destination` resource. It specifies the IP prefix and the associated
+ * autonomous system numbers (ASN) that you want to include in a
+ * `MulticloudDataTransferConfig` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Destination} + */ +@com.google.protobuf.Generated +public final class Destination extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Destination) + DestinationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Destination"); + } + + // Use Destination.newBuilder() to construct. + private Destination(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Destination() { + name_ = ""; + etag_ = ""; + description_ = ""; + ipPrefix_ = ""; + endpoints_ = java.util.Collections.emptyList(); + uid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Destination.class, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder.class); + } + + public interface DestinationEndpointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The ASN of the remote IP prefix.
+     * 
+ * + * int64 asn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The asn. + */ + long getAsn(); + + /** + * + * + *
+     * Required. The CSP of the remote IP prefix.
+     * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The csp. + */ + java.lang.String getCsp(); + + /** + * + * + *
+     * Required. The CSP of the remote IP prefix.
+     * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for csp. + */ + com.google.protobuf.ByteString getCspBytes(); + + /** + * + * + *
+     * Output only. The state of the `DestinationEndpoint` resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+     * Output only. The state of the `DestinationEndpoint` resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State getState(); + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + + /** + * + * + *
+   * The metadata for a `DestinationEndpoint` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint} + */ + public static final class DestinationEndpoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) + DestinationEndpointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DestinationEndpoint"); + } + + // Use DestinationEndpoint.newBuilder() to construct. + private DestinationEndpoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DestinationEndpoint() { + csp_ = ""; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.class, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + .class); + } + + /** + * + * + *
+     * The state of the `DestinationEndpoint` resource.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * An invalid state, which is the default case.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The `DestinationEndpoint` resource is valid.
+       * 
+ * + * VALID = 1; + */ + VALID(1), + /** + * + * + *
+       * The `DestinationEndpoint` resource is invalid.
+       * 
+ * + * INVALID = 2; + */ + INVALID(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+       * An invalid state, which is the default case.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The `DestinationEndpoint` resource is valid.
+       * 
+ * + * VALID = 1; + */ + public static final int VALID_VALUE = 1; + + /** + * + * + *
+       * The `DestinationEndpoint` resource is invalid.
+       * 
+ * + * INVALID = 2; + */ + public static final int INVALID_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 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 VALID; + case 2: + return INVALID; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .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.networkconnectivity.v1beta.Destination.DestinationEndpoint.State) + } + + private int bitField0_; + public static final int ASN_FIELD_NUMBER = 1; + private long asn_ = 0L; + + /** + * + * + *
+     * Required. The ASN of the remote IP prefix.
+     * 
+ * + * int64 asn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The asn. + */ + @java.lang.Override + public long getAsn() { + return asn_; + } + + public static final int CSP_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object csp_ = ""; + + /** + * + * + *
+     * Required. The CSP of the remote IP prefix.
+     * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The csp. + */ + @java.lang.Override + public java.lang.String getCsp() { + java.lang.Object ref = csp_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csp_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. The CSP of the remote IP prefix.
+     * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for csp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCspBytes() { + java.lang.Object ref = csp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + csp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the `DestinationEndpoint` resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the `DestinationEndpoint` resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + getState() { + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State result = + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .UNRECOGNIZED + : result; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+     * Output only. Time when the `DestinationEndpoint` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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 (asn_ != 0L) { + output.writeInt64(1, asn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(csp_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, csp_); + } + if (state_ + != com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (asn_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, asn_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(csp_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, csp_); + } + if (state_ + != com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + 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.networkconnectivity.v1beta.Destination.DestinationEndpoint)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint other = + (com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) obj; + + if (getAsn() != other.getAsn()) return false; + if (!getCsp().equals(other.getCsp())) return false; + if (state_ != other.state_) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + ASN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAsn()); + hash = (37 * hash) + CSP_FIELD_NUMBER; + hash = (53 * hash) + getCsp().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + 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.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + 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.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The metadata for a `DestinationEndpoint` resource.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.class, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + asn_ = 0L; + csp_ = ""; + state_ = 0; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_DestinationEndpoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint build() { + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint result = + new com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.asn_ = asn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.csp_ = csp_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = + updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .getDefaultInstance()) return this; + if (other.getAsn() != 0L) { + setAsn(other.getAsn()); + } + if (!other.getCsp().isEmpty()) { + csp_ = other.csp_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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: + { + asn_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + csp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().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 long asn_; + + /** + * + * + *
+       * Required. The ASN of the remote IP prefix.
+       * 
+ * + * int64 asn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The asn. + */ + @java.lang.Override + public long getAsn() { + return asn_; + } + + /** + * + * + *
+       * Required. The ASN of the remote IP prefix.
+       * 
+ * + * int64 asn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The asn to set. + * @return This builder for chaining. + */ + public Builder setAsn(long value) { + + asn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The ASN of the remote IP prefix.
+       * 
+ * + * int64 asn = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAsn() { + bitField0_ = (bitField0_ & ~0x00000001); + asn_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object csp_ = ""; + + /** + * + * + *
+       * Required. The CSP of the remote IP prefix.
+       * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The csp. + */ + public java.lang.String getCsp() { + java.lang.Object ref = csp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + csp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. The CSP of the remote IP prefix.
+       * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for csp. + */ + public com.google.protobuf.ByteString getCspBytes() { + java.lang.Object ref = csp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + csp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. The CSP of the remote IP prefix.
+       * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The csp to set. + * @return This builder for chaining. + */ + public Builder setCsp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + csp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The CSP of the remote IP prefix.
+       * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCsp() { + csp_ = getDefaultInstance().getCsp(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. The CSP of the remote IP prefix.
+       * 
+ * + * string csp = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for csp to set. + * @return This builder for chaining. + */ + public Builder setCspBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + csp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+       * Output only. The state of the `DestinationEndpoint` resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+       * Output only. The state of the `DestinationEndpoint` resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the `DestinationEndpoint` resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + getState() { + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State result = + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The state of the `DestinationEndpoint` resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the `DestinationEndpoint` resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+       * Output only. Time when the `DestinationEndpoint` resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint) + private static final com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DestinationEndpoint 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.networkconnectivity.v1beta.Destination.DestinationEndpoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the `Destination` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the `Destination` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Time when the `Destination` resource 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 `Destination` resource 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 `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_PREFIX_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipPrefix_ = ""; + + /** + * + * + *
+   * Required. Immutable. The IP prefix that represents your workload on another
+   * CSP.
+   * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ipPrefix. + */ + @java.lang.Override + public java.lang.String getIpPrefix() { + java.lang.Object ref = ipPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipPrefix_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The IP prefix that represents your workload on another
+   * CSP.
+   * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ipPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpPrefixBytes() { + java.lang.Object ref = ipPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINTS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint> + endpoints_; + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getEndpointsList() { + return endpoints_; + } + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder> + getEndpointsOrBuilderList() { + return endpoints_; + } + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getEndpointsCount() { + return endpoints_.size(); + } + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint getEndpoints( + int index) { + return endpoints_.get(index); + } + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder + getEndpointsOrBuilder(int index) { + return endpoints_.get(index); + } + + public static final int STATE_TIMELINE_FIELD_NUMBER = 9; + private com.google.cloud.networkconnectivity.v1beta.StateTimeline stateTimeline_; + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateTimeline field is set. + */ + @java.lang.Override + public boolean hasStateTimeline() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateTimeline. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline getStateTimeline() { + return stateTimeline_ == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance() + : stateTimeline_; + } + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder + getStateTimelineOrBuilder() { + return stateTimeline_ == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance() + : stateTimeline_; + } + + public static final int UID_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the `Destination` resource.
+   * This value is unique across all `Destination` resources.
+   * If a resource is deleted and another with the same name is
+   * created, the new resource is assigned a different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the `Destination` resource.
+   * This value is unique across all `Destination` resources.
+   * If a resource is deleted and another with the same name is
+   * created, the new resource is assigned a different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipPrefix_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, ipPrefix_); + } + for (int i = 0; i < endpoints_.size(); i++) { + output.writeMessage(8, endpoints_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getStateTimeline()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, uid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipPrefix_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, ipPrefix_); + } + for (int i = 0; i < endpoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, endpoints_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getStateTimeline()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, uid_); + } + 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.networkconnectivity.v1beta.Destination)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Destination other = + (com.google.cloud.networkconnectivity.v1beta.Destination) 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 (!getEtag().equals(other.getEtag())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getIpPrefix().equals(other.getIpPrefix())) return false; + if (!getEndpointsList().equals(other.getEndpointsList())) return false; + if (hasStateTimeline() != other.hasStateTimeline()) return false; + if (hasStateTimeline()) { + if (!getStateTimeline().equals(other.getStateTimeline())) return false; + } + if (!getUid().equals(other.getUid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + IP_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getIpPrefix().hashCode(); + if (getEndpointsCount() > 0) { + hash = (37 * hash) + ENDPOINTS_FIELD_NUMBER; + hash = (53 * hash) + getEndpointsList().hashCode(); + } + if (hasStateTimeline()) { + hash = (37 * hash) + STATE_TIMELINE_FIELD_NUMBER; + hash = (53 * hash) + getStateTimeline().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination 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.networkconnectivity.v1beta.Destination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination 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.networkconnectivity.v1beta.Destination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.Destination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The `Destination` resource. It specifies the IP prefix and the associated
+   * autonomous system numbers (ASN) that you want to include in a
+   * `MulticloudDataTransferConfig` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Destination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Destination) + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Destination.class, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Destination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetEndpointsFieldBuilder(); + internalGetStateTimelineFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + etag_ = ""; + description_ = ""; + ipPrefix_ = ""; + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + } else { + endpoints_ = null; + endpointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + stateTimeline_ = null; + if (stateTimelineBuilder_ != null) { + stateTimelineBuilder_.dispose(); + stateTimelineBuilder_ = null; + } + uid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_Destination_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination build() { + com.google.cloud.networkconnectivity.v1beta.Destination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Destination result = + new com.google.cloud.networkconnectivity.v1beta.Destination(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.Destination result) { + if (endpointsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + endpoints_ = java.util.Collections.unmodifiableList(endpoints_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.endpoints_ = endpoints_; + } else { + result.endpoints_ = endpointsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Destination result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.ipPrefix_ = ipPrefix_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stateTimeline_ = + stateTimelineBuilder_ == null ? stateTimeline_ : stateTimelineBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.uid_ = uid_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Destination) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Destination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Destination other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getIpPrefix().isEmpty()) { + ipPrefix_ = other.ipPrefix_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (endpointsBuilder_ == null) { + if (!other.endpoints_.isEmpty()) { + if (endpoints_.isEmpty()) { + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureEndpointsIsMutable(); + endpoints_.addAll(other.endpoints_); + } + onChanged(); + } + } else { + if (!other.endpoints_.isEmpty()) { + if (endpointsBuilder_.isEmpty()) { + endpointsBuilder_.dispose(); + endpointsBuilder_ = null; + endpoints_ = other.endpoints_; + bitField0_ = (bitField0_ & ~0x00000080); + endpointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEndpointsFieldBuilder() + : null; + } else { + endpointsBuilder_.addAllMessages(other.endpoints_); + } + } + } + if (other.hasStateTimeline()) { + mergeStateTimeline(other.getStateTimeline()); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + ipPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .parser(), + extensionRegistry); + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(m); + } else { + endpointsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetStateTimelineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the `Destination` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the `Destination` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the `Destination` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the `Destination` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the `Destination` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource 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 `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource 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 `Destination` resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Time when the `Destination` resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object ipPrefix_ = ""; + + /** + * + * + *
+     * Required. Immutable. The IP prefix that represents your workload on another
+     * CSP.
+     * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ipPrefix. + */ + public java.lang.String getIpPrefix() { + java.lang.Object ref = ipPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The IP prefix that represents your workload on another
+     * CSP.
+     * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ipPrefix. + */ + public com.google.protobuf.ByteString getIpPrefixBytes() { + java.lang.Object ref = ipPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The IP prefix that represents your workload on another
+     * CSP.
+     * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The ipPrefix to set. + * @return This builder for chaining. + */ + public Builder setIpPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipPrefix_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The IP prefix that represents your workload on another
+     * CSP.
+     * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearIpPrefix() { + ipPrefix_ = getDefaultInstance().getIpPrefix(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The IP prefix that represents your workload on another
+     * CSP.
+     * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for ipPrefix to set. + * @return This builder for chaining. + */ + public Builder setIpPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipPrefix_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint> + endpoints_ = java.util.Collections.emptyList(); + + private void ensureEndpointsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + endpoints_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint>( + endpoints_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder> + endpointsBuilder_; + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint> + getEndpointsList() { + if (endpointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(endpoints_); + } else { + return endpointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public int getEndpointsCount() { + if (endpointsBuilder_ == null) { + return endpoints_.size(); + } else { + return endpointsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint getEndpoints( + int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoints( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.set(index, value); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndpoints( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.set(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEndpoints( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(value); + onChanged(); + } else { + endpointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEndpoints( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint value) { + if (endpointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndpointsIsMutable(); + endpoints_.add(index, value); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEndpoints( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEndpoints( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + builderForValue) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.add(index, builderForValue.build()); + onChanged(); + } else { + endpointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllEndpoints( + java.lang.Iterable< + ? extends + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint> + values) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endpoints_); + onChanged(); + } else { + endpointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndpoints() { + if (endpointsBuilder_ == null) { + endpoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + endpointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeEndpoints(int index) { + if (endpointsBuilder_ == null) { + ensureEndpointsIsMutable(); + endpoints_.remove(index); + onChanged(); + } else { + endpointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + getEndpointsBuilder(int index) { + return internalGetEndpointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder + getEndpointsOrBuilder(int index) { + if (endpointsBuilder_ == null) { + return endpoints_.get(index); + } else { + return endpointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.Destination + .DestinationEndpointOrBuilder> + getEndpointsOrBuilderList() { + if (endpointsBuilder_ != null) { + return endpointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endpoints_); + } + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + addEndpointsBuilder() { + return internalGetEndpointsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder + addEndpointsBuilder(int index) { + return internalGetEndpointsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint + .getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Unordered list. The list of `DestinationEndpoint` resources
+     * configured for the IP prefix.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder> + getEndpointsBuilderList() { + return internalGetEndpointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder> + internalGetEndpointsFieldBuilder() { + if (endpointsBuilder_ == null) { + endpointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint, + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint.Builder, + com.google.cloud.networkconnectivity.v1beta.Destination + .DestinationEndpointOrBuilder>( + endpoints_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + endpoints_ = null; + } + return endpointsBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.StateTimeline stateTimeline_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder> + stateTimelineBuilder_; + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateTimeline field is set. + */ + public boolean hasStateTimeline() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateTimeline. + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline getStateTimeline() { + if (stateTimelineBuilder_ == null) { + return stateTimeline_ == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance() + : stateTimeline_; + } else { + return stateTimelineBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateTimeline( + com.google.cloud.networkconnectivity.v1beta.StateTimeline value) { + if (stateTimelineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stateTimeline_ = value; + } else { + stateTimelineBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStateTimeline( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder builderForValue) { + if (stateTimelineBuilder_ == null) { + stateTimeline_ = builderForValue.build(); + } else { + stateTimelineBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStateTimeline( + com.google.cloud.networkconnectivity.v1beta.StateTimeline value) { + if (stateTimelineBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && stateTimeline_ != null + && stateTimeline_ + != com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance()) { + getStateTimelineBuilder().mergeFrom(value); + } else { + stateTimeline_ = value; + } + } else { + stateTimelineBuilder_.mergeFrom(value); + } + if (stateTimeline_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStateTimeline() { + bitField0_ = (bitField0_ & ~0x00000100); + stateTimeline_ = null; + if (stateTimelineBuilder_ != null) { + stateTimelineBuilder_.dispose(); + stateTimelineBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder + getStateTimelineBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetStateTimelineFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder + getStateTimelineOrBuilder() { + if (stateTimelineBuilder_ != null) { + return stateTimelineBuilder_.getMessageOrBuilder(); + } else { + return stateTimeline_ == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance() + : stateTimeline_; + } + } + + /** + * + * + *
+     * Output only. The timeline of the expected `Destination` states or the
+     * current rest state. If a state change is expected, the value is `ADDING`,
+     * `DELETING` or `SUSPENDING`, depending on the action specified.
+     *
+     * Example:
+     * "state_timeline": {
+     * "states": [
+     * {
+     * // The time when the `Destination` resource will be activated.
+     * "effectiveTime": "2024-12-01T08:00:00Z",
+     * "state": "ADDING"
+     * },
+     * {
+     * // The time when the `Destination` resource will be suspended.
+     * "effectiveTime": "2024-12-01T20:00:00Z",
+     * "state": "SUSPENDING"
+     * }
+     * ]
+     * }
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder> + internalGetStateTimelineFieldBuilder() { + if (stateTimelineBuilder_ == null) { + stateTimelineBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder>( + getStateTimeline(), getParentForChildren(), isClean()); + stateTimeline_ = null; + } + return stateTimelineBuilder_; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the `Destination` resource.
+     * This value is unique across all `Destination` resources.
+     * If a resource is deleted and another with the same name is
+     * created, the new resource is assigned a different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the `Destination` resource.
+     * This value is unique across all `Destination` resources.
+     * If a resource is deleted and another with the same name is
+     * created, the new resource is assigned a different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the `Destination` resource.
+     * This value is unique across all `Destination` resources.
+     * If a resource is deleted and another with the same name is
+     * created, the new resource is assigned a different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the `Destination` resource.
+     * This value is unique across all `Destination` resources.
+     * If a resource is deleted and another with the same name is
+     * created, the new resource is assigned a different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the `Destination` resource.
+     * This value is unique across all `Destination` resources.
+     * If a resource is deleted and another with the same name is
+     * created, the new resource is assigned a different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Destination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Destination) + private static final com.google.cloud.networkconnectivity.v1beta.Destination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Destination(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Destination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Destination 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.networkconnectivity.v1beta.Destination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationName.java new file mode 100644 index 000000000000..43278897651d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationName.java @@ -0,0 +1,270 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 DestinationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG_DESTINATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String multicloudDataTransferConfig; + private final String destination; + + @Deprecated + protected DestinationName() { + project = null; + location = null; + multicloudDataTransferConfig = null; + destination = null; + } + + private DestinationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + multicloudDataTransferConfig = + Preconditions.checkNotNull(builder.getMulticloudDataTransferConfig()); + destination = Preconditions.checkNotNull(builder.getDestination()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig; + } + + public String getDestination() { + return destination; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DestinationName of( + String project, String location, String multicloudDataTransferConfig, String destination) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .setDestination(destination) + .build(); + } + + public static String format( + String project, String location, String multicloudDataTransferConfig, String destination) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .setDestination(destination) + .build() + .toString(); + } + + public static DestinationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG_DESTINATION.validatedMatch( + formattedString, "DestinationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("multicloud_data_transfer_config"), + matchMap.get("destination")); + } + + 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 (DestinationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG_DESTINATION.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 (multicloudDataTransferConfig != null) { + fieldMapBuilder.put("multicloud_data_transfer_config", multicloudDataTransferConfig); + } + if (destination != null) { + fieldMapBuilder.put("destination", destination); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG_DESTINATION.instantiate( + "project", + project, + "location", + location, + "multicloud_data_transfer_config", + multicloudDataTransferConfig, + "destination", + destination); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + DestinationName that = ((DestinationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.multicloudDataTransferConfig, that.multicloudDataTransferConfig) + && Objects.equals(this.destination, that.destination); + } + 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(multicloudDataTransferConfig); + h *= 1000003; + h ^= Objects.hashCode(destination); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}. + */ + public static class Builder { + private String project; + private String location; + private String multicloudDataTransferConfig; + private String destination; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig; + } + + public String getDestination() { + return destination; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setMulticloudDataTransferConfig(String multicloudDataTransferConfig) { + this.multicloudDataTransferConfig = multicloudDataTransferConfig; + return this; + } + + public Builder setDestination(String destination) { + this.destination = destination; + return this; + } + + private Builder(DestinationName destinationName) { + this.project = destinationName.project; + this.location = destinationName.location; + this.multicloudDataTransferConfig = destinationName.multicloudDataTransferConfig; + this.destination = destinationName.destination; + } + + public DestinationName build() { + return new DestinationName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationOrBuilder.java new file mode 100644 index 000000000000..26a9839fc21d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/DestinationOrBuilder.java @@ -0,0 +1,498 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface DestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Destination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the `Destination` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the `Destination` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when the `Destination` resource 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 `Destination` resource 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 `Destination` resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the `Destination` resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Immutable. The IP prefix that represents your workload on another
+   * CSP.
+   * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The ipPrefix. + */ + java.lang.String getIpPrefix(); + + /** + * + * + *
+   * Required. Immutable. The IP prefix that represents your workload on another
+   * CSP.
+   * 
+ * + * + * string ip_prefix = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for ipPrefix. + */ + com.google.protobuf.ByteString getIpPrefixBytes(); + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getEndpointsList(); + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint getEndpoints( + int index); + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + int getEndpointsCount(); + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder> + getEndpointsOrBuilderList(); + + /** + * + * + *
+   * Required. Unordered list. The list of `DestinationEndpoint` resources
+   * configured for the IP prefix.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpoint endpoints = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Destination.DestinationEndpointOrBuilder + getEndpointsOrBuilder(int index); + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the stateTimeline field is set. + */ + boolean hasStateTimeline(); + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateTimeline. + */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline getStateTimeline(); + + /** + * + * + *
+   * Output only. The timeline of the expected `Destination` states or the
+   * current rest state. If a state change is expected, the value is `ADDING`,
+   * `DELETING` or `SUSPENDING`, depending on the action specified.
+   *
+   * Example:
+   * "state_timeline": {
+   * "states": [
+   * {
+   * // The time when the `Destination` resource will be activated.
+   * "effectiveTime": "2024-12-01T08:00:00Z",
+   * "state": "ADDING"
+   * },
+   * {
+   * // The time when the `Destination` resource will be suspended.
+   * "effectiveTime": "2024-12-01T20:00:00Z",
+   * "state": "SUSPENDING"
+   * }
+   * ]
+   * }
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline state_timeline = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder getStateTimelineOrBuilder(); + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the `Destination` resource.
+   * This value is unique across all `Destination` resources.
+   * If a resource is deleted and another with the same name is
+   * created, the new resource is assigned a different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the `Destination` resource.
+   * This value is unique across all `Destination` resources.
+   * If a resource is deleted and another with the same name is
+   * created, the new resource is assigned a different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Gateway.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Gateway.java new file mode 100644 index 000000000000..c6851b61eed2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Gateway.java @@ -0,0 +1,2592 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A gateway that can apply specialized traffic processing.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Gateway} + */ +@com.google.protobuf.Generated +public final class Gateway extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Gateway) + GatewayOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Gateway"); + } + + // Use Gateway.newBuilder() to construct. + private Gateway(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Gateway() { + ipRangeReservations_ = java.util.Collections.emptyList(); + capacity_ = 0; + cloudRouters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + sacAttachment_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Gateway.class, + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder.class); + } + + /** + * + * + *
+   * The aggregate processing capacity of this gateway.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity} + */ + public enum GatewayCapacity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The gateway capacity is unspecified.
+     * 
+ * + * GATEWAY_CAPACITY_UNSPECIFIED = 0; + */ + GATEWAY_CAPACITY_UNSPECIFIED(0), + /** + * + * + *
+     * The gateway has 1 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_1_GBPS = 5; + */ + CAPACITY_1_GBPS(5), + /** + * + * + *
+     * The gateway has 10 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_10_GBPS = 1; + */ + CAPACITY_10_GBPS(1), + /** + * + * + *
+     * The gateway has 100 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_100_GBPS = 4; + */ + CAPACITY_100_GBPS(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GatewayCapacity"); + } + + /** + * + * + *
+     * The gateway capacity is unspecified.
+     * 
+ * + * GATEWAY_CAPACITY_UNSPECIFIED = 0; + */ + public static final int GATEWAY_CAPACITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The gateway has 1 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_1_GBPS = 5; + */ + public static final int CAPACITY_1_GBPS_VALUE = 5; + + /** + * + * + *
+     * The gateway has 10 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_10_GBPS = 1; + */ + public static final int CAPACITY_10_GBPS_VALUE = 1; + + /** + * + * + *
+     * The gateway has 100 Gbps of aggregate processing capacity
+     * 
+ * + * CAPACITY_100_GBPS = 4; + */ + public static final int CAPACITY_100_GBPS_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 GatewayCapacity 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 GatewayCapacity forNumber(int value) { + switch (value) { + case 0: + return GATEWAY_CAPACITY_UNSPECIFIED; + case 5: + return CAPACITY_1_GBPS; + case 1: + return CAPACITY_10_GBPS; + case 4: + return CAPACITY_100_GBPS; + 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 GatewayCapacity findValueByNumber(int number) { + return GatewayCapacity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Gateway.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GatewayCapacity[] VALUES = values(); + + public static GatewayCapacity 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 GatewayCapacity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity) + } + + public interface IpRangeReservationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A block of IP addresses used to allocate supporting
+     * infrastructure for this gateway. This block must not overlap with subnets
+     * in any spokes or peer VPC networks that the gateway can communicate with.
+     * Example: "10.1.2.0/24"
+     * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipRange. + */ + java.lang.String getIpRange(); + + /** + * + * + *
+     * Required. A block of IP addresses used to allocate supporting
+     * infrastructure for this gateway. This block must not overlap with subnets
+     * in any spokes or peer VPC networks that the gateway can communicate with.
+     * Example: "10.1.2.0/24"
+     * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipRange. + */ + com.google.protobuf.ByteString getIpRangeBytes(); + } + + /** + * + * + *
+   * A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation} + */ + public static final class IpRangeReservation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) + IpRangeReservationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IpRangeReservation"); + } + + // Use IpRangeReservation.newBuilder() to construct. + private IpRangeReservation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IpRangeReservation() { + ipRange_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.class, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder.class); + } + + public static final int IP_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipRange_ = ""; + + /** + * + * + *
+     * Required. A block of IP addresses used to allocate supporting
+     * infrastructure for this gateway. This block must not overlap with subnets
+     * in any spokes or peer VPC networks that the gateway can communicate with.
+     * Example: "10.1.2.0/24"
+     * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipRange. + */ + @java.lang.Override + public java.lang.String getIpRange() { + java.lang.Object ref = ipRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipRange_ = s; + return s; + } + } + + /** + * + * + *
+     * Required. A block of IP addresses used to allocate supporting
+     * infrastructure for this gateway. This block must not overlap with subnets
+     * in any spokes or peer VPC networks that the gateway can communicate with.
+     * Example: "10.1.2.0/24"
+     * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpRangeBytes() { + java.lang.Object ref = ipRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ipRange_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ipRange_); + } + 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.networkconnectivity.v1beta.Gateway.IpRangeReservation)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation other = + (com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) obj; + + if (!getIpRange().equals(other.getIpRange())) 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) + IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpRange().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation 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.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation 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.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.class, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipRange_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation build() { + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation result = + new com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipRange_ = ipRange_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + .getDefaultInstance()) return this; + if (!other.getIpRange().isEmpty()) { + ipRange_ = other.ipRange_; + 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: + { + ipRange_ = 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 ipRange_ = ""; + + /** + * + * + *
+       * Required. A block of IP addresses used to allocate supporting
+       * infrastructure for this gateway. This block must not overlap with subnets
+       * in any spokes or peer VPC networks that the gateway can communicate with.
+       * Example: "10.1.2.0/24"
+       * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ipRange. + */ + public java.lang.String getIpRange() { + java.lang.Object ref = ipRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Required. A block of IP addresses used to allocate supporting
+       * infrastructure for this gateway. This block must not overlap with subnets
+       * in any spokes or peer VPC networks that the gateway can communicate with.
+       * Example: "10.1.2.0/24"
+       * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ipRange. + */ + public com.google.protobuf.ByteString getIpRangeBytes() { + java.lang.Object ref = ipRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Required. A block of IP addresses used to allocate supporting
+       * infrastructure for this gateway. This block must not overlap with subnets
+       * in any spokes or peer VPC networks that the gateway can communicate with.
+       * Example: "10.1.2.0/24"
+       * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The ipRange to set. + * @return This builder for chaining. + */ + public Builder setIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. A block of IP addresses used to allocate supporting
+       * infrastructure for this gateway. This block must not overlap with subnets
+       * in any spokes or peer VPC networks that the gateway can communicate with.
+       * Example: "10.1.2.0/24"
+       * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIpRange() { + ipRange_ = getDefaultInstance().getIpRange(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. A block of IP addresses used to allocate supporting
+       * infrastructure for this gateway. This block must not overlap with subnets
+       * in any spokes or peer VPC networks that the gateway can communicate with.
+       * Example: "10.1.2.0/24"
+       * 
+ * + * string ip_range = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for ipRange to set. + * @return This builder for chaining. + */ + public Builder setIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipRange_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation) + private static final com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IpRangeReservation 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.networkconnectivity.v1beta.Gateway.IpRangeReservation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int IP_RANGE_RESERVATIONS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List + ipRangeReservations_; + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getIpRangeReservationsList() { + return ipRangeReservations_; + } + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder> + getIpRangeReservationsOrBuilderList() { + return ipRangeReservations_; + } + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getIpRangeReservationsCount() { + return ipRangeReservations_.size(); + } + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + getIpRangeReservations(int index) { + return ipRangeReservations_.get(index); + } + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder + getIpRangeReservationsOrBuilder(int index) { + return ipRangeReservations_.get(index); + } + + public static final int CAPACITY_FIELD_NUMBER = 10; + private int capacity_ = 0; + + /** + * + * + *
+   * Optional. The aggregate processing capacity of this gateway.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for capacity. + */ + @java.lang.Override + public int getCapacityValue() { + return capacity_; + } + + /** + * + * + *
+   * Optional. The aggregate processing capacity of this gateway.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The capacity. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity getCapacity() { + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity result = + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity.forNumber(capacity_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity.UNRECOGNIZED + : result; + } + + public static final int CLOUD_ROUTERS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList cloudRouters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the cloudRouters. + */ + public com.google.protobuf.ProtocolStringList getCloudRoutersList() { + return cloudRouters_; + } + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of cloudRouters. + */ + public int getCloudRoutersCount() { + return cloudRouters_.size(); + } + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The cloudRouters at the given index. + */ + public java.lang.String getCloudRouters(int index) { + return cloudRouters_.get(index); + } + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the cloudRouters at the given index. + */ + public com.google.protobuf.ByteString getCloudRoutersBytes(int index) { + return cloudRouters_.getByteString(index); + } + + public static final int SAC_ATTACHMENT_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object sacAttachment_ = ""; + + /** + * + * + *
+   * Output only. The URI of the connected SACAttachment.
+   * Should be in the form:
+   * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+   * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sacAttachment. + */ + @java.lang.Override + public java.lang.String getSacAttachment() { + java.lang.Object ref = sacAttachment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sacAttachment_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The URI of the connected SACAttachment.
+   * Should be in the form:
+   * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+   * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sacAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSacAttachmentBytes() { + java.lang.Object ref = sacAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sacAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < ipRangeReservations_.size(); i++) { + output.writeMessage(7, ipRangeReservations_.get(i)); + } + if (capacity_ + != com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity + .GATEWAY_CAPACITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, capacity_); + } + for (int i = 0; i < cloudRouters_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, cloudRouters_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sacAttachment_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, sacAttachment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ipRangeReservations_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, ipRangeReservations_.get(i)); + } + if (capacity_ + != com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity + .GATEWAY_CAPACITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, capacity_); + } + { + int dataSize = 0; + for (int i = 0; i < cloudRouters_.size(); i++) { + dataSize += computeStringSizeNoTag(cloudRouters_.getRaw(i)); + } + size += dataSize; + size += 1 * getCloudRoutersList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sacAttachment_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, sacAttachment_); + } + 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.networkconnectivity.v1beta.Gateway)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Gateway other = + (com.google.cloud.networkconnectivity.v1beta.Gateway) obj; + + if (!getIpRangeReservationsList().equals(other.getIpRangeReservationsList())) return false; + if (capacity_ != other.capacity_) return false; + if (!getCloudRoutersList().equals(other.getCloudRoutersList())) return false; + if (!getSacAttachment().equals(other.getSacAttachment())) 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 (getIpRangeReservationsCount() > 0) { + hash = (37 * hash) + IP_RANGE_RESERVATIONS_FIELD_NUMBER; + hash = (53 * hash) + getIpRangeReservationsList().hashCode(); + } + hash = (37 * hash) + CAPACITY_FIELD_NUMBER; + hash = (53 * hash) + capacity_; + if (getCloudRoutersCount() > 0) { + hash = (37 * hash) + CLOUD_ROUTERS_FIELD_NUMBER; + hash = (53 * hash) + getCloudRoutersList().hashCode(); + } + hash = (37 * hash) + SAC_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getSacAttachment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway 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.networkconnectivity.v1beta.Gateway parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway 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.networkconnectivity.v1beta.Gateway parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1beta.Gateway prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A gateway that can apply specialized traffic processing.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Gateway} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Gateway) + com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Gateway.class, + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Gateway.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ipRangeReservationsBuilder_ == null) { + ipRangeReservations_ = java.util.Collections.emptyList(); + } else { + ipRangeReservations_ = null; + ipRangeReservationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + capacity_ = 0; + cloudRouters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + sacAttachment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Gateway_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway build() { + com.google.cloud.networkconnectivity.v1beta.Gateway result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Gateway result = + new com.google.cloud.networkconnectivity.v1beta.Gateway(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.Gateway result) { + if (ipRangeReservationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ipRangeReservations_ = java.util.Collections.unmodifiableList(ipRangeReservations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ipRangeReservations_ = ipRangeReservations_; + } else { + result.ipRangeReservations_ = ipRangeReservationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Gateway result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.capacity_ = capacity_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + cloudRouters_.makeImmutable(); + result.cloudRouters_ = cloudRouters_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sacAttachment_ = sacAttachment_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Gateway) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Gateway) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Gateway other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance()) + return this; + if (ipRangeReservationsBuilder_ == null) { + if (!other.ipRangeReservations_.isEmpty()) { + if (ipRangeReservations_.isEmpty()) { + ipRangeReservations_ = other.ipRangeReservations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.addAll(other.ipRangeReservations_); + } + onChanged(); + } + } else { + if (!other.ipRangeReservations_.isEmpty()) { + if (ipRangeReservationsBuilder_.isEmpty()) { + ipRangeReservationsBuilder_.dispose(); + ipRangeReservationsBuilder_ = null; + ipRangeReservations_ = other.ipRangeReservations_; + bitField0_ = (bitField0_ & ~0x00000001); + ipRangeReservationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIpRangeReservationsFieldBuilder() + : null; + } else { + ipRangeReservationsBuilder_.addAllMessages(other.ipRangeReservations_); + } + } + } + if (other.capacity_ != 0) { + setCapacityValue(other.getCapacityValue()); + } + if (!other.cloudRouters_.isEmpty()) { + if (cloudRouters_.isEmpty()) { + cloudRouters_ = other.cloudRouters_; + bitField0_ |= 0x00000004; + } else { + ensureCloudRoutersIsMutable(); + cloudRouters_.addAll(other.cloudRouters_); + } + onChanged(); + } + if (!other.getSacAttachment().isEmpty()) { + sacAttachment_ = other.sacAttachment_; + 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 58: + { + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + .parser(), + extensionRegistry); + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.add(m); + } else { + ipRangeReservationsBuilder_.addMessage(m); + } + break; + } // case 58 + case 80: + { + capacity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 80 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCloudRoutersIsMutable(); + cloudRouters_.add(s); + break; + } // case 106 + case 114: + { + sacAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 114 + 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 + ipRangeReservations_ = java.util.Collections.emptyList(); + + private void ensureIpRangeReservationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ipRangeReservations_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation>( + ipRangeReservations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder> + ipRangeReservationsBuilder_; + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getIpRangeReservationsList() { + if (ipRangeReservationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ipRangeReservations_); + } else { + return ipRangeReservationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getIpRangeReservationsCount() { + if (ipRangeReservationsBuilder_ == null) { + return ipRangeReservations_.size(); + } else { + return ipRangeReservationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + getIpRangeReservations(int index) { + if (ipRangeReservationsBuilder_ == null) { + return ipRangeReservations_.get(index); + } else { + return ipRangeReservationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpRangeReservations( + int index, com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation value) { + if (ipRangeReservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.set(index, value); + onChanged(); + } else { + ipRangeReservationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpRangeReservations( + int index, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + builderForValue) { + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.set(index, builderForValue.build()); + onChanged(); + } else { + ipRangeReservationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpRangeReservations( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation value) { + if (ipRangeReservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.add(value); + onChanged(); + } else { + ipRangeReservationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpRangeReservations( + int index, com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation value) { + if (ipRangeReservationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.add(index, value); + onChanged(); + } else { + ipRangeReservationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpRangeReservations( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + builderForValue) { + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.add(builderForValue.build()); + onChanged(); + } else { + ipRangeReservationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addIpRangeReservations( + int index, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + builderForValue) { + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.add(index, builderForValue.build()); + onChanged(); + } else { + ipRangeReservationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllIpRangeReservations( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation> + values) { + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ipRangeReservations_); + onChanged(); + } else { + ipRangeReservationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIpRangeReservations() { + if (ipRangeReservationsBuilder_ == null) { + ipRangeReservations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ipRangeReservationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeIpRangeReservations(int index) { + if (ipRangeReservationsBuilder_ == null) { + ensureIpRangeReservationsIsMutable(); + ipRangeReservations_.remove(index); + onChanged(); + } else { + ipRangeReservationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + getIpRangeReservationsBuilder(int index) { + return internalGetIpRangeReservationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder + getIpRangeReservationsOrBuilder(int index) { + if (ipRangeReservationsBuilder_ == null) { + return ipRangeReservations_.get(index); + } else { + return ipRangeReservationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder> + getIpRangeReservationsOrBuilderList() { + if (ipRangeReservationsBuilder_ != null) { + return ipRangeReservationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ipRangeReservations_); + } + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + addIpRangeReservationsBuilder() { + return internalGetIpRangeReservationsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder + addIpRangeReservationsBuilder(int index) { + return internalGetIpRangeReservationsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation + .getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of IP ranges that are reserved for this gateway's internal
+     * intfrastructure.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder> + getIpRangeReservationsBuilderList() { + return internalGetIpRangeReservationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder> + internalGetIpRangeReservationsFieldBuilder() { + if (ipRangeReservationsBuilder_ == null) { + ipRangeReservationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation.Builder, + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder>( + ipRangeReservations_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + ipRangeReservations_ = null; + } + return ipRangeReservationsBuilder_; + } + + private int capacity_ = 0; + + /** + * + * + *
+     * Optional. The aggregate processing capacity of this gateway.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for capacity. + */ + @java.lang.Override + public int getCapacityValue() { + return capacity_; + } + + /** + * + * + *
+     * Optional. The aggregate processing capacity of this gateway.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for capacity to set. + * @return This builder for chaining. + */ + public Builder setCapacityValue(int value) { + capacity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregate processing capacity of this gateway.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The capacity. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity getCapacity() { + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity result = + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity.forNumber(capacity_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The aggregate processing capacity of this gateway.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The capacity to set. + * @return This builder for chaining. + */ + public Builder setCapacity( + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + capacity_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The aggregate processing capacity of this gateway.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCapacity() { + bitField0_ = (bitField0_ & ~0x00000002); + capacity_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList cloudRouters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCloudRoutersIsMutable() { + if (!cloudRouters_.isModifiable()) { + cloudRouters_ = new com.google.protobuf.LazyStringArrayList(cloudRouters_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the cloudRouters. + */ + public com.google.protobuf.ProtocolStringList getCloudRoutersList() { + cloudRouters_.makeImmutable(); + return cloudRouters_; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of cloudRouters. + */ + public int getCloudRoutersCount() { + return cloudRouters_.size(); + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The cloudRouters at the given index. + */ + public java.lang.String getCloudRouters(int index) { + return cloudRouters_.get(index); + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the cloudRouters at the given index. + */ + public com.google.protobuf.ByteString getCloudRoutersBytes(int index) { + return cloudRouters_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The cloudRouters to set. + * @return This builder for chaining. + */ + public Builder setCloudRouters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudRoutersIsMutable(); + cloudRouters_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The cloudRouters to add. + * @return This builder for chaining. + */ + public Builder addCloudRouters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudRoutersIsMutable(); + cloudRouters_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The cloudRouters to add. + * @return This builder for chaining. + */ + public Builder addAllCloudRouters(java.lang.Iterable values) { + ensureCloudRoutersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cloudRouters_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCloudRouters() { + cloudRouters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Cloud Routers that are connected to this gateway.
+     * Should be in the form:
+     * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+     * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the cloudRouters to add. + * @return This builder for chaining. + */ + public Builder addCloudRoutersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCloudRoutersIsMutable(); + cloudRouters_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sacAttachment_ = ""; + + /** + * + * + *
+     * Output only. The URI of the connected SACAttachment.
+     * Should be in the form:
+     * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+     * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sacAttachment. + */ + public java.lang.String getSacAttachment() { + java.lang.Object ref = sacAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sacAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the connected SACAttachment.
+     * Should be in the form:
+     * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+     * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sacAttachment. + */ + public com.google.protobuf.ByteString getSacAttachmentBytes() { + java.lang.Object ref = sacAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sacAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the connected SACAttachment.
+     * Should be in the form:
+     * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+     * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The sacAttachment to set. + * @return This builder for chaining. + */ + public Builder setSacAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sacAttachment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the connected SACAttachment.
+     * Should be in the form:
+     * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+     * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSacAttachment() { + sacAttachment_ = getDefaultInstance().getSacAttachment(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the connected SACAttachment.
+     * Should be in the form:
+     * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+     * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for sacAttachment to set. + * @return This builder for chaining. + */ + public Builder setSacAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sacAttachment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Gateway) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Gateway) + private static final com.google.cloud.networkconnectivity.v1beta.Gateway DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Gateway(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Gateway getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Gateway 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.networkconnectivity.v1beta.Gateway getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRoute.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRoute.java new file mode 100644 index 000000000000..dfd74c562c5a --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRoute.java @@ -0,0 +1,2871 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A gateway advertised route is a route that a gateway spoke advertises
+ * somewhere.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute} + */ +@com.google.protobuf.Generated +public final class GatewayAdvertisedRoute extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) + GatewayAdvertisedRouteOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GatewayAdvertisedRoute"); + } + + // Use GatewayAdvertisedRoute.newBuilder() to construct. + private GatewayAdvertisedRoute(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GatewayAdvertisedRoute() { + name_ = ""; + description_ = ""; + uniqueId_ = ""; + state_ = 0; + ipRange_ = ""; + recipient_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.class, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder.class); + } + + /** + * + * + *
+   * The recipient of an advertised route.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient} + */ + public enum Recipient implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No recipient specified. By default routes are advertised to the hub.
+     * 
+ * + * RECIPIENT_UNSPECIFIED = 0; + */ + RECIPIENT_UNSPECIFIED(0), + /** + * + * + *
+     * Advertises a route toward the hub. Other spokes reachable from this spoke
+     * will receive the route.
+     * 
+ * + * ADVERTISE_TO_HUB = 1; + */ + ADVERTISE_TO_HUB(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Recipient"); + } + + /** + * + * + *
+     * No recipient specified. By default routes are advertised to the hub.
+     * 
+ * + * RECIPIENT_UNSPECIFIED = 0; + */ + public static final int RECIPIENT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Advertises a route toward the hub. Other spokes reachable from this spoke
+     * will receive the route.
+     * 
+ * + * ADVERTISE_TO_HUB = 1; + */ + public static final int ADVERTISE_TO_HUB_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Recipient 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 Recipient forNumber(int value) { + switch (value) { + case 0: + return RECIPIENT_UNSPECIFIED; + case 1: + return ADVERTISE_TO_HUB; + 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 Recipient findValueByNumber(int number) { + return Recipient.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Recipient[] VALUES = values(); + + public static Recipient 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 Recipient(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the gateway advertised route. Route names must be
+   * unique and use the following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the gateway advertised route. Route names must be
+   * unique and use the following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the gateway advertised route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the gateway advertised route 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. The time the gateway advertised route 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. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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; + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * An optional description of the gateway advertised route.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * An optional description of the gateway advertised route.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNIQUE_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the gateway advertised route.
+   * This value is unique across all gateway advertised route resources. If a
+   * gateway advertised route is deleted and another with the same name is
+   * created, the new route is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + @java.lang.Override + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the gateway advertised route.
+   * This value is unique across all gateway advertised route resources. If a
+   * gateway advertised route is deleted and another with the same name is
+   * created, the new route is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of this gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of this gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED : result; + } + + public static final int IP_RANGE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipRange_ = ""; + + /** + * + * + *
+   * Immutable. This route's advertised IP address range. Must be a valid
+   * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+   * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+   * IPv6,
+   * `/128`.
+   * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The ipRange. + */ + @java.lang.Override + public java.lang.String getIpRange() { + java.lang.Object ref = ipRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipRange_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. This route's advertised IP address range. Must be a valid
+   * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+   * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+   * IPv6,
+   * `/128`.
+   * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for ipRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpRangeBytes() { + java.lang.Object ref = ipRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 9; + private int priority_ = 0; + + /** + * + * + *
+   * Optional. The priority of this advertised route. You can choose a value
+   * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+   * priority of `100` to the ranges.
+   * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the priority field is set. + */ + @java.lang.Override + public boolean hasPriority() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The priority of this advertised route. You can choose a value
+   * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+   * priority of `100` to the ranges.
+   * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int RECIPIENT_FIELD_NUMBER = 10; + private int recipient_ = 0; + + /** + * + * + *
+   * Optional. The recipient of this advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recipient. + */ + @java.lang.Override + public int getRecipientValue() { + return recipient_; + } + + /** + * + * + *
+   * Optional. The recipient of this advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recipient. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient + getRecipient() { + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient result = + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient.forNumber( + recipient_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, ipRange_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeInt32(9, priority_); + } + if (recipient_ + != com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient + .RECIPIENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, recipient_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, ipRange_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, priority_); + } + if (recipient_ + != com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient + .RECIPIENT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, recipient_); + } + 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.networkconnectivity.v1beta.GatewayAdvertisedRoute)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute other = + (com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; + if (!getIpRange().equals(other.getIpRange())) return false; + if (hasPriority() != other.hasPriority()) return false; + if (hasPriority()) { + if (getPriority() != other.getPriority()) return false; + } + if (recipient_ != other.recipient_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + IP_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpRange().hashCode(); + if (hasPriority()) { + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + } + hash = (37 * hash) + RECIPIENT_FIELD_NUMBER; + hash = (53 * hash) + recipient_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute 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.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute 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.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A gateway advertised route is a route that a gateway spoke advertises
+   * somewhere.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.class, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uniqueId_ = ""; + state_ = 0; + ipRange_ = ""; + priority_ = 0; + recipient_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute build() { + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute result = + new com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uniqueId_ = uniqueId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.ipRange_ = ipRange_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.priority_ = priority_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.recipient_ = recipient_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUniqueId().isEmpty()) { + uniqueId_ = other.uniqueId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getIpRange().isEmpty()) { + ipRange_ = other.ipRange_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasPriority()) { + setPriority(other.getPriority()); + } + if (other.recipient_ != 0) { + setRecipientValue(other.getRecipientValue()); + } + 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( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uniqueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + ipRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + recipient_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the gateway advertised route. Route names must be
+     * unique and use the following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the gateway advertised route. Route names must be
+     * unique and use the following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the gateway advertised route. Route names must be
+     * unique and use the following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the gateway advertised route. Route names must be
+     * unique and use the following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the gateway advertised route. Route names must be
+     * unique and use the following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route 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. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route 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. The time the gateway advertised route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the gateway advertised route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * An optional description of the gateway advertised route.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An optional description of the gateway advertised route.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An optional description of the gateway advertised route.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the gateway advertised route.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the gateway advertised route.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the gateway advertised route.
+     * This value is unique across all gateway advertised route resources. If a
+     * gateway advertised route is deleted and another with the same name is
+     * created, the new route is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the gateway advertised route.
+     * This value is unique across all gateway advertised route resources. If a
+     * gateway advertised route is deleted and another with the same name is
+     * created, the new route is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the gateway advertised route.
+     * This value is unique across all gateway advertised route resources. If a
+     * gateway advertised route is deleted and another with the same name is
+     * created, the new route is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uniqueId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the gateway advertised route.
+     * This value is unique across all gateway advertised route resources. If a
+     * gateway advertised route is deleted and another with the same name is
+     * created, the new route is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUniqueId() { + uniqueId_ = getDefaultInstance().getUniqueId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the gateway advertised route.
+     * This value is unique across all gateway advertised route resources. If a
+     * gateway advertised route is deleted and another with the same name is
+     * created, the new route is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uniqueId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of this gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this gateway advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object ipRange_ = ""; + + /** + * + * + *
+     * Immutable. This route's advertised IP address range. Must be a valid
+     * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+     * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+     * IPv6,
+     * `/128`.
+     * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The ipRange. + */ + public java.lang.String getIpRange() { + java.lang.Object ref = ipRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. This route's advertised IP address range. Must be a valid
+     * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+     * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+     * IPv6,
+     * `/128`.
+     * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for ipRange. + */ + public com.google.protobuf.ByteString getIpRangeBytes() { + java.lang.Object ref = ipRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. This route's advertised IP address range. Must be a valid
+     * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+     * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+     * IPv6,
+     * `/128`.
+     * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The ipRange to set. + * @return This builder for chaining. + */ + public Builder setIpRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipRange_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. This route's advertised IP address range. Must be a valid
+     * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+     * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+     * IPv6,
+     * `/128`.
+     * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearIpRange() { + ipRange_ = getDefaultInstance().getIpRange(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. This route's advertised IP address range. Must be a valid
+     * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+     * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+     * IPv6,
+     * `/128`.
+     * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for ipRange to set. + * @return This builder for chaining. + */ + public Builder setIpRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipRange_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int priority_; + + /** + * + * + *
+     * Optional. The priority of this advertised route. You can choose a value
+     * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+     * priority of `100` to the ranges.
+     * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the priority field is set. + */ + @java.lang.Override + public boolean hasPriority() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. The priority of this advertised route. You can choose a value
+     * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+     * priority of `100` to the ranges.
+     * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + /** + * + * + *
+     * Optional. The priority of this advertised route. You can choose a value
+     * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+     * priority of `100` to the ranges.
+     * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The priority of this advertised route. You can choose a value
+     * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+     * priority of `100` to the ranges.
+     * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000100); + priority_ = 0; + onChanged(); + return this; + } + + private int recipient_ = 0; + + /** + * + * + *
+     * Optional. The recipient of this advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recipient. + */ + @java.lang.Override + public int getRecipientValue() { + return recipient_; + } + + /** + * + * + *
+     * Optional. The recipient of this advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for recipient to set. + * @return This builder for chaining. + */ + public Builder setRecipientValue(int value) { + recipient_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The recipient of this advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recipient. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient + getRecipient() { + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient result = + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient.forNumber( + recipient_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The recipient of this advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The recipient to set. + * @return This builder for chaining. + */ + public Builder setRecipient( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + recipient_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The recipient of this advertised route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRecipient() { + bitField0_ = (bitField0_ & ~0x00000200); + recipient_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) + private static final com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GatewayAdvertisedRoute 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.networkconnectivity.v1beta.GatewayAdvertisedRoute + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteName.java new file mode 100644 index 000000000000..279c29a833b4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteName.java @@ -0,0 +1,270 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 GatewayAdvertisedRouteName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SPOKE_GATEWAY_ADVERTISED_ROUTE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String spoke; + private final String gatewayAdvertisedRoute; + + @Deprecated + protected GatewayAdvertisedRouteName() { + project = null; + location = null; + spoke = null; + gatewayAdvertisedRoute = null; + } + + private GatewayAdvertisedRouteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + spoke = Preconditions.checkNotNull(builder.getSpoke()); + gatewayAdvertisedRoute = Preconditions.checkNotNull(builder.getGatewayAdvertisedRoute()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSpoke() { + return spoke; + } + + public String getGatewayAdvertisedRoute() { + return gatewayAdvertisedRoute; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GatewayAdvertisedRouteName of( + String project, String location, String spoke, String gatewayAdvertisedRoute) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSpoke(spoke) + .setGatewayAdvertisedRoute(gatewayAdvertisedRoute) + .build(); + } + + public static String format( + String project, String location, String spoke, String gatewayAdvertisedRoute) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSpoke(spoke) + .setGatewayAdvertisedRoute(gatewayAdvertisedRoute) + .build() + .toString(); + } + + public static GatewayAdvertisedRouteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SPOKE_GATEWAY_ADVERTISED_ROUTE.validatedMatch( + formattedString, + "GatewayAdvertisedRouteName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("spoke"), + matchMap.get("gateway_advertised_route")); + } + + 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 (GatewayAdvertisedRouteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SPOKE_GATEWAY_ADVERTISED_ROUTE.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 (spoke != null) { + fieldMapBuilder.put("spoke", spoke); + } + if (gatewayAdvertisedRoute != null) { + fieldMapBuilder.put("gateway_advertised_route", gatewayAdvertisedRoute); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SPOKE_GATEWAY_ADVERTISED_ROUTE.instantiate( + "project", + project, + "location", + location, + "spoke", + spoke, + "gateway_advertised_route", + gatewayAdvertisedRoute); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + GatewayAdvertisedRouteName that = ((GatewayAdvertisedRouteName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.spoke, that.spoke) + && Objects.equals(this.gatewayAdvertisedRoute, that.gatewayAdvertisedRoute); + } + 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(spoke); + h *= 1000003; + h ^= Objects.hashCode(gatewayAdvertisedRoute); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route}. + */ + public static class Builder { + private String project; + private String location; + private String spoke; + private String gatewayAdvertisedRoute; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSpoke() { + return spoke; + } + + public String getGatewayAdvertisedRoute() { + return gatewayAdvertisedRoute; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSpoke(String spoke) { + this.spoke = spoke; + return this; + } + + public Builder setGatewayAdvertisedRoute(String gatewayAdvertisedRoute) { + this.gatewayAdvertisedRoute = gatewayAdvertisedRoute; + return this; + } + + private Builder(GatewayAdvertisedRouteName gatewayAdvertisedRouteName) { + this.project = gatewayAdvertisedRouteName.project; + this.location = gatewayAdvertisedRouteName.location; + this.spoke = gatewayAdvertisedRouteName.spoke; + this.gatewayAdvertisedRoute = gatewayAdvertisedRouteName.gatewayAdvertisedRoute; + } + + public GatewayAdvertisedRouteName build() { + return new GatewayAdvertisedRouteName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteOrBuilder.java new file mode 100644 index 000000000000..d8b62c3eea58 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayAdvertisedRouteOrBuilder.java @@ -0,0 +1,393 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GatewayAdvertisedRouteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the gateway advertised route. Route names must be
+   * unique and use the following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the gateway advertised route. Route names must be
+   * unique and use the following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the gateway advertised route 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. The time the gateway advertised route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the gateway advertised route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the gateway advertised route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional description of the gateway advertised route.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * An optional description of the gateway advertised route.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the gateway advertised route.
+   * This value is unique across all gateway advertised route resources. If a
+   * gateway advertised route is deleted and another with the same name is
+   * created, the new route is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + java.lang.String getUniqueId(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the gateway advertised route.
+   * This value is unique across all gateway advertised route resources. If a
+   * gateway advertised route is deleted and another with the same name is
+   * created, the new route is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + com.google.protobuf.ByteString getUniqueIdBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this gateway advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+   * Immutable. This route's advertised IP address range. Must be a valid
+   * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+   * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+   * IPv6,
+   * `/128`.
+   * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The ipRange. + */ + java.lang.String getIpRange(); + + /** + * + * + *
+   * Immutable. This route's advertised IP address range. Must be a valid
+   * CIDR-formatted prefix. If an IP address is provided without a subnet mask,
+   * it is interpreted as, for IPv4, a `/32` singular IP address range, and, for
+   * IPv6,
+   * `/128`.
+   * 
+ * + * string ip_range = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for ipRange. + */ + com.google.protobuf.ByteString getIpRangeBytes(); + + /** + * + * + *
+   * Optional. The priority of this advertised route. You can choose a value
+   * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+   * priority of `100` to the ranges.
+   * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the priority field is set. + */ + boolean hasPriority(); + + /** + * + * + *
+   * Optional. The priority of this advertised route. You can choose a value
+   * from `0` to `65335`. If you don't provide a value, Google Cloud assigns a
+   * priority of `100` to the ranges.
+   * 
+ * + * optional int32 priority = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * Optional. The recipient of this advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for recipient. + */ + int getRecipientValue(); + + /** + * + * + *
+   * Optional. The recipient of this advertised route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient recipient = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The recipient. + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Recipient getRecipient(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayOrBuilder.java new file mode 100644 index 000000000000..bb2c65958fe9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GatewayOrBuilder.java @@ -0,0 +1,229 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GatewayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Gateway) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getIpRangeReservationsList(); + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation getIpRangeReservations( + int index); + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getIpRangeReservationsCount(); + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder> + getIpRangeReservationsOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of IP ranges that are reserved for this gateway's internal
+   * intfrastructure.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservation ip_range_reservations = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationOrBuilder + getIpRangeReservationsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The aggregate processing capacity of this gateway.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for capacity. + */ + int getCapacityValue(); + + /** + * + * + *
+   * Optional. The aggregate processing capacity of this gateway.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity capacity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The capacity. + */ + com.google.cloud.networkconnectivity.v1beta.Gateway.GatewayCapacity getCapacity(); + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the cloudRouters. + */ + java.util.List getCloudRoutersList(); + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of cloudRouters. + */ + int getCloudRoutersCount(); + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The cloudRouters at the given index. + */ + java.lang.String getCloudRouters(int index); + + /** + * + * + *
+   * Output only. The list of Cloud Routers that are connected to this gateway.
+   * Should be in the form:
+   * https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router}
+   * 
+ * + * repeated string cloud_routers = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the cloudRouters at the given index. + */ + com.google.protobuf.ByteString getCloudRoutersBytes(int index); + + /** + * + * + *
+   * Output only. The URI of the connected SACAttachment.
+   * Should be in the form:
+   * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+   * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The sacAttachment. + */ + java.lang.String getSacAttachment(); + + /** + * + * + *
+   * Output only. The URI of the connected SACAttachment.
+   * Should be in the form:
+   * projects/{project}/locations/{location}/sacAttachments/{sac_attachment}
+   * 
+ * + * + * string sac_attachment = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sacAttachment. + */ + com.google.protobuf.ByteString getSacAttachmentBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequest.java new file mode 100644 index 000000000000..25779f097a42 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequest.java @@ -0,0 +1,620 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to get the details of a `Destination` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetDestinationRequest} + */ +@com.google.protobuf.Generated +public final class GetDestinationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetDestinationRequest) + GetDestinationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetDestinationRequest"); + } + + // Use GetDestinationRequest.newBuilder() to construct. + private GetDestinationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetDestinationRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `Destination` resource to get.
+   * 
+ * + * + * 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 `Destination` resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest) 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.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest 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.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest 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.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to get the details of a `Destination` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetDestinationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetDestinationRequest) + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetDestinationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest.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 `Destination` resource to get.
+     * 
+ * + * + * 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 `Destination` resource to get.
+     * 
+ * + * + * 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 `Destination` resource to get.
+     * 
+ * + * + * 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 `Destination` resource to get.
+     * 
+ * + * + * 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 `Destination` resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetDestinationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetDestinationRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDestinationRequest 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.networkconnectivity.v1beta.GetDestinationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequestOrBuilder.java new file mode 100644 index 000000000000..bb4290cf28b7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetDestinationRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetDestinationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetDestinationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `Destination` resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `Destination` resource to get.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequest.java new file mode 100644 index 000000000000..ee03a31e0cf7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequest.java @@ -0,0 +1,637 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.GetGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.GetGatewayAdvertisedRoute].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest} + */ +@com.google.protobuf.Generated +public final class GetGatewayAdvertisedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + GetGatewayAdvertisedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetGatewayAdvertisedRouteRequest"); + } + + // Use GetGatewayAdvertisedRouteRequest.newBuilder() to construct. + private GetGatewayAdvertisedRouteRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetGatewayAdvertisedRouteRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the gateway advertised route to get.
+   * 
+ * + * + * 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 gateway advertised route to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) 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.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.GetGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.GetGatewayAdvertisedRoute].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + .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 gateway advertised route to get.
+     * 
+ * + * + * 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 gateway advertised route to get.
+     * 
+ * + * + * 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 gateway advertised route to get.
+     * 
+ * + * + * 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 gateway advertised route to get.
+     * 
+ * + * + * 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 gateway advertised route to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGatewayAdvertisedRouteRequest 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.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..84fc63e7baf9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGatewayAdvertisedRouteRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetGatewayAdvertisedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the gateway advertised route to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the gateway advertised route to get.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequest.java new file mode 100644 index 000000000000..94fed7fb4edd --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequest.java @@ -0,0 +1,613 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.GetGroup][google.cloud.networkconnectivity.v1beta.HubService.GetGroup].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetGroupRequest} + */ +@com.google.protobuf.Generated +public final class GetGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetGroupRequest) + GetGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetGroupRequest"); + } + + // Use GetGroupRequest.newBuilder() to construct. + private GetGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetGroupRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the route table 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 route table 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetGroupRequest) 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.networkconnectivity.v1beta.GetGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest 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.networkconnectivity.v1beta.GetGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest 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.networkconnectivity.v1beta.GetGroupRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.GetGroup][google.cloud.networkconnectivity.v1beta.HubService.GetGroup].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetGroupRequest) + com.google.cloud.networkconnectivity.v1beta.GetGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGroupRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGroupRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetGroupRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetGroupRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.GetGroupRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetGroupRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetGroupRequest other) { + if (other == com.google.cloud.networkconnectivity.v1beta.GetGroupRequest.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 route table 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 route table 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 route table 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 route table 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 route table 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetGroupRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetGroupRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetGroupRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetGroupRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGroupRequest 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.networkconnectivity.v1beta.GetGroupRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequestOrBuilder.java new file mode 100644 index 000000000000..fd6eee9e85e4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetGroupRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route table 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 route table 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequest.java new file mode 100644 index 000000000000..62931e289a40 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequest.java @@ -0,0 +1,615 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.GetHub][google.cloud.networkconnectivity.v1beta.HubService.GetHub]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetHubRequest} + */ +@com.google.protobuf.Generated +public final class GetHubRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetHubRequest) + GetHubRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetHubRequest"); + } + + // Use GetHubRequest.newBuilder() to construct. + private GetHubRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetHubRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetHubRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub resource to get.
+   * 
+ * + * + * 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 hub resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetHubRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetHubRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetHubRequest) 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.networkconnectivity.v1beta.GetHubRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest 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.networkconnectivity.v1beta.GetHubRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest 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.networkconnectivity.v1beta.GetHubRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.GetHub][google.cloud.networkconnectivity.v1beta.HubService.GetHub]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetHubRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetHubRequest) + com.google.cloud.networkconnectivity.v1beta.GetHubRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetHubRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetHubRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetHubRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetHubRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetHubRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetHubRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetHubRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetHubRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetHubRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.GetHubRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetHubRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetHubRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetHubRequest other) { + if (other == com.google.cloud.networkconnectivity.v1beta.GetHubRequest.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 hub resource to get.
+     * 
+ * + * + * 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 hub resource to get.
+     * 
+ * + * + * 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 hub resource to get.
+     * 
+ * + * + * 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 hub resource to get.
+     * 
+ * + * + * 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 hub resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetHubRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetHubRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetHubRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetHubRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetHubRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetHubRequest 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.networkconnectivity.v1beta.GetHubRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequestOrBuilder.java new file mode 100644 index 000000000000..7db3f6848e4c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetHubRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetHubRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetHubRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub resource to get.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequest.java new file mode 100644 index 000000000000..7f9d730ba833 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to get the details of a `MulticloudDataTransferConfig`
+ * resource.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest} + */ +@com.google.protobuf.Generated +public final class GetMulticloudDataTransferConfigRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + GetMulticloudDataTransferConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetMulticloudDataTransferConfigRequest"); + } + + // Use GetMulticloudDataTransferConfigRequest.newBuilder() to construct. + private GetMulticloudDataTransferConfigRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetMulticloudDataTransferConfigRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to get.
+   * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) 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.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to get the details of a `MulticloudDataTransferConfig`
+   * resource.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + build() { + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + .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 `MulticloudDataTransferConfig` resource to get.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to get.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to get.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to get.
+     * 
+ * + * + * 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 `MulticloudDataTransferConfig` resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMulticloudDataTransferConfigRequest 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.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequestOrBuilder.java new file mode 100644 index 000000000000..93f11f96e2c6 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferConfigRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetMulticloudDataTransferConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `MulticloudDataTransferConfig` resource to get.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequest.java new file mode 100644 index 000000000000..8e6e048f5492 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequest.java @@ -0,0 +1,682 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to check if a service in your project in a region is
+ * eligible for Data Transfer Essentials configuration.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest} + */ +@com.google.protobuf.Generated +public final class GetMulticloudDataTransferSupportedServiceRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest) + GetMulticloudDataTransferSupportedServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetMulticloudDataTransferSupportedServiceRequest"); + } + + // Use GetMulticloudDataTransferSupportedServiceRequest.newBuilder() to construct. + private GetMulticloudDataTransferSupportedServiceRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetMulticloudDataTransferSupportedServiceRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.class, + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the service.
+   * 
+ * + * + * 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 service.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + other = + (com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest) + 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.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + 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.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + 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.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to check if a service in your project in a region is
+   * eligible for Data Transfer Essentials configuration.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest) + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.class, + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetMulticloudDataTransferSupportedServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + build() { + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + result = + new com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest.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 service.
+     * 
+ * + * + * 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 service.
+     * 
+ * + * + * 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 service.
+     * 
+ * + * + * 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 service.
+     * 
+ * + * + * 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 service.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser< + GetMulticloudDataTransferSupportedServiceRequest>() { + @java.lang.Override + public GetMulticloudDataTransferSupportedServiceRequest 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.networkconnectivity.v1beta + .GetMulticloudDataTransferSupportedServiceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequestOrBuilder.java new file mode 100644 index 000000000000..baf518dfcfb8 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetMulticloudDataTransferSupportedServiceRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetMulticloudDataTransferSupportedServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the service.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequest.java new file mode 100644 index 000000000000..cc1fadb1b0ed --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequest.java @@ -0,0 +1,627 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [PolicyBasedRoutingService.GetPolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.GetPolicyBasedRoute]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest} + */ +@com.google.protobuf.Generated +public final class GetPolicyBasedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) + GetPolicyBasedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetPolicyBasedRouteRequest"); + } + + // Use GetPolicyBasedRouteRequest.newBuilder() to construct. + private GetPolicyBasedRouteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetPolicyBasedRouteRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the PolicyBasedRoute resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the PolicyBasedRoute resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) 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.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest 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.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest 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.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [PolicyBasedRoutingService.GetPolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.GetPolicyBasedRoute]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the PolicyBasedRoute resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the PolicyBasedRoute resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the PolicyBasedRoute resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the PolicyBasedRoute resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the PolicyBasedRoute resource to get.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyBasedRouteRequest 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.networkconnectivity.v1beta.GetPolicyBasedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..fcea32377741 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetPolicyBasedRouteRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetPolicyBasedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the PolicyBasedRoute resource to get.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the PolicyBasedRoute resource to get.
+   * 
+ * + * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequest.java new file mode 100644 index 000000000000..15a1373ac646 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequest.java @@ -0,0 +1,635 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for getting a RemoteTransportProfile.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest} + */ +@com.google.protobuf.Generated +public final class GetRemoteTransportProfileRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + GetRemoteTransportProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetRemoteTransportProfileRequest"); + } + + // Use GetRemoteTransportProfileRequest.newBuilder() to construct. + private GetRemoteTransportProfileRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetRemoteTransportProfileRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) 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.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + 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.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + 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.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a RemoteTransportProfile.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRemoteTransportProfileRequest 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.networkconnectivity.v1beta.GetRemoteTransportProfileRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequestOrBuilder.java new file mode 100644 index 000000000000..c6c13a682fb4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRemoteTransportProfileRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetRemoteTransportProfileRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequest.java new file mode 100644 index 000000000000..fcd0cbc9582f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequest.java @@ -0,0 +1,613 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.GetRoute][google.cloud.networkconnectivity.v1beta.HubService.GetRoute].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRouteRequest} + */ +@com.google.protobuf.Generated +public final class GetRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetRouteRequest) + GetRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetRouteRequest"); + } + + // Use GetRouteRequest.newBuilder() to construct. + private GetRouteRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetRouteRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the route 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 route 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetRouteRequest) 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.networkconnectivity.v1beta.GetRouteRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest 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.networkconnectivity.v1beta.GetRouteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest 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.networkconnectivity.v1beta.GetRouteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.GetRoute][google.cloud.networkconnectivity.v1beta.HubService.GetRoute].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetRouteRequest) + com.google.cloud.networkconnectivity.v1beta.GetRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.GetRouteRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetRouteRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetRouteRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetRouteRequest other) { + if (other == com.google.cloud.networkconnectivity.v1beta.GetRouteRequest.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 route 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 route 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 route 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 route 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 route 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetRouteRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRouteRequest 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.networkconnectivity.v1beta.GetRouteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequestOrBuilder.java new file mode 100644 index 000000000000..6512a7bfe87a --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route 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 route 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequest.java new file mode 100644 index 000000000000..396a8bb96f64 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequest.java @@ -0,0 +1,620 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.GetRouteTable][google.cloud.networkconnectivity.v1beta.HubService.GetRouteTable].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRouteTableRequest} + */ +@com.google.protobuf.Generated +public final class GetRouteTableRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) + GetRouteTableRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetRouteTableRequest"); + } + + // Use GetRouteTableRequest.newBuilder() to construct. + private GetRouteTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetRouteTableRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the route table 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 route table 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) 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.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest 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.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest 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.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.GetRouteTable][google.cloud.networkconnectivity.v1beta.HubService.GetRouteTable].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetRouteTableRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest.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 route table 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 route table 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 route table 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 route table 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 route table 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRouteTableRequest 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.networkconnectivity.v1beta.GetRouteTableRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequestOrBuilder.java new file mode 100644 index 000000000000..239ad25d7c77 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetRouteTableRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetRouteTableRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetRouteTableRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the route table 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 route table 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequest.java new file mode 100644 index 000000000000..53eaba35709c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequest.java @@ -0,0 +1,613 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.GetSpoke][google.cloud.networkconnectivity.v1beta.HubService.GetSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetSpokeRequest} + */ +@com.google.protobuf.Generated +public final class GetSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetSpokeRequest) + GetSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetSpokeRequest"); + } + + // Use GetSpokeRequest.newBuilder() to construct. + private GetSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetSpokeRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the spoke 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 spoke 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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest) 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.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest 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.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest 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.networkconnectivity.v1beta.GetSpokeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.GetSpoke][google.cloud.networkconnectivity.v1beta.HubService.GetSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest other) { + if (other == com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest.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 spoke 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 spoke 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 spoke 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 spoke 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 spoke 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSpokeRequest 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.networkconnectivity.v1beta.GetSpokeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..2a81b84ae501 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetSpokeRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the spoke 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 spoke 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequest.java new file mode 100644 index 000000000000..62701dc934f9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequest.java @@ -0,0 +1,615 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for getting a Transport's operational status.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetStatusRequest} + */ +@com.google.protobuf.Generated +public final class GetStatusRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetStatusRequest) + GetStatusRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetStatusRequest"); + } + + // Use GetStatusRequest.newBuilder() to construct. + private GetStatusRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetStatusRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetStatusRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetStatusRequest) 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.networkconnectivity.v1beta.GetStatusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest 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.networkconnectivity.v1beta.GetStatusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest 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.networkconnectivity.v1beta.GetStatusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Transport's operational status.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetStatusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetStatusRequest) + com.google.cloud.networkconnectivity.v1beta.GetStatusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetStatusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetStatusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetStatusRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetStatusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetStatusRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetStatusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetStatusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetStatusRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetStatusRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetStatusRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStatusRequest 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.networkconnectivity.v1beta.GetStatusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequestOrBuilder.java new file mode 100644 index 000000000000..b6503e33e825 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetStatusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetStatusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponse.java new file mode 100644 index 000000000000..39d133068663 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponse.java @@ -0,0 +1,1979 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for the response to getting a Transport's operational status.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetStatusResponse} + */ +@com.google.protobuf.Generated +public final class GetStatusResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetStatusResponse) + GetStatusResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetStatusResponse"); + } + + // Use GetStatusResponse.newBuilder() to construct. + private GetStatusResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetStatusResponse() { + overallStatus_ = 0; + operationalStatus_ = 0; + connectivityStatus_ = 0; + macSecStatus_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.class, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.Builder.class); + } + + /** + * + * + *
+   * The overall status of the Transport.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus} + */ + public enum OverallStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * OVERALL_STATUS_UNSPECIFIED = 0; + */ + OVERALL_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * Resource is active and operational.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * Resource is waiting for an activation key to be exchanged.
+     * 
+ * + * PENDING_KEY = 2; + */ + PENDING_KEY(2), + /** + * + * + *
+     * Activation keys have been exchanged and connectivity is being
+     * established.
+     * 
+ * + * CONFIGURING = 3; + */ + CONFIGURING(3), + /** + * + * + *
+     * VPC Peering has been taken down, or the NCC Spoke has been rejected.
+     * 
+ * + * DISCONNECTED = 4; + */ + DISCONNECTED(4), + /** + * + * + *
+     * User configuration is correct, but the configured capacity is
+     * operationally down.
+     * 
+ * + * DOWN = 5; + */ + DOWN(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OverallStatus"); + } + + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * OVERALL_STATUS_UNSPECIFIED = 0; + */ + public static final int OVERALL_STATUS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Resource is active and operational.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
+     * Resource is waiting for an activation key to be exchanged.
+     * 
+ * + * PENDING_KEY = 2; + */ + public static final int PENDING_KEY_VALUE = 2; + + /** + * + * + *
+     * Activation keys have been exchanged and connectivity is being
+     * established.
+     * 
+ * + * CONFIGURING = 3; + */ + public static final int CONFIGURING_VALUE = 3; + + /** + * + * + *
+     * VPC Peering has been taken down, or the NCC Spoke has been rejected.
+     * 
+ * + * DISCONNECTED = 4; + */ + public static final int DISCONNECTED_VALUE = 4; + + /** + * + * + *
+     * User configuration is correct, but the configured capacity is
+     * operationally down.
+     * 
+ * + * DOWN = 5; + */ + public static final int DOWN_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 OverallStatus 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 OverallStatus forNumber(int value) { + switch (value) { + case 0: + return OVERALL_STATUS_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return PENDING_KEY; + case 3: + return CONFIGURING; + case 4: + return DISCONNECTED; + case 5: + return DOWN; + 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 OverallStatus findValueByNumber(int number) { + return OverallStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OverallStatus[] VALUES = values(); + + public static OverallStatus 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 OverallStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus) + } + + /** + * + * + *
+   * The operational status of the underlying networking components.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus} + */ + public enum OperationalStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * OPERATIONAL_STATUS_UNSPECIFIED = 0; + */ + OPERATIONAL_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * Protected capacity is available and networking components show as up.
+     * 
+ * + * OPERATIONAL_STATUS_ACTIVE = 1; + */ + OPERATIONAL_STATUS_ACTIVE(1), + /** + * + * + *
+     * Protected capacity is showing as operationally down.
+     * 
+ * + * OPERATIONAL_STATUS_DOWN = 2; + */ + OPERATIONAL_STATUS_DOWN(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationalStatus"); + } + + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * OPERATIONAL_STATUS_UNSPECIFIED = 0; + */ + public static final int OPERATIONAL_STATUS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Protected capacity is available and networking components show as up.
+     * 
+ * + * OPERATIONAL_STATUS_ACTIVE = 1; + */ + public static final int OPERATIONAL_STATUS_ACTIVE_VALUE = 1; + + /** + * + * + *
+     * Protected capacity is showing as operationally down.
+     * 
+ * + * OPERATIONAL_STATUS_DOWN = 2; + */ + public static final int OPERATIONAL_STATUS_DOWN_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 OperationalStatus 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 OperationalStatus forNumber(int value) { + switch (value) { + case 0: + return OPERATIONAL_STATUS_UNSPECIFIED; + case 1: + return OPERATIONAL_STATUS_ACTIVE; + case 2: + return OPERATIONAL_STATUS_DOWN; + 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 OperationalStatus findValueByNumber(int number) { + return OperationalStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final OperationalStatus[] VALUES = values(); + + public static OperationalStatus 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 OperationalStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus) + } + + /** + * + * + *
+   * Current status of connectivity to the local GCP resource. This reflects
+   * whether the VPC Peering or NCC Hub appears correctly configured.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus} + */ + public enum ConnectivityStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * CONNECTIVITY_STATUS_UNSPECIFIED = 0; + */ + CONNECTIVITY_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * VPC Peering or the NCC Hub appear to be correctly established.
+     * 
+ * + * CONNECTIVITY_STATUS_CONNECTED = 1; + */ + CONNECTIVITY_STATUS_CONNECTED(1), + /** + * + * + *
+     * VPC Peering has been taken down, or the NCC Spoke has been rejected.
+     * 
+ * + * CONNECTIVITY_STATUS_DISCONNECTED = 2; + */ + CONNECTIVITY_STATUS_DISCONNECTED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConnectivityStatus"); + } + + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * CONNECTIVITY_STATUS_UNSPECIFIED = 0; + */ + public static final int CONNECTIVITY_STATUS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * VPC Peering or the NCC Hub appear to be correctly established.
+     * 
+ * + * CONNECTIVITY_STATUS_CONNECTED = 1; + */ + public static final int CONNECTIVITY_STATUS_CONNECTED_VALUE = 1; + + /** + * + * + *
+     * VPC Peering has been taken down, or the NCC Spoke has been rejected.
+     * 
+ * + * CONNECTIVITY_STATUS_DISCONNECTED = 2; + */ + public static final int CONNECTIVITY_STATUS_DISCONNECTED_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 ConnectivityStatus 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 ConnectivityStatus forNumber(int value) { + switch (value) { + case 0: + return CONNECTIVITY_STATUS_UNSPECIFIED; + case 1: + return CONNECTIVITY_STATUS_CONNECTED; + case 2: + return CONNECTIVITY_STATUS_DISCONNECTED; + 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 ConnectivityStatus findValueByNumber(int number) { + return ConnectivityStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final ConnectivityStatus[] VALUES = values(); + + public static ConnectivityStatus 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 ConnectivityStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus) + } + + /** + * + * + *
+   * Current status of MACSec on the underlying network connectivity between GC
+   * and the partner.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus} + */ + public enum MacSecStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * MAC_SEC_STATUS_UNSPECIFIED = 0; + */ + MAC_SEC_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * MACSec is protecting the links and configured in fail closed.
+     * 
+ * + * MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED = 1; + */ + MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED(1), + /** + * + * + *
+     * MACSec is protecting the links and configured to fail open on at least
+     * one of the redundant links.
+     * 
+ * + * MAC_SEC_STATUS_ACTIVE_FAIL_OPEN = 2; + */ + MAC_SEC_STATUS_ACTIVE_FAIL_OPEN(2), + /** + * + * + *
+     * MACSec is not configured on at least one of the underlying links.
+     * 
+ * + * MAC_SEC_STATUS_NOT_CONFIGURED = 3; + */ + MAC_SEC_STATUS_NOT_CONFIGURED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MacSecStatus"); + } + + /** + * + * + *
+     * Unspecified status.
+     * 
+ * + * MAC_SEC_STATUS_UNSPECIFIED = 0; + */ + public static final int MAC_SEC_STATUS_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * MACSec is protecting the links and configured in fail closed.
+     * 
+ * + * MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED = 1; + */ + public static final int MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED_VALUE = 1; + + /** + * + * + *
+     * MACSec is protecting the links and configured to fail open on at least
+     * one of the redundant links.
+     * 
+ * + * MAC_SEC_STATUS_ACTIVE_FAIL_OPEN = 2; + */ + public static final int MAC_SEC_STATUS_ACTIVE_FAIL_OPEN_VALUE = 2; + + /** + * + * + *
+     * MACSec is not configured on at least one of the underlying links.
+     * 
+ * + * MAC_SEC_STATUS_NOT_CONFIGURED = 3; + */ + public static final int MAC_SEC_STATUS_NOT_CONFIGURED_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 MacSecStatus 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 MacSecStatus forNumber(int value) { + switch (value) { + case 0: + return MAC_SEC_STATUS_UNSPECIFIED; + case 1: + return MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED; + case 2: + return MAC_SEC_STATUS_ACTIVE_FAIL_OPEN; + case 3: + return MAC_SEC_STATUS_NOT_CONFIGURED; + 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 MacSecStatus findValueByNumber(int number) { + return MacSecStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final MacSecStatus[] VALUES = values(); + + public static MacSecStatus 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 MacSecStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus) + } + + public static final int OVERALL_STATUS_FIELD_NUMBER = 1; + private int overallStatus_ = 0; + + /** + * + * + *
+   * The overall status of the Transport. This field will always output the most
+   * critical status of the Transport. For example, if the connectivity is
+   * DISCONNECTED, and the underlying networking components are DOWN, then
+   * the overall status will be DOWN.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The enum numeric value on the wire for overallStatus. + */ + @java.lang.Override + public int getOverallStatusValue() { + return overallStatus_; + } + + /** + * + * + *
+   * The overall status of the Transport. This field will always output the most
+   * critical status of the Transport. For example, if the connectivity is
+   * DISCONNECTED, and the underlying networking components are DOWN, then
+   * the overall status will be DOWN.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The overallStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus + getOverallStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus.forNumber( + overallStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus.UNRECOGNIZED + : result; + } + + public static final int OPERATIONAL_STATUS_FIELD_NUMBER = 2; + private int operationalStatus_ = 0; + + /** + * + * + *
+   * The operational status of the underlying networking components.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The enum numeric value on the wire for operationalStatus. + */ + @java.lang.Override + public int getOperationalStatusValue() { + return operationalStatus_; + } + + /** + * + * + *
+   * The operational status of the underlying networking components.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The operationalStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + getOperationalStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus.forNumber( + operationalStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + .UNRECOGNIZED + : result; + } + + public static final int CONNECTIVITY_STATUS_FIELD_NUMBER = 3; + private int connectivityStatus_ = 0; + + /** + * + * + *
+   * Current status of connectivity to the local GCP resource. This reflects
+   * whether the VPC Peering or NCC Hub appears correctly configured.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The enum numeric value on the wire for connectivityStatus. + */ + @java.lang.Override + public int getConnectivityStatusValue() { + return connectivityStatus_; + } + + /** + * + * + *
+   * Current status of connectivity to the local GCP resource. This reflects
+   * whether the VPC Peering or NCC Hub appears correctly configured.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The connectivityStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + getConnectivityStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus.forNumber( + connectivityStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + .UNRECOGNIZED + : result; + } + + public static final int MAC_SEC_STATUS_FIELD_NUMBER = 4; + private int macSecStatus_ = 0; + + /** + * + * + *
+   * Current status of MACSec on the underlying network connectivity between GC
+   * and the partner.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The enum numeric value on the wire for macSecStatus. + */ + @java.lang.Override + public int getMacSecStatusValue() { + return macSecStatus_; + } + + /** + * + * + *
+   * Current status of MACSec on the underlying network connectivity between GC
+   * and the partner.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The macSecStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus + getMacSecStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus.forNumber( + macSecStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus.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 (overallStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus + .OVERALL_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, overallStatus_); + } + if (operationalStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + .OPERATIONAL_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, operationalStatus_); + } + if (connectivityStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + .CONNECTIVITY_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, connectivityStatus_); + } + if (macSecStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus + .MAC_SEC_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, macSecStatus_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (overallStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus + .OVERALL_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, overallStatus_); + } + if (operationalStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + .OPERATIONAL_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, operationalStatus_); + } + if (connectivityStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + .CONNECTIVITY_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, connectivityStatus_); + } + if (macSecStatus_ + != com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus + .MAC_SEC_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, macSecStatus_); + } + 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.networkconnectivity.v1beta.GetStatusResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse other = + (com.google.cloud.networkconnectivity.v1beta.GetStatusResponse) obj; + + if (overallStatus_ != other.overallStatus_) return false; + if (operationalStatus_ != other.operationalStatus_) return false; + if (connectivityStatus_ != other.connectivityStatus_) return false; + if (macSecStatus_ != other.macSecStatus_) 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) + OVERALL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + overallStatus_; + hash = (37 * hash) + OPERATIONAL_STATUS_FIELD_NUMBER; + hash = (53 * hash) + operationalStatus_; + hash = (37 * hash) + CONNECTIVITY_STATUS_FIELD_NUMBER; + hash = (53 * hash) + connectivityStatus_; + hash = (37 * hash) + MAC_SEC_STATUS_FIELD_NUMBER; + hash = (53 * hash) + macSecStatus_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse 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.networkconnectivity.v1beta.GetStatusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse 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.networkconnectivity.v1beta.GetStatusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for the response to getting a Transport's operational status.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetStatusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetStatusResponse) + com.google.cloud.networkconnectivity.v1beta.GetStatusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.class, + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + overallStatus_ = 0; + operationalStatus_ = 0; + connectivityStatus_ = 0; + macSecStatus_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse build() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse result = + new com.google.cloud.networkconnectivity.v1beta.GetStatusResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.overallStatus_ = overallStatus_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.operationalStatus_ = operationalStatus_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.connectivityStatus_ = connectivityStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.macSecStatus_ = macSecStatus_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetStatusResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetStatusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.GetStatusResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.getDefaultInstance()) + return this; + if (other.overallStatus_ != 0) { + setOverallStatusValue(other.getOverallStatusValue()); + } + if (other.operationalStatus_ != 0) { + setOperationalStatusValue(other.getOperationalStatusValue()); + } + if (other.connectivityStatus_ != 0) { + setConnectivityStatusValue(other.getConnectivityStatusValue()); + } + if (other.macSecStatus_ != 0) { + setMacSecStatusValue(other.getMacSecStatusValue()); + } + 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: + { + overallStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + operationalStatus_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + connectivityStatus_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + macSecStatus_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int overallStatus_ = 0; + + /** + * + * + *
+     * The overall status of the Transport. This field will always output the most
+     * critical status of the Transport. For example, if the connectivity is
+     * DISCONNECTED, and the underlying networking components are DOWN, then
+     * the overall status will be DOWN.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The enum numeric value on the wire for overallStatus. + */ + @java.lang.Override + public int getOverallStatusValue() { + return overallStatus_; + } + + /** + * + * + *
+     * The overall status of the Transport. This field will always output the most
+     * critical status of the Transport. For example, if the connectivity is
+     * DISCONNECTED, and the underlying networking components are DOWN, then
+     * the overall status will be DOWN.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @param value The enum numeric value on the wire for overallStatus to set. + * @return This builder for chaining. + */ + public Builder setOverallStatusValue(int value) { + overallStatus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The overall status of the Transport. This field will always output the most
+     * critical status of the Transport. For example, if the connectivity is
+     * DISCONNECTED, and the underlying networking components are DOWN, then
+     * the overall status will be DOWN.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The overallStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus + getOverallStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus.forNumber( + overallStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The overall status of the Transport. This field will always output the most
+     * critical status of the Transport. For example, if the connectivity is
+     * DISCONNECTED, and the underlying networking components are DOWN, then
+     * the overall status will be DOWN.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @param value The overallStatus to set. + * @return This builder for chaining. + */ + public Builder setOverallStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + overallStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The overall status of the Transport. This field will always output the most
+     * critical status of the Transport. For example, if the connectivity is
+     * DISCONNECTED, and the underlying networking components are DOWN, then
+     * the overall status will be DOWN.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearOverallStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + overallStatus_ = 0; + onChanged(); + return this; + } + + private int operationalStatus_ = 0; + + /** + * + * + *
+     * The operational status of the underlying networking components.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The enum numeric value on the wire for operationalStatus. + */ + @java.lang.Override + public int getOperationalStatusValue() { + return operationalStatus_; + } + + /** + * + * + *
+     * The operational status of the underlying networking components.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @param value The enum numeric value on the wire for operationalStatus to set. + * @return This builder for chaining. + */ + public Builder setOperationalStatusValue(int value) { + operationalStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The operational status of the underlying networking components.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The operationalStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + getOperationalStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus.forNumber( + operationalStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The operational status of the underlying networking components.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @param value The operationalStatus to set. + * @return This builder for chaining. + */ + public Builder setOperationalStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + operationalStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The operational status of the underlying networking components.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearOperationalStatus() { + bitField0_ = (bitField0_ & ~0x00000002); + operationalStatus_ = 0; + onChanged(); + return this; + } + + private int connectivityStatus_ = 0; + + /** + * + * + *
+     * Current status of connectivity to the local GCP resource. This reflects
+     * whether the VPC Peering or NCC Hub appears correctly configured.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The enum numeric value on the wire for connectivityStatus. + */ + @java.lang.Override + public int getConnectivityStatusValue() { + return connectivityStatus_; + } + + /** + * + * + *
+     * Current status of connectivity to the local GCP resource. This reflects
+     * whether the VPC Peering or NCC Hub appears correctly configured.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @param value The enum numeric value on the wire for connectivityStatus to set. + * @return This builder for chaining. + */ + public Builder setConnectivityStatusValue(int value) { + connectivityStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Current status of connectivity to the local GCP resource. This reflects
+     * whether the VPC Peering or NCC Hub appears correctly configured.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The connectivityStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + getConnectivityStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + .forNumber(connectivityStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Current status of connectivity to the local GCP resource. This reflects
+     * whether the VPC Peering or NCC Hub appears correctly configured.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @param value The connectivityStatus to set. + * @return This builder for chaining. + */ + public Builder setConnectivityStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + connectivityStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Current status of connectivity to the local GCP resource. This reflects
+     * whether the VPC Peering or NCC Hub appears correctly configured.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearConnectivityStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + connectivityStatus_ = 0; + onChanged(); + return this; + } + + private int macSecStatus_ = 0; + + /** + * + * + *
+     * Current status of MACSec on the underlying network connectivity between GC
+     * and the partner.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The enum numeric value on the wire for macSecStatus. + */ + @java.lang.Override + public int getMacSecStatusValue() { + return macSecStatus_; + } + + /** + * + * + *
+     * Current status of MACSec on the underlying network connectivity between GC
+     * and the partner.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @param value The enum numeric value on the wire for macSecStatus to set. + * @return This builder for chaining. + */ + public Builder setMacSecStatusValue(int value) { + macSecStatus_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Current status of MACSec on the underlying network connectivity between GC
+     * and the partner.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The macSecStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus + getMacSecStatus() { + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus result = + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus.forNumber( + macSecStatus_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Current status of MACSec on the underlying network connectivity between GC
+     * and the partner.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @param value The macSecStatus to set. + * @return This builder for chaining. + */ + public Builder setMacSecStatus( + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + macSecStatus_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Current status of MACSec on the underlying network connectivity between GC
+     * and the partner.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearMacSecStatus() { + bitField0_ = (bitField0_ & ~0x00000008); + macSecStatus_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetStatusResponse) + private static final com.google.cloud.networkconnectivity.v1beta.GetStatusResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetStatusResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetStatusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetStatusResponse 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.networkconnectivity.v1beta.GetStatusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponseOrBuilder.java new file mode 100644 index 000000000000..fb5393775ceb --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetStatusResponseOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetStatusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetStatusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The overall status of the Transport. This field will always output the most
+   * critical status of the Transport. For example, if the connectivity is
+   * DISCONNECTED, and the underlying networking components are DOWN, then
+   * the overall status will be DOWN.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The enum numeric value on the wire for overallStatus. + */ + int getOverallStatusValue(); + + /** + * + * + *
+   * The overall status of the Transport. This field will always output the most
+   * critical status of the Transport. For example, if the connectivity is
+   * DISCONNECTED, and the underlying networking components are DOWN, then
+   * the overall status will be DOWN.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus overall_status = 1; + * + * + * @return The overallStatus. + */ + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus getOverallStatus(); + + /** + * + * + *
+   * The operational status of the underlying networking components.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The enum numeric value on the wire for operationalStatus. + */ + int getOperationalStatusValue(); + + /** + * + * + *
+   * The operational status of the underlying networking components.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus operational_status = 2; + * + * + * @return The operationalStatus. + */ + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.OperationalStatus + getOperationalStatus(); + + /** + * + * + *
+   * Current status of connectivity to the local GCP resource. This reflects
+   * whether the VPC Peering or NCC Hub appears correctly configured.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The enum numeric value on the wire for connectivityStatus. + */ + int getConnectivityStatusValue(); + + /** + * + * + *
+   * Current status of connectivity to the local GCP resource. This reflects
+   * whether the VPC Peering or NCC Hub appears correctly configured.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus connectivity_status = 3; + * + * + * @return The connectivityStatus. + */ + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.ConnectivityStatus + getConnectivityStatus(); + + /** + * + * + *
+   * Current status of MACSec on the underlying network connectivity between GC
+   * and the partner.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The enum numeric value on the wire for macSecStatus. + */ + int getMacSecStatusValue(); + + /** + * + * + *
+   * Current status of MACSec on the underlying network connectivity between GC
+   * and the partner.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus mac_sec_status = 4; + * + * + * @return The macSecStatus. + */ + com.google.cloud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus getMacSecStatus(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequest.java new file mode 100644 index 000000000000..f5f05dbe3633 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequest.java @@ -0,0 +1,618 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for getting a Transport.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetTransportRequest} + */ +@com.google.protobuf.Generated +public final class GetTransportRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.GetTransportRequest) + GetTransportRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetTransportRequest"); + } + + // Use GetTransportRequest.newBuilder() to construct. + private GetTransportRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetTransportRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.GetTransportRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest other = + (com.google.cloud.networkconnectivity.v1beta.GetTransportRequest) 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.networkconnectivity.v1beta.GetTransportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest 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.networkconnectivity.v1beta.GetTransportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest 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.networkconnectivity.v1beta.GetTransportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a Transport.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.GetTransportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.GetTransportRequest) + com.google.cloud.networkconnectivity.v1beta.GetTransportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetTransportRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetTransportRequest build() { + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GetTransportRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest result = + new com.google.cloud.networkconnectivity.v1beta.GetTransportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.GetTransportRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.GetTransportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.GetTransportRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.GetTransportRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.GetTransportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.GetTransportRequest) + private static final com.google.cloud.networkconnectivity.v1beta.GetTransportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.GetTransportRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.GetTransportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTransportRequest 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.networkconnectivity.v1beta.GetTransportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequestOrBuilder.java new file mode 100644 index 000000000000..5c717c2d848e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GetTransportRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GetTransportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.GetTransportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Group.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Group.java new file mode 100644 index 000000000000..a6c45812dbf1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Group.java @@ -0,0 +1,2683 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A group represents a subset of spokes attached to a hub.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Group} + */ +@com.google.protobuf.Generated +public final class Group extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Group) + GroupOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Group"); + } + + // Use Group.newBuilder() to construct. + private Group(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Group() { + name_ = ""; + description_ = ""; + uid_ = ""; + state_ = 0; + routeTable_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Group.class, + com.google.cloud.networkconnectivity.v1beta.Group.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED : result; + } + + public static final int AUTO_ACCEPT_FIELD_NUMBER = 8; + private com.google.cloud.networkconnectivity.v1beta.AutoAccept autoAccept_; + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoAccept field is set. + */ + @java.lang.Override + public boolean hasAutoAccept() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoAccept. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AutoAccept getAutoAccept() { + return autoAccept_ == null + ? com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance() + : autoAccept_; + } + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder getAutoAcceptOrBuilder() { + return autoAccept_ == null + ? com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance() + : autoAccept_; + } + + public static final int ROUTE_TABLE_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object routeTable_ = ""; + + /** + * + * + *
+   * Output only. The name of the route table that corresponds to this group.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The routeTable. + */ + @java.lang.Override + public java.lang.String getRouteTable() { + java.lang.Object ref = routeTable_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + routeTable_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The name of the route table that corresponds to this group.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for routeTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRouteTableBytes() { + java.lang.Object ref = routeTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routeTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getAutoAccept()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(routeTable_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, routeTable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAutoAccept()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(routeTable_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, routeTable_); + } + 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.networkconnectivity.v1beta.Group)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Group other = + (com.google.cloud.networkconnectivity.v1beta.Group) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (state_ != other.state_) return false; + if (hasAutoAccept() != other.hasAutoAccept()) return false; + if (hasAutoAccept()) { + if (!getAutoAccept().equals(other.getAutoAccept())) return false; + } + if (!getRouteTable().equals(other.getRouteTable())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasAutoAccept()) { + hash = (37 * hash) + AUTO_ACCEPT_FIELD_NUMBER; + hash = (53 * hash) + getAutoAccept().hashCode(); + } + hash = (37 * hash) + ROUTE_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getRouteTable().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group 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.networkconnectivity.v1beta.Group parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group 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.networkconnectivity.v1beta.Group parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1beta.Group prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A group represents a subset of spokes attached to a hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Group} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Group) + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Group.class, + com.google.cloud.networkconnectivity.v1beta.Group.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Group.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetAutoAcceptFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + autoAccept_ = null; + if (autoAcceptBuilder_ != null) { + autoAcceptBuilder_.dispose(); + autoAcceptBuilder_ = null; + } + routeTable_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Group_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Group getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Group build() { + com.google.cloud.networkconnectivity.v1beta.Group result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Group buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Group result = + new com.google.cloud.networkconnectivity.v1beta.Group(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Group result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.autoAccept_ = autoAcceptBuilder_ == null ? autoAccept_ : autoAcceptBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.routeTable_ = routeTable_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Group) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Group) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Group other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasAutoAccept()) { + mergeAutoAccept(other.getAutoAccept()); + } + if (!other.getRouteTable().isEmpty()) { + routeTable_ = other.routeTable_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage( + internalGetAutoAcceptFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + routeTable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the group. Group names must be unique. They
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the group was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the group was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. Labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The description of the group.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the group. This value is unique
+     * across all group resources. If a group is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different unique_id.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.AutoAccept autoAccept_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.AutoAccept, + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder, + com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder> + autoAcceptBuilder_; + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoAccept field is set. + */ + public boolean hasAutoAccept() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoAccept. + */ + public com.google.cloud.networkconnectivity.v1beta.AutoAccept getAutoAccept() { + if (autoAcceptBuilder_ == null) { + return autoAccept_ == null + ? com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance() + : autoAccept_; + } else { + return autoAcceptBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoAccept(com.google.cloud.networkconnectivity.v1beta.AutoAccept value) { + if (autoAcceptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + autoAccept_ = value; + } else { + autoAcceptBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAutoAccept( + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder builderForValue) { + if (autoAcceptBuilder_ == null) { + autoAccept_ = builderForValue.build(); + } else { + autoAcceptBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAutoAccept(com.google.cloud.networkconnectivity.v1beta.AutoAccept value) { + if (autoAcceptBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && autoAccept_ != null + && autoAccept_ + != com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance()) { + getAutoAcceptBuilder().mergeFrom(value); + } else { + autoAccept_ = value; + } + } else { + autoAcceptBuilder_.mergeFrom(value); + } + if (autoAccept_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAutoAccept() { + bitField0_ = (bitField0_ & ~0x00000080); + autoAccept_ = null; + if (autoAcceptBuilder_ != null) { + autoAcceptBuilder_.dispose(); + autoAcceptBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder getAutoAcceptBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetAutoAcceptFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder + getAutoAcceptOrBuilder() { + if (autoAcceptBuilder_ != null) { + return autoAcceptBuilder_.getMessageOrBuilder(); + } else { + return autoAccept_ == null + ? com.google.cloud.networkconnectivity.v1beta.AutoAccept.getDefaultInstance() + : autoAccept_; + } + } + + /** + * + * + *
+     * Optional. The auto-accept setting for this group.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.AutoAccept, + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder, + com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder> + internalGetAutoAcceptFieldBuilder() { + if (autoAcceptBuilder_ == null) { + autoAcceptBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.AutoAccept, + com.google.cloud.networkconnectivity.v1beta.AutoAccept.Builder, + com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder>( + getAutoAccept(), getParentForChildren(), isClean()); + autoAccept_ = null; + } + return autoAcceptBuilder_; + } + + private java.lang.Object routeTable_ = ""; + + /** + * + * + *
+     * Output only. The name of the route table that corresponds to this group.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The routeTable. + */ + public java.lang.String getRouteTable() { + java.lang.Object ref = routeTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + routeTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the route table that corresponds to this group.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for routeTable. + */ + public com.google.protobuf.ByteString getRouteTableBytes() { + java.lang.Object ref = routeTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + routeTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the route table that corresponds to this group.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The routeTable to set. + * @return This builder for chaining. + */ + public Builder setRouteTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + routeTable_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the route table that corresponds to this group.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRouteTable() { + routeTable_ = getDefaultInstance().getRouteTable(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the route table that corresponds to this group.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for routeTable to set. + * @return This builder for chaining. + */ + public Builder setRouteTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + routeTable_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Group) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Group) + private static final com.google.cloud.networkconnectivity.v1beta.Group DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Group(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Group getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Group 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.networkconnectivity.v1beta.Group getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupName.java new file mode 100644 index 000000000000..dc6ed941ed5b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupName.java @@ -0,0 +1,217 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 GroupName implements ResourceName { + private static final PathTemplate PROJECT_HUB_GROUP = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/hubs/{hub}/groups/{group}"); + private volatile Map fieldValuesMap; + private final String project; + private final String hub; + private final String group; + + @Deprecated + protected GroupName() { + project = null; + hub = null; + group = null; + } + + private GroupName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + group = Preconditions.checkNotNull(builder.getGroup()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getGroup() { + return group; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static GroupName of(String project, String hub, String group) { + return newBuilder().setProject(project).setHub(hub).setGroup(group).build(); + } + + public static String format(String project, String hub, String group) { + return newBuilder().setProject(project).setHub(hub).setGroup(group).build().toString(); + } + + public static GroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_GROUP.validatedMatch( + formattedString, "GroupName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("hub"), matchMap.get("group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (GroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (group != null) { + fieldMapBuilder.put("group", group); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_GROUP.instantiate("project", project, "hub", hub, "group", group); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + GroupName that = ((GroupName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.group, that.group); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(group); + return h; + } + + /** Builder for projects/{project}/locations/global/hubs/{hub}/groups/{group}. */ + public static class Builder { + private String project; + private String hub; + private String group; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getGroup() { + return group; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setGroup(String group) { + this.group = group; + return this; + } + + private Builder(GroupName groupName) { + this.project = groupName.project; + this.hub = groupName.hub; + this.group = groupName.group; + } + + public GroupName build() { + return new GroupName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupOrBuilder.java new file mode 100644 index 000000000000..9f17bf10ce7c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/GroupOrBuilder.java @@ -0,0 +1,376 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface GroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Group) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The name of the group. Group names must be unique. They
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the group was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the group was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. The description of the group.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the group. This value is unique
+   * across all group resources. If a group is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different unique_id.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the autoAccept field is set. + */ + boolean hasAutoAccept(); + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The autoAccept. + */ + com.google.cloud.networkconnectivity.v1beta.AutoAccept getAutoAccept(); + + /** + * + * + *
+   * Optional. The auto-accept setting for this group.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.AutoAcceptOrBuilder getAutoAcceptOrBuilder(); + + /** + * + * + *
+   * Output only. The name of the route table that corresponds to this group.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The routeTable. + */ + java.lang.String getRouteTable(); + + /** + * + * + *
+   * Output only. The name of the route table that corresponds to this group.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   * 
+ * + * + * string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for routeTable. + */ + com.google.protobuf.ByteString getRouteTableBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Hub.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Hub.java new file mode 100644 index 000000000000..9c07ef3b9e46 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Hub.java @@ -0,0 +1,4071 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A Network Connectivity Center hub is a global management resource to which
+ * you attach spokes. A single hub can contain spokes from multiple regions.
+ * However, if any of a hub's spokes use the site-to-site data transfer feature,
+ * the resources associated with those spokes must all be in the same VPC
+ * network. Spokes that do not use site-to-site data transfer can be associated
+ * with any VPC network in your project.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Hub} + */ +@com.google.protobuf.Generated +public final class Hub extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Hub) + HubOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Hub"); + } + + // Use Hub.newBuilder() to construct. + private Hub(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Hub() { + name_ = ""; + description_ = ""; + uniqueId_ = ""; + state_ = 0; + routingVpcs_ = java.util.Collections.emptyList(); + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); + policyMode_ = 0; + presetTopology_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Hub.class, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The name of the hub. Hub names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The name of the hub. Hub names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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. The time the hub was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the hub 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. The time the hub 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. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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; + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. An optional description of the hub.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional description of the hub.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNIQUE_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the hub. This value is unique
+   * across all hub resources. If a hub is deleted and another with the same
+   * name is created, the new hub is assigned a different unique_id.
+   * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + @java.lang.Override + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the hub. This value is unique
+   * across all hub resources. If a hub is deleted and another with the same
+   * name is created, the new hub is assigned a different unique_id.
+   * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of this hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of this hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED : result; + } + + public static final int ROUTING_VPCS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List routingVpcs_; + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRoutingVpcsList() { + return routingVpcs_; + } + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRoutingVpcsOrBuilderList() { + return routingVpcs_; + } + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRoutingVpcsCount() { + return routingVpcs_.size(); + } + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC getRoutingVpcs(int index) { + return routingVpcs_.get(index); + } + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder getRoutingVpcsOrBuilder( + int index) { + return routingVpcs_.get(index); + } + + public static final int ROUTE_TABLES_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList routeTables_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + public com.google.protobuf.ProtocolStringList getRouteTablesList() { + return routeTables_; + } + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + public int getRouteTablesCount() { + return routeTables_.size(); + } + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + public java.lang.String getRouteTables(int index) { + return routeTables_.get(index); + } + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + public com.google.protobuf.ByteString getRouteTablesBytes(int index) { + return routeTables_.getByteString(index); + } + + public static final int SPOKE_SUMMARY_FIELD_NUMBER = 12; + private com.google.cloud.networkconnectivity.v1beta.SpokeSummary spokeSummary_; + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + @java.lang.Override + public boolean hasSpokeSummary() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary getSpokeSummary() { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder + getSpokeSummaryOrBuilder() { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + + public static final int POLICY_MODE_FIELD_NUMBER = 13; + private int policyMode_ = 0; + + /** + * + * + *
+   * Optional. The policy mode of this hub. This field can be either
+   * PRESET or CUSTOM. If unspecified, the
+   * policy_mode defaults to PRESET.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for policyMode. + */ + @java.lang.Override + public int getPolicyModeValue() { + return policyMode_; + } + + /** + * + * + *
+   * Optional. The policy mode of this hub. This field can be either
+   * PRESET or CUSTOM. If unspecified, the
+   * policy_mode defaults to PRESET.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The policyMode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyMode getPolicyMode() { + com.google.cloud.networkconnectivity.v1beta.PolicyMode result = + com.google.cloud.networkconnectivity.v1beta.PolicyMode.forNumber(policyMode_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyMode.UNRECOGNIZED + : result; + } + + public static final int PRESET_TOPOLOGY_FIELD_NUMBER = 14; + private int presetTopology_ = 0; + + /** + * + * + *
+   * Optional. The topology implemented in this hub. Currently, this field is
+   * only used when policy_mode = PRESET. The available preset topologies are
+   * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+   * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+   * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for presetTopology. + */ + @java.lang.Override + public int getPresetTopologyValue() { + return presetTopology_; + } + + /** + * + * + *
+   * Optional. The topology implemented in this hub. Currently, this field is
+   * only used when policy_mode = PRESET. The available preset topologies are
+   * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+   * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+   * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The presetTopology. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PresetTopology getPresetTopology() { + com.google.cloud.networkconnectivity.v1beta.PresetTopology result = + com.google.cloud.networkconnectivity.v1beta.PresetTopology.forNumber(presetTopology_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PresetTopology.UNRECOGNIZED + : result; + } + + public static final int EXPORT_PSC_FIELD_NUMBER = 15; + private boolean exportPsc_ = false; + + /** + * + * + *
+   * Optional. Whether Private Service Connect connection propagation is enabled
+   * for the hub. If true, Private Service Connect endpoints in VPC spokes
+   * attached to the hub are made accessible to other VPC spokes attached to the
+   * hub. The default value is false.
+   * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the exportPsc field is set. + */ + @java.lang.Override + public boolean hasExportPsc() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Whether Private Service Connect connection propagation is enabled
+   * for the hub. If true, Private Service Connect endpoints in VPC spokes
+   * attached to the hub are made accessible to other VPC spokes attached to the
+   * hub. The default value is false.
+   * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The exportPsc. + */ + @java.lang.Override + public boolean getExportPsc() { + return exportPsc_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + for (int i = 0; i < routingVpcs_.size(); i++) { + output.writeMessage(10, routingVpcs_.get(i)); + } + for (int i = 0; i < routeTables_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, routeTables_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(12, getSpokeSummary()); + } + if (policyMode_ + != com.google.cloud.networkconnectivity.v1beta.PolicyMode.POLICY_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, policyMode_); + } + if (presetTopology_ + != com.google.cloud.networkconnectivity.v1beta.PresetTopology.PRESET_TOPOLOGY_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, presetTopology_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeBool(15, exportPsc_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + for (int i = 0; i < routingVpcs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, routingVpcs_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < routeTables_.size(); i++) { + dataSize += computeStringSizeNoTag(routeTables_.getRaw(i)); + } + size += dataSize; + size += 1 * getRouteTablesList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getSpokeSummary()); + } + if (policyMode_ + != com.google.cloud.networkconnectivity.v1beta.PolicyMode.POLICY_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, policyMode_); + } + if (presetTopology_ + != com.google.cloud.networkconnectivity.v1beta.PresetTopology.PRESET_TOPOLOGY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, presetTopology_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, exportPsc_); + } + 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.networkconnectivity.v1beta.Hub)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Hub other = + (com.google.cloud.networkconnectivity.v1beta.Hub) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; + if (!getRoutingVpcsList().equals(other.getRoutingVpcsList())) return false; + if (!getRouteTablesList().equals(other.getRouteTablesList())) return false; + if (hasSpokeSummary() != other.hasSpokeSummary()) return false; + if (hasSpokeSummary()) { + if (!getSpokeSummary().equals(other.getSpokeSummary())) return false; + } + if (policyMode_ != other.policyMode_) return false; + if (presetTopology_ != other.presetTopology_) return false; + if (hasExportPsc() != other.hasExportPsc()) return false; + if (hasExportPsc()) { + if (getExportPsc() != other.getExportPsc()) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getRoutingVpcsCount() > 0) { + hash = (37 * hash) + ROUTING_VPCS_FIELD_NUMBER; + hash = (53 * hash) + getRoutingVpcsList().hashCode(); + } + if (getRouteTablesCount() > 0) { + hash = (37 * hash) + ROUTE_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getRouteTablesList().hashCode(); + } + if (hasSpokeSummary()) { + hash = (37 * hash) + SPOKE_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getSpokeSummary().hashCode(); + } + hash = (37 * hash) + POLICY_MODE_FIELD_NUMBER; + hash = (53 * hash) + policyMode_; + hash = (37 * hash) + PRESET_TOPOLOGY_FIELD_NUMBER; + hash = (53 * hash) + presetTopology_; + if (hasExportPsc()) { + hash = (37 * hash) + EXPORT_PSC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExportPsc()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub 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.networkconnectivity.v1beta.Hub parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub 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.networkconnectivity.v1beta.Hub parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1beta.Hub prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Network Connectivity Center hub is a global management resource to which
+   * you attach spokes. A single hub can contain spokes from multiple regions.
+   * However, if any of a hub's spokes use the site-to-site data transfer feature,
+   * the resources associated with those spokes must all be in the same VPC
+   * network. Spokes that do not use site-to-site data transfer can be associated
+   * with any VPC network in your project.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Hub} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Hub) + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Hub.class, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Hub.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetRoutingVpcsFieldBuilder(); + internalGetSpokeSummaryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uniqueId_ = ""; + state_ = 0; + if (routingVpcsBuilder_ == null) { + routingVpcs_ = java.util.Collections.emptyList(); + } else { + routingVpcs_ = null; + routingVpcsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); + spokeSummary_ = null; + if (spokeSummaryBuilder_ != null) { + spokeSummaryBuilder_.dispose(); + spokeSummaryBuilder_ = null; + } + policyMode_ = 0; + presetTopology_ = 0; + exportPsc_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Hub_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub build() { + com.google.cloud.networkconnectivity.v1beta.Hub result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Hub result = + new com.google.cloud.networkconnectivity.v1beta.Hub(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.Hub result) { + if (routingVpcsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + routingVpcs_ = java.util.Collections.unmodifiableList(routingVpcs_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.routingVpcs_ = routingVpcs_; + } else { + result.routingVpcs_ = routingVpcsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Hub result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uniqueId_ = uniqueId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + routeTables_.makeImmutable(); + result.routeTables_ = routeTables_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.spokeSummary_ = + spokeSummaryBuilder_ == null ? spokeSummary_ : spokeSummaryBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.policyMode_ = policyMode_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.presetTopology_ = presetTopology_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.exportPsc_ = exportPsc_; + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Hub) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Hub) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Hub other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUniqueId().isEmpty()) { + uniqueId_ = other.uniqueId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (routingVpcsBuilder_ == null) { + if (!other.routingVpcs_.isEmpty()) { + if (routingVpcs_.isEmpty()) { + routingVpcs_ = other.routingVpcs_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureRoutingVpcsIsMutable(); + routingVpcs_.addAll(other.routingVpcs_); + } + onChanged(); + } + } else { + if (!other.routingVpcs_.isEmpty()) { + if (routingVpcsBuilder_.isEmpty()) { + routingVpcsBuilder_.dispose(); + routingVpcsBuilder_ = null; + routingVpcs_ = other.routingVpcs_; + bitField0_ = (bitField0_ & ~0x00000080); + routingVpcsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRoutingVpcsFieldBuilder() + : null; + } else { + routingVpcsBuilder_.addAllMessages(other.routingVpcs_); + } + } + } + if (!other.routeTables_.isEmpty()) { + if (routeTables_.isEmpty()) { + routeTables_ = other.routeTables_; + bitField0_ |= 0x00000100; + } else { + ensureRouteTablesIsMutable(); + routeTables_.addAll(other.routeTables_); + } + onChanged(); + } + if (other.hasSpokeSummary()) { + mergeSpokeSummary(other.getSpokeSummary()); + } + if (other.policyMode_ != 0) { + setPolicyModeValue(other.getPolicyModeValue()); + } + if (other.presetTopology_ != 0) { + setPresetTopologyValue(other.getPresetTopologyValue()); + } + if (other.hasExportPsc()) { + setExportPsc(other.getExportPsc()); + } + 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( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 66: + { + uniqueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 72 + case 82: + { + com.google.cloud.networkconnectivity.v1beta.RoutingVPC m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.parser(), + extensionRegistry); + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + routingVpcs_.add(m); + } else { + routingVpcsBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRouteTablesIsMutable(); + routeTables_.add(s); + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetSpokeSummaryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 98 + case 104: + { + policyMode_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 104 + case 112: + { + presetTopology_ = input.readEnum(); + bitField0_ |= 0x00000800; + break; + } // case 112 + case 120: + { + exportPsc_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 120 + 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_ = ""; + + /** + * + * + *
+     * Immutable. The name of the hub. Hub names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the hub. Hub names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the hub. Hub names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The name of the hub. Hub names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the hub. Hub names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the hub 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. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the hub 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. The time the hub was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the hub was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. An optional description of the hub.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of the hub.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of the hub.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of the hub.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of the hub.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the hub. This value is unique
+     * across all hub resources. If a hub is deleted and another with the same
+     * name is created, the new hub is assigned a different unique_id.
+     * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the hub. This value is unique
+     * across all hub resources. If a hub is deleted and another with the same
+     * name is created, the new hub is assigned a different unique_id.
+     * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the hub. This value is unique
+     * across all hub resources. If a hub is deleted and another with the same
+     * name is created, the new hub is assigned a different unique_id.
+     * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uniqueId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the hub. This value is unique
+     * across all hub resources. If a hub is deleted and another with the same
+     * name is created, the new hub is assigned a different unique_id.
+     * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUniqueId() { + uniqueId_ = getDefaultInstance().getUniqueId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the hub. This value is unique
+     * across all hub resources. If a hub is deleted and another with the same
+     * name is created, the new hub is assigned a different unique_id.
+     * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uniqueId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of this hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this hub.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List routingVpcs_ = + java.util.Collections.emptyList(); + + private void ensureRoutingVpcsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + routingVpcs_ = + new java.util.ArrayList( + routingVpcs_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RoutingVPC, + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder, + com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder> + routingVpcsBuilder_; + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRoutingVpcsList() { + if (routingVpcsBuilder_ == null) { + return java.util.Collections.unmodifiableList(routingVpcs_); + } else { + return routingVpcsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRoutingVpcsCount() { + if (routingVpcsBuilder_ == null) { + return routingVpcs_.size(); + } else { + return routingVpcsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC getRoutingVpcs(int index) { + if (routingVpcsBuilder_ == null) { + return routingVpcs_.get(index); + } else { + return routingVpcsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRoutingVpcs( + int index, com.google.cloud.networkconnectivity.v1beta.RoutingVPC value) { + if (routingVpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingVpcsIsMutable(); + routingVpcs_.set(index, value); + onChanged(); + } else { + routingVpcsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRoutingVpcs( + int index, com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder builderForValue) { + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + routingVpcs_.set(index, builderForValue.build()); + onChanged(); + } else { + routingVpcsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoutingVpcs(com.google.cloud.networkconnectivity.v1beta.RoutingVPC value) { + if (routingVpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingVpcsIsMutable(); + routingVpcs_.add(value); + onChanged(); + } else { + routingVpcsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoutingVpcs( + int index, com.google.cloud.networkconnectivity.v1beta.RoutingVPC value) { + if (routingVpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingVpcsIsMutable(); + routingVpcs_.add(index, value); + onChanged(); + } else { + routingVpcsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoutingVpcs( + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder builderForValue) { + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + routingVpcs_.add(builderForValue.build()); + onChanged(); + } else { + routingVpcsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRoutingVpcs( + int index, com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder builderForValue) { + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + routingVpcs_.add(index, builderForValue.build()); + onChanged(); + } else { + routingVpcsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRoutingVpcs( + java.lang.Iterable + values) { + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routingVpcs_); + onChanged(); + } else { + routingVpcsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRoutingVpcs() { + if (routingVpcsBuilder_ == null) { + routingVpcs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + routingVpcsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRoutingVpcs(int index) { + if (routingVpcsBuilder_ == null) { + ensureRoutingVpcsIsMutable(); + routingVpcs_.remove(index); + onChanged(); + } else { + routingVpcsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder getRoutingVpcsBuilder( + int index) { + return internalGetRoutingVpcsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder getRoutingVpcsOrBuilder( + int index) { + if (routingVpcsBuilder_ == null) { + return routingVpcs_.get(index); + } else { + return routingVpcsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRoutingVpcsOrBuilderList() { + if (routingVpcsBuilder_ != null) { + return routingVpcsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routingVpcs_); + } + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder addRoutingVpcsBuilder() { + return internalGetRoutingVpcsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.RoutingVPC.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder addRoutingVpcsBuilder( + int index) { + return internalGetRoutingVpcsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.RoutingVPC.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The VPC networks associated with this hub's spokes.
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the set of spokes attached to the hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRoutingVpcsBuilderList() { + return internalGetRoutingVpcsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RoutingVPC, + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder, + com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder> + internalGetRoutingVpcsFieldBuilder() { + if (routingVpcsBuilder_ == null) { + routingVpcsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RoutingVPC, + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder, + com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder>( + routingVpcs_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + routingVpcs_ = null; + } + return routingVpcsBuilder_; + } + + private com.google.protobuf.LazyStringArrayList routeTables_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRouteTablesIsMutable() { + if (!routeTables_.isModifiable()) { + routeTables_ = new com.google.protobuf.LazyStringArrayList(routeTables_); + } + bitField0_ |= 0x00000100; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + public com.google.protobuf.ProtocolStringList getRouteTablesList() { + routeTables_.makeImmutable(); + return routeTables_; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + public int getRouteTablesCount() { + return routeTables_.size(); + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + public java.lang.String getRouteTables(int index) { + return routeTables_.get(index); + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + public com.google.protobuf.ByteString getRouteTablesBytes(int index) { + return routeTables_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The routeTables to set. + * @return This builder for chaining. + */ + public Builder setRouteTables(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The routeTables to add. + * @return This builder for chaining. + */ + public Builder addRouteTables(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The routeTables to add. + * @return This builder for chaining. + */ + public Builder addAllRouteTables(java.lang.Iterable values) { + ensureRouteTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routeTables_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRouteTables() { + routeTables_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route tables that belong to this hub. They use the
+     * following form:
+     * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+     *
+     * This field is read-only. Network Connectivity Center automatically
+     * populates it based on the route tables nested under the hub.
+     * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the routeTables to add. + * @return This builder for chaining. + */ + public Builder addRouteTablesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRouteTablesIsMutable(); + routeTables_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.SpokeSummary spokeSummary_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder> + spokeSummaryBuilder_; + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + public boolean hasSpokeSummary() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary getSpokeSummary() { + if (spokeSummaryBuilder_ == null) { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } else { + return spokeSummaryBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeSummary(com.google.cloud.networkconnectivity.v1beta.SpokeSummary value) { + if (spokeSummaryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spokeSummary_ = value; + } else { + spokeSummaryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeSummary( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder builderForValue) { + if (spokeSummaryBuilder_ == null) { + spokeSummary_ = builderForValue.build(); + } else { + spokeSummaryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSpokeSummary( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary value) { + if (spokeSummaryBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && spokeSummary_ != null + && spokeSummary_ + != com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance()) { + getSpokeSummaryBuilder().mergeFrom(value); + } else { + spokeSummary_ = value; + } + } else { + spokeSummaryBuilder_.mergeFrom(value); + } + if (spokeSummary_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeSummary() { + bitField0_ = (bitField0_ & ~0x00000200); + spokeSummary_ = null; + if (spokeSummaryBuilder_ != null) { + spokeSummaryBuilder_.dispose(); + spokeSummaryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder + getSpokeSummaryBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetSpokeSummaryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder + getSpokeSummaryOrBuilder() { + if (spokeSummaryBuilder_ != null) { + return spokeSummaryBuilder_.getMessageOrBuilder(); + } else { + return spokeSummary_ == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance() + : spokeSummary_; + } + } + + /** + * + * + *
+     * Output only. A summary of the spokes associated with a hub. The
+     * summary includes a count of spokes according to type
+     * and according to state. If any spokes are inactive,
+     * the summary also lists the reasons they are inactive,
+     * including a count for each reason.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder> + internalGetSpokeSummaryFieldBuilder() { + if (spokeSummaryBuilder_ == null) { + spokeSummaryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder>( + getSpokeSummary(), getParentForChildren(), isClean()); + spokeSummary_ = null; + } + return spokeSummaryBuilder_; + } + + private int policyMode_ = 0; + + /** + * + * + *
+     * Optional. The policy mode of this hub. This field can be either
+     * PRESET or CUSTOM. If unspecified, the
+     * policy_mode defaults to PRESET.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for policyMode. + */ + @java.lang.Override + public int getPolicyModeValue() { + return policyMode_; + } + + /** + * + * + *
+     * Optional. The policy mode of this hub. This field can be either
+     * PRESET or CUSTOM. If unspecified, the
+     * policy_mode defaults to PRESET.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for policyMode to set. + * @return This builder for chaining. + */ + public Builder setPolicyModeValue(int value) { + policyMode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The policy mode of this hub. This field can be either
+     * PRESET or CUSTOM. If unspecified, the
+     * policy_mode defaults to PRESET.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The policyMode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyMode getPolicyMode() { + com.google.cloud.networkconnectivity.v1beta.PolicyMode result = + com.google.cloud.networkconnectivity.v1beta.PolicyMode.forNumber(policyMode_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The policy mode of this hub. This field can be either
+     * PRESET or CUSTOM. If unspecified, the
+     * policy_mode defaults to PRESET.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The policyMode to set. + * @return This builder for chaining. + */ + public Builder setPolicyMode(com.google.cloud.networkconnectivity.v1beta.PolicyMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + policyMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The policy mode of this hub. This field can be either
+     * PRESET or CUSTOM. If unspecified, the
+     * policy_mode defaults to PRESET.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPolicyMode() { + bitField0_ = (bitField0_ & ~0x00000400); + policyMode_ = 0; + onChanged(); + return this; + } + + private int presetTopology_ = 0; + + /** + * + * + *
+     * Optional. The topology implemented in this hub. Currently, this field is
+     * only used when policy_mode = PRESET. The available preset topologies are
+     * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+     * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+     * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for presetTopology. + */ + @java.lang.Override + public int getPresetTopologyValue() { + return presetTopology_; + } + + /** + * + * + *
+     * Optional. The topology implemented in this hub. Currently, this field is
+     * only used when policy_mode = PRESET. The available preset topologies are
+     * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+     * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+     * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for presetTopology to set. + * @return This builder for chaining. + */ + public Builder setPresetTopologyValue(int value) { + presetTopology_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The topology implemented in this hub. Currently, this field is
+     * only used when policy_mode = PRESET. The available preset topologies are
+     * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+     * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+     * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The presetTopology. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PresetTopology getPresetTopology() { + com.google.cloud.networkconnectivity.v1beta.PresetTopology result = + com.google.cloud.networkconnectivity.v1beta.PresetTopology.forNumber(presetTopology_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PresetTopology.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The topology implemented in this hub. Currently, this field is
+     * only used when policy_mode = PRESET. The available preset topologies are
+     * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+     * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+     * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The presetTopology to set. + * @return This builder for chaining. + */ + public Builder setPresetTopology( + com.google.cloud.networkconnectivity.v1beta.PresetTopology value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + presetTopology_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The topology implemented in this hub. Currently, this field is
+     * only used when policy_mode = PRESET. The available preset topologies are
+     * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+     * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+     * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPresetTopology() { + bitField0_ = (bitField0_ & ~0x00000800); + presetTopology_ = 0; + onChanged(); + return this; + } + + private boolean exportPsc_; + + /** + * + * + *
+     * Optional. Whether Private Service Connect connection propagation is enabled
+     * for the hub. If true, Private Service Connect endpoints in VPC spokes
+     * attached to the hub are made accessible to other VPC spokes attached to the
+     * hub. The default value is false.
+     * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the exportPsc field is set. + */ + @java.lang.Override + public boolean hasExportPsc() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. Whether Private Service Connect connection propagation is enabled
+     * for the hub. If true, Private Service Connect endpoints in VPC spokes
+     * attached to the hub are made accessible to other VPC spokes attached to the
+     * hub. The default value is false.
+     * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The exportPsc. + */ + @java.lang.Override + public boolean getExportPsc() { + return exportPsc_; + } + + /** + * + * + *
+     * Optional. Whether Private Service Connect connection propagation is enabled
+     * for the hub. If true, Private Service Connect endpoints in VPC spokes
+     * attached to the hub are made accessible to other VPC spokes attached to the
+     * hub. The default value is false.
+     * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The exportPsc to set. + * @return This builder for chaining. + */ + public Builder setExportPsc(boolean value) { + + exportPsc_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether Private Service Connect connection propagation is enabled
+     * for the hub. If true, Private Service Connect endpoints in VPC spokes
+     * attached to the hub are made accessible to other VPC spokes attached to the
+     * hub. The default value is false.
+     * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExportPsc() { + bitField0_ = (bitField0_ & ~0x00001000); + exportPsc_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Hub) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Hub) + private static final com.google.cloud.networkconnectivity.v1beta.Hub DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Hub(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Hub getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Hub 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.networkconnectivity.v1beta.Hub getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubName.java new file mode 100644 index 000000000000..aaaf03fe9cfe --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 HubName implements ResourceName { + private static final PathTemplate PROJECT_HUB = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/global/hubs/{hub}"); + private volatile Map fieldValuesMap; + private final String project; + private final String hub; + + @Deprecated + protected HubName() { + project = null; + hub = null; + } + + private HubName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HubName of(String project, String hub) { + return newBuilder().setProject(project).setHub(hub).build(); + } + + public static String format(String project, String hub) { + return newBuilder().setProject(project).setHub(hub).build().toString(); + } + + public static HubName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB.validatedMatch( + formattedString, "HubName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("hub")); + } + + 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 (HubName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB.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 (hub != null) { + fieldMapBuilder.put("hub", hub); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB.instantiate("project", project, "hub", hub); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + HubName that = ((HubName) o); + return Objects.equals(this.project, that.project) && Objects.equals(this.hub, that.hub); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + return h; + } + + /** Builder for projects/{project}/locations/global/hubs/{hub}. */ + public static class Builder { + private String project; + private String hub; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + private Builder(HubName hubName) { + this.project = hubName.project; + this.hub = hubName.hub; + } + + public HubName build() { + return new HubName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubOrBuilder.java new file mode 100644 index 000000000000..7c88b14c74c5 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubOrBuilder.java @@ -0,0 +1,612 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface HubOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Hub) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the hub. Hub names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The name of the hub. Hub names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the hub 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. The time the hub was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the hub was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the hub was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. An optional description of the hub.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. An optional description of the hub.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the hub. This value is unique
+   * across all hub resources. If a hub is deleted and another with the same
+   * name is created, the new hub is assigned a different unique_id.
+   * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + java.lang.String getUniqueId(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the hub. This value is unique
+   * across all hub resources. If a hub is deleted and another with the same
+   * name is created, the new hub is assigned a different unique_id.
+   * 
+ * + * string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + com.google.protobuf.ByteString getUniqueIdBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this hub.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRoutingVpcsList(); + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.RoutingVPC getRoutingVpcs(int index); + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRoutingVpcsCount(); + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRoutingVpcsOrBuilderList(); + + /** + * + * + *
+   * Output only. The VPC networks associated with this hub's spokes.
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the set of spokes attached to the hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RoutingVPC routing_vpcs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder getRoutingVpcsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the routeTables. + */ + java.util.List getRouteTablesList(); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of routeTables. + */ + int getRouteTablesCount(); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The routeTables at the given index. + */ + java.lang.String getRouteTables(int index); + + /** + * + * + *
+   * Output only. The route tables that belong to this hub. They use the
+   * following form:
+   * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`
+   *
+   * This field is read-only. Network Connectivity Center automatically
+   * populates it based on the route tables nested under the hub.
+   * 
+ * + * repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the routeTables at the given index. + */ + com.google.protobuf.ByteString getRouteTablesBytes(int index); + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the spokeSummary field is set. + */ + boolean hasSpokeSummary(); + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeSummary. + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary getSpokeSummary(); + + /** + * + * + *
+   * Output only. A summary of the spokes associated with a hub. The
+   * summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder getSpokeSummaryOrBuilder(); + + /** + * + * + *
+   * Optional. The policy mode of this hub. This field can be either
+   * PRESET or CUSTOM. If unspecified, the
+   * policy_mode defaults to PRESET.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for policyMode. + */ + int getPolicyModeValue(); + + /** + * + * + *
+   * Optional. The policy mode of this hub. This field can be either
+   * PRESET or CUSTOM. If unspecified, the
+   * policy_mode defaults to PRESET.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The policyMode. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyMode getPolicyMode(); + + /** + * + * + *
+   * Optional. The topology implemented in this hub. Currently, this field is
+   * only used when policy_mode = PRESET. The available preset topologies are
+   * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+   * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+   * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for presetTopology. + */ + int getPresetTopologyValue(); + + /** + * + * + *
+   * Optional. The topology implemented in this hub. Currently, this field is
+   * only used when policy_mode = PRESET. The available preset topologies are
+   * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET,
+   * the preset_topology defaults to MESH. When policy_mode = CUSTOM,
+   * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The presetTopology. + */ + com.google.cloud.networkconnectivity.v1beta.PresetTopology getPresetTopology(); + + /** + * + * + *
+   * Optional. Whether Private Service Connect connection propagation is enabled
+   * for the hub. If true, Private Service Connect endpoints in VPC spokes
+   * attached to the hub are made accessible to other VPC spokes attached to the
+   * hub. The default value is false.
+   * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the exportPsc field is set. + */ + boolean hasExportPsc(); + + /** + * + * + *
+   * Optional. Whether Private Service Connect connection propagation is enabled
+   * for the hub. If true, Private Service Connect endpoints in VPC spokes
+   * attached to the hub are made accessible to other VPC spokes attached to the
+   * hub. The default value is false.
+   * 
+ * + * optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The exportPsc. + */ + boolean getExportPsc(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubProto.java new file mode 100644 index 000000000000..353cfd948f32 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubProto.java @@ -0,0 +1,1790 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public final class HubProto extends com.google.protobuf.GeneratedFile { + private HubProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HubProto"); + } + + 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_networkconnectivity_v1beta_Hub_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Hub_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Hub_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Hub_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Spoke_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Route_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Route_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Route_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Route_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Group_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Group_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Group_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Group_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_AutoAccept_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetHubRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateHubRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteHubRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_AcceptHubSpokeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_AcceptSpokeUpdateResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetRouteTableRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Gateway_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Gateway_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Gateway_IpRangeReservation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GatewayAdvertisedRoute_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateGatewayAdvertisedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetGatewayAdvertisedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteGatewayAdvertisedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetGroupRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "1google/cloud/networkconnectivity/v1beta/hub.proto\022\'google.cloud.networkconnect" + + "ivity.v1beta\032\034google/api/annotations.pro" + + "to\032\027google/api/client.proto\032\037google/api/" + + "field_behavior.proto\032\033google/api/field_i" + + "nfo.proto\032\031google/api/resource.proto\0324go" + + "ogle/cloud/networkconnectivity/v1beta/co" + + "mmon.proto\032#google/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\341\006\n" + + "\003Hub\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022H\n" + + "\006labels\030\004" + + " \003(\01328.google.cloud.networkconnectivity.v1beta.Hub.LabelsEntry\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\022\026\n" + + "\tunique_id\030\010 \001(\tB\003\340A\003\022B\n" + + "\005state\030\t" + + " \001(\0162..google.cloud.networkconnectivity.v1beta.StateB\003\340A\003\022N\n" + + "\014routing_vpcs\030\n" + + " \003(\01323.google.cloud.networkconnectivity.v1beta.RoutingVPCB\003\340A\003\022\031\n" + + "\014route_tables\030\013 \003(\tB\003\340A\003\022Q\n\r" + + "spoke_summary\030\014 \001(\013" + + "25.google.cloud.networkconnectivity.v1beta.SpokeSummaryB\003\340A\003\022M\n" + + "\013policy_mode\030\r" + + " \001(\01623.google.cloud.networkconnectivity.v1beta.PolicyModeB\003\340A\001\022U\n" + + "\017preset_topology\030\016" + + " \001(\01627.google.cloud.networkconnectivity.v1beta.PresetTopologyB\003\340A\001\022\034\n\n" + + "export_psc\030\017 \001(\010B\003\340A\001H\000\210\001\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:[\352AX\n" + + "&networkcon" + + "nectivity.googleapis.com/Hub\022.projects/{project}/locations/global/hubs/{hub}B\r\n" + + "\013_export_psc\"\177\n\n" + + "RoutingVPC\0220\n" + + "\003uri\030\001 \001(\tB#\372A \n" + + "\036compute.googleapis.com/Network\022?\n" + + "2required_for_new_site_to_site_data_transfer_spokes\030\002" + + " \001(\010B\003\340A\003\"\265\r\n" + + "\005Spoke\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022J\n" + + "\006labels\030\004" + + " \003(\0132:.google.cloud.networkconnectivity.v1beta.Spoke.LabelsEntry\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\022;\n" + + "\003hub\030\006 \001(\tB.\340A\005\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022?\n" + + "\005group\030\027 \001(\tB0\340A\001\372A*\n" + + "(networkconnectivity.googleapis.com/Group\022Z\n" + + "\022linked_vpn_tunnels\030\021" + + " \001(\01329.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsB\003\340A\001\022t\n" + + "\037linked_interconnect_attachments\030\022 \001(\0132F" + + ".google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsB\003\340A\001\022w\n" + + "!linked_router_appliance_instances\030\023 \001(\0132G" + + ".google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesB\003\340A\001\022Z\n" + + "\022linked_vpc_network\030\024 \001(\01329.google.cloud." + + "networkconnectivity.v1beta.LinkedVpcNetworkB\003\340A\001\022F\n" + + "\007gateway\030\030 \001(\01320.google.cloud" + + ".networkconnectivity.v1beta.GatewayB\003\340A\001\022k\n" + + "\033linked_producer_vpc_network\030\032 \001(\0132A." + + "google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkB\003\340A\001\022\026\n" + + "\tunique_id\030\013 \001(\tB\003\340A\003\022B\n" + + "\005state\030\017 \001(\0162..google.cl" + + "oud.networkconnectivity.v1beta.StateB\003\340A\003\022P\n" + + "\007reasons\030\025 \003(\0132:.google.cloud.networ" + + "kconnectivity.v1beta.Spoke.StateReasonB\003\340A\003\022K\n\n" + + "spoke_type\030\026 \001(\01622.google.cloud.n" + + "etworkconnectivity.v1beta.SpokeTypeB\003\340A\003\022\021\n" + + "\004etag\030\033 \001(\tB\003\340A\001\022\'\n" + + "\032field_paths_pending_update\030\034 \003(\tB\003\340A\001\032\237\002\n" + + "\013StateReason\022M\n" + + "\004code\030\001" + + " \001(\0162?.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code\022\017\n" + + "\007message\030\002 \001(\t\022\024\n" + + "\014user_details\030\003 \001(\t\"\231\001\n" + + "\004Code\022\024\n" + + "\020CODE_UNSPECIFIED\020\000\022\022\n" + + "\016PENDING_REVIEW\020\001\022\014\n" + + "\010REJECTED\020\002\022\n\n" + + "\006PAUSED\020\003\022\n\n" + + "\006FAILED\020\004\022\031\n" + + "\025UPDATE_PENDING_REVIEW\020\005\022\023\n" + + "\017UPDATE_REJECTED\020\006\022\021\n\r" + + "UPDATE_FAILED\020\007\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:e\352Ab\n" + + "(networkconnectivity.googleapis.com/S" + + "poke\0226projects/{project}/locations/{location}/spokes/{spoke}\"\364\003\n\n" + + "RouteTable\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022O\n" + + "\006labels\030\004 \003(\0132?.google.cloud.networ" + + "kconnectivity.v1beta.RouteTable.LabelsEntry\022\023\n" + + "\013description\030\005 \001(\t\022\020\n" + + "\003uid\030\006 \001(\tB\003\340A\003\022B\n" + + "\005state\030\007" + + " \001(\0162..google.cloud.networkconnectivity.v1beta.StateB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:|\352Ay\n" + + "-networkconnectivity.googleapis.com/RouteTable\022Hprojects/{project}/locations/" + + "global/hubs/{hub}/routeTables/{route_table}\"\307\t\n" + + "\005Route\022\021\n" + + "\004name\030\003 \001(\tB\003\340A\005\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\025\n\r" + + "ip_cidr_range\030\001 \001(\t\022E\n" + + "\004type\030\n" + + " \001(\01622.google.cloud.networkconnectivity.v1beta.RouteTypeB\003\340A\003\022]\n" + + "\024next_hop_vpc_network\030\002 \001(\0132:.google.cloud." + + "networkconnectivity.v1beta.NextHopVpcNetworkB\003\340A\005\022J\n" + + "\006labels\030\006 \003(\0132:.google.cloud" + + ".networkconnectivity.v1beta.Route.LabelsEntry\022\023\n" + + "\013description\030\007 \001(\t\022\020\n" + + "\003uid\030\010 \001(\tB\003\340A\003\022B\n" + + "\005state\030\t" + + " \001(\0162..google.cloud.networkconnectivity.v1beta.StateB\003\340A\003\022?\n" + + "\005spoke\030\013 \001(\tB0\340A\005\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\025\n" + + "\010location\030\014 \001(\tB\003\340A\003\022\025\n" + + "\010priority\030\r" + + " \001(\003B\003\340A\003\022[\n" + + "\023next_hop_vpn_tunnel\030\016" + + " \001(\01329.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelB\003\340A\005\022x\n" + + "\"next_hop_router_appliance_instance\030\017 \001(\013" + + "2G.google.cloud.networkconnectivity.v1be" + + "ta.NextHopRouterApplianceInstanceB\003\340A\005\022u\n" + + " next_hop_interconnect_attachment\030\020 \001(\013" + + "2F.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentB\003\340A\005\022R\n" + + "\016next_hop_spoke\030\022 \001(\01325.google.cloud.net" + + "workconnectivity.v1beta.NextHopSpokeB\003\340A\005\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\212\001\352A\206\001\n" + + "+networkconnectivity.googleapis.com/HubRoute\022Wprojects/{project}" + + "/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}\"\377\004\n" + + "\005Group\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022O\n" + + "\006labels\030\004 \003(\0132:.google.cloud.ne" + + "tworkconnectivity.v1beta.Group.LabelsEntryB\003\340A\001\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\022\020\n" + + "\003uid\030\006 \001(\tB\003\340A\003\022B\n" + + "\005state\030\007 \001(\0162..google.clou" + + "d.networkconnectivity.v1beta.StateB\003\340A\003\022M\n" + + "\013auto_accept\030\010 \001(\01323.google.cloud.netw" + + "orkconnectivity.v1beta.AutoAcceptB\003\340A\001\022J\n" + + "\013route_table\030\t \001(\tB5\340A\003\372A/\n" + + "-networkconnectivity.googleapis.com/RouteTable\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:l\352Ai\n" + + "(networkconnectivity.googleapis.c" + + "om/Group\022=projects/{project}/locations/global/hubs/{hub}/groups/{group}\"/\n\n" + + "AutoAccept\022!\n" + + "\024auto_accept_projects\030\001 \003(\tB\003\340A\001\"\225\001\n" + + "\017ListHubsRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"|\n" + + "\020ListHubsResponse\022:\n" + + "\004hubs\030\001 \003(\0132,.google.cloud.networkconnectivity.v1beta.Hub\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"M\n\r" + + "GetHubRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\"\273\001\n" + + "\020CreateHubRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\023\n" + + "\006hub_id\030\002 \001(\tB\003\340A\002\022>\n" + + "\003hub\030\003 \001(\0132,.google" + + ".cloud.networkconnectivity.v1beta.HubB\003\340A\002\022\027\n\n" + + "request_id\030\004 \001(\tB\003\340A\001\"\241\001\n" + + "\020UpdateHubRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022>\n" + + "\003hub\030\002 \001(\0132,.go" + + "ogle.cloud.networkconnectivity.v1beta.HubB\003\340A\002\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001\"i\n" + + "\020DeleteHubRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022\027\n\n" + + "request_id\030\002 \001(\tB\003\340A\001\"\317\002\n" + + "\024ListHubSpokesRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022\027\n" + + "\017spoke_locations\030\002 \003(\t\022\021\n" + + "\tpage_size\030\003 \001(\005\022\022\n\n" + + "page_token\030\004 \001(\t\022\016\n" + + "\006filter\030\005 \001(\t\022\020\n" + + "\010order_by\030\006 \001(\t\022U\n" + + "\004view\030\007 \001(\0162G.google.cloud.network" + + "connectivity.v1beta.ListHubSpokesRequest.SpokeView\"@\n" + + "\tSpokeView\022\032\n" + + "\026SPOKE_VIEW_UNSPECIFIED\020\000\022\t\n" + + "\005BASIC\020\001\022\014\n" + + "\010DETAILED\020\002\"\205\001\n" + + "\025ListHubSpokesResponse\022>\n" + + "\006spokes\030\001 \003(\0132..google.cloud.networkconnectivity.v1beta.Spoke\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\311\001\n" + + "\025QueryHubStatusRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\022\025\n" + + "\010group_by\030\006 \001(\tB\003\340A\001\"\206\001\n" + + "\026QueryHubStatusResponse\022S\n" + + "\022hub_status_entries\030\001 \003(\01327.google" + + ".cloud.networkconnectivity.v1beta.HubStatusEntry\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\220\001\n" + + "\016HubStatusEntry\022\r\n" + + "\005count\030\001 \001(\005\022\020\n" + + "\010group_by\030\002 \001(\t\022]\n" + + "\026psc_propagation_status\030\003 \001(\0132=." + + "google.cloud.networkconnectivity.v1beta.PscPropagationStatus\"\326\003\n" + + "\024PscPropagationStatus\022\024\n" + + "\014source_spoke\030\001 \001(\t\022\024\n" + + "\014source_group\030\002 \001(\t\022\036\n" + + "\026source_forwarding_rule\030\003 \001(\t\022\024\n" + + "\014target_spoke\030\004 \001(\t\022\024\n" + + "\014target_group\030\005 \001(\t\022P\n" + + "\004code\030\006 \001(\0162B.google.cloud.netwo" + + "rkconnectivity.v1beta.PscPropagationStatus.Code\022\017\n" + + "\007message\030\007 \001(\t\"\342\001\n" + + "\004Code\022\024\n" + + "\020CODE_UNSPECIFIED\020\000\022\t\n" + + "\005READY\020\001\022\017\n" + + "\013PROPAGATING\020\002\0227\n" + + "3ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED\020\003\022)\n" + + "%ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED\020\004\022!\n" + + "\035ERROR_PRODUCER_QUOTA_EXCEEDED\020\005\022!\n" + + "\035ERROR_CONSUMER_QUOTA_EXCEEDED\020\006\"\227\001\n" + + "\021ListSpokesRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\202\001\n" + + "\022ListSpokesResponse\022>\n" + + "\006spokes\030\001 \003(\0132..google.cloud.networkconnectivity.v1beta.Spoke\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"Q\n" + + "\017GetSpokeRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\"\303\001\n" + + "\022CreateSpokeRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\025\n" + + "\010spoke_id\030\002 \001(\tB\003\340A\002\022B\n" + + "\005spoke\030\003" + + " \001(\0132..google.cloud.networkconnectivity.v1beta.SpokeB\003\340A\002\022\027\n\n" + + "request_id\030\004 \001(\tB\003\340A\001\"\247\001\n" + + "\022UpdateSpokeRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022B\n" + + "\005spoke\030\002 \001(\0132..goog" + + "le.cloud.networkconnectivity.v1beta.SpokeB\003\340A\002\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001\"m\n" + + "\022DeleteSpokeRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\027\n" + + "\n" + + "request_id\030\002 \001(\tB\003\340A\001\"\263\001\n" + + "\025AcceptHubSpokeRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022C\n" + + "\tspoke_uri\030\002 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001\"W\n" + + "\026AcceptHubSpokeResponse\022=\n" + + "\005spoke\030\001" + + " \001(\0132..google.cloud.networkconnectivity.v1beta.Spoke\"\311\001\n" + + "\025RejectHubSpokeRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022C\n" + + "\tspoke_uri\030\002 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001\022\024\n" + + "\007details\030\004 \001(\tB\003\340A\001\"W\n" + + "\026RejectHubSpokeResponse\022=\n" + + "\005spoke\030\001" + + " \001(\0132..google.cloud.networkconnectivity.v1beta.Spoke\"\327\001\n" + + "\030AcceptSpokeUpdateRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022C\n" + + "\tspoke_uri\030\002 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\027\n\n" + + "spoke_etag\030\003 \001(\tB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"Z\n" + + "\031AcceptSpokeUpdateResponse\022=\n" + + "\005spoke\030\001" + + " \001(\0132..google.cloud.networkconnectivity.v1beta.Spoke\"\355\001\n" + + "\030RejectSpokeUpdateRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022C\n" + + "\tspoke_uri\030\002 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\027\n\n" + + "spoke_etag\030\003 \001(\tB\003\340A\002\022\024\n" + + "\007details\030\004 \001(\tB\003\340A\001\022\037\n\n" + + "request_id\030\005 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"Z\n" + + "\031RejectSpokeUpdateResponse\022=\n" + + "\005spoke\030\001 \001(\0132..google.cloud.networkconnectivity.v1beta.Spoke\"[\n" + + "\024GetRouteTableRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-networkconnectivity.googleapis.com/RouteTable\"T\n" + + "\017GetRouteRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+networkconnectivity.googleapis.com/HubRoute\"\243\001\n" + + "\021ListRoutesRequest\022E\n" + + "\006parent\030\001 \001(\tB5\340A\002\372A/\n" + + "-networkconnectivity.googleapis.com/RouteTable\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\202\001\n" + + "\022ListRoutesResponse\022>\n" + + "\006routes\030\001 \003(\0132..google.cloud.networkconnectivity.v1beta.Route\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\241\001\n" + + "\026ListRouteTablesRequest\022>\n" + + "\006parent\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\222\001\n" + + "\027ListRouteTablesResponse\022I\n" + + "\014route_tables\030\001 \003(\013" + + "23.google.cloud.networkconnectivity.v1beta.RouteTable\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\234\001\n" + + "\021ListGroupsRequest\022>\n" + + "\006parent\030\001 \001(\tB.\340A\002\372A(\n" + + "&networkconnectivity.googleapis.com/Hub\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\202\001\n" + + "\022ListGroupsResponse\022>\n" + + "\006groups\030\001 \003(\0132..google.cloud.networkconnectivity.v1beta.Group\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\314\001\n" + + "\020LinkedVpnTunnels\0223\n" + + "\004uris\030\001 \003(\tB%\372A\"\n" + + " compute.googleapis.com/VpnTunnel\022\"\n" + + "\032site_to_site_data_transfer\030\002 \001(\010\022;\n" + + "\013vpc_network\030\003 \001(\tB&\340A\003\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\025include_import_ranges\030\005 \003(\tB\003\340A\001\"\346\001\n" + + "\035LinkedInterconnectAttachments\022@\n" + + "\004uris\030\001 \003(\tB2\372A/\n" + + "-compute.googleapis.com/InterconnectAttachment\022\"\n" + + "\032site_to_site_data_transfer\030\002 \001(\010\022;\n" + + "\013vpc_network\030\003 \001(\tB&\340A\003\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\025include_import_ranges\030\005 \003(\tB\003\340A\001\"\372\001\n" + + "\036LinkedRouterApplianceInstances\022S\n" + + "\tinstances\030\001" + + " \003(\0132@.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance\022\"\n" + + "\032site_to_site_data_transfer\030\002 \001(\010\022;\n" + + "\013vpc_network\030\003 \001(\tB&\340A\003\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\025include_import_ranges\030\005 \003(\tB\003\340A\001\"\270\002\n" + + "\020LinkedVpcNetwork\0223\n" + + "\003uri\030\001 \001(\tB&\340A\002\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\025exclude_export_ranges\030\002 \003(\tB\003\340A\001\022\"\n" + + "\025include_export_ranges\030\003 \003(\tB\003\340A\001\022+\n" + + "\036proposed_include_export_ranges\030\005 \003(\tB\003\340A\003\022+\n" + + "\036proposed_exclude_export_ranges\030\006 \003(\tB\003\340A\003\022M\n" + + "\023producer_vpc_spokes\030\004 \003(\tB0\340A\003\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\"\331\003\n" + + "\007Gateway\022g\n" + + "\025ip_range_reservations\030\007 \003" + + "(\0132C.google.cloud.networkconnectivity.v1beta.Gateway.IpRangeReservationB\003\340A\001\022W\n" + + "\010capacity\030\n" + + " \001(\0162@.google.cloud.networkcon" + + "nectivity.v1beta.Gateway.GatewayCapacityB\003\340A\001\022\032\n\r" + + "cloud_routers\030\r" + + " \003(\tB\003\340A\003\022L\n" + + "\016sac_attachment\030\016 \001(\tB4\340A\003\372A.\n" + + ",networksecurity.googleapis.com/SACAttachment\032+\n" + + "\022IpRangeReservation\022\025\n" + + "\010ip_range\030\001 \001(\tB\003\340A\002\"u\n" + + "\017GatewayCapacity\022 \n" + + "\034GATEWAY_CAPACITY_UNSPECIFIED\020\000\022\023\n" + + "\017CAPACITY_1_GBPS\020\005\022\024\n" + + "\020CAPACITY_10_GBPS\020\001\022\025\n" + + "\021CAPACITY_100_GBPS\020\004\"\323\006\n" + + "\026GatewayAdvertisedRoute\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022[\n" + + "\006labels\030\004 \003(\0132K.google.cloud.networkconnectivity" + + ".v1beta.GatewayAdvertisedRoute.LabelsEntry\022\023\n" + + "\013description\030\005 \001(\t\022\026\n" + + "\tunique_id\030\006 \001(\tB\003\340A\003\022B\n" + + "\005state\030\007" + + " \001(\0162..google.cloud.networkconnectivity.v1beta.StateB\003\340A\003\022\025\n" + + "\010ip_range\030\010 \001(\tB\003\340A\005\022\032\n" + + "\010priority\030\t \001(\005B\003\340A\001H\000\210\001\001\022a\n" + + "\trecipient\030\n" + + " \001(\0162I.google.cloud" + + ".networkconnectivity.v1beta.GatewayAdvertisedRoute.RecipientB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"<\n" + + "\tRecipient\022\031\n" + + "\025RECIPIENT_UNSPECIFIED\020\000\022\024\n" + + "\020ADVERTISE_TO_HUB\020\001:\333\001\352A\327\001\n" + + "9networkconnectivity.googleapis.com/GatewayAdvertisedRoute" + + "\022iprojects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes" + + "/{gateway_advertised_route}*\027gatewayAdvertisedRoutes2\026gatewayAdvertisedRouteB\013\n" + + "\t_priority\"\232\002\n" + + "#CreateGatewayAdvertisedRouteRequest\022@\n" + + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022(\n" + + "\033gateway_advertised_route_id\030\002 \001(\tB\003\340A\002\022f\n" + + "\030gateway_advertised_route\030\003 \001(\0132?.google" + + ".cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"s\n" + + " GetGatewayAdvertisedRouteRequest\022O\n" + + "\004name\030\001 \001(\tBA\340A\002\372A;\n" + + "9networkconnectivity.googleapis.com/GatewayAdvertisedRoute\"\271\001\n" + + "\"ListGatewayAdvertisedRoutesRequest\022@\n" + + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\267\001\n" + + "#ListGatewayAdvertisedRoutesResponse\022b\n" + + "\031gateway_advertised_routes\030\001 \003(\0132?.goo" + + "gle.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\344\001\n" + + "#UpdateGatewayAdvertisedRouteRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022f\n" + + "\030gateway_advertised_route\030\002 \001(\0132?.goog" + + "le.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\227\001\n" + + "#DeleteGatewayAdvertisedRouteRequest\022O\n" + + "\004name\030\001 \001(\tBA\340A\002\372A;\n" + + "9networkconnectivity.googleapis.com/GatewayAdvertisedRoute\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\243\003\n" + + "\030LinkedProducerVpcNetwork\0227\n" + + "\007network\030\001 \001(\tB&\340A\005\372A \n" + + "\036compute.googleapis.com/Network\022T\n" + + "\032service_consumer_vpc_spoke\030\006 \001(\tB0\340A\003\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\024\n" + + "\007peering\030\002 \001(\tB\003\340A\005\022@\n" + + "\020producer_network\030\005 \001(\tB&\340A\003\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\025exclude_export_ranges\030\003 \003(\tB\003\340A\001\022\"\n" + + "\025include_export_ranges\030\004 \003(\tB\003\340A\001\022+\n" + + "\036proposed_include_export_ranges\030\007 \003(\tB\003\340A\003\022+\n" + + "\036proposed_exclude_export_ranges\030\010 \003(\tB\003\340A\003\"l\n" + + "\027RouterApplianceInstance\022=\n" + + "\017virtual_machine\030\001 \001(\tB$\372A!\n" + + "\037compute.googleapis.com/Instance\022\022\n\n" + + "ip_address\030\003 \001(\t\"g\n" + + "\020LocationMetadata\022S\n" + + "\021location_features\030\001 \003(\01628.google.c" + + "loud.networkconnectivity.v1beta.LocationFeature\"E\n" + + "\021NextHopVpcNetwork\0220\n" + + "\003uri\030\001 \001(\tB#\372A \n" + + "\036compute.googleapis.com/Network\"\244\001\n" + + "\020NextHopVPNTunnel\0222\n" + + "\003uri\030\001 \001(\tB%\372A\"\n" + + " compute.googleapis.com/VpnTunnel\0228\n" + + "\013vpc_network\030\002 \001(\tB#\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\032site_to_site_data_transfer\030\003 \001(\010\"\261\001\n" + + "\036NextHopRouterApplianceInstance\0221\n" + + "\003uri\030\001 \001(\tB$\372A!\n" + + "\037compute.googleapis.com/Instance\0228\n" + + "\013vpc_network\030\002 \001(\tB#\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\032site_to_site_data_transfer\030\003 \001(\010\"\276\001\n" + + "\035NextHopInterconnectAttachment\022?\n" + + "\003uri\030\001 \001(\tB2\372A/\n" + + "-compute.googleapis.com/InterconnectAttachment\0228\n" + + "\013vpc_network\030\002 \001(\tB#\372A \n" + + "\036compute.googleapis.com/Network\022\"\n" + + "\032site_to_site_data_transfer\030\003 \001(\010\"n\n" + + "\014NextHopSpoke\022:\n" + + "\003uri\030\001 \001(\tB-\372A*\n" + + "(networkconnectivity.googleapis.com/Spoke\022\"\n" + + "\032site_to_site_data_transfer\030\002 \001(\010\"\276\005\n" + + "\014SpokeSummary\022d\n" + + "\021spoke_type_counts\030\001 \003(\0132D.google.cloud.networkcon" + + "nectivity.v1beta.SpokeSummary.SpokeTypeCountB\003\340A\003\022f\n" + + "\022spoke_state_counts\030\002 \003(\0132E.google.cloud.networkconnectivity.v1beta.", + "SpokeSummary.SpokeStateCountB\003\340A\003\022s\n" + + "\031spoke_state_reason_counts\030\003 \003(\0132K.google.cl" + + "oud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountB\003\340A\003\032q\n" + + "\016SpokeTypeCount\022K\n\n" + + "spoke_type\030\001 \001(\01622.google.cl" + + "oud.networkconnectivity.v1beta.SpokeTypeB\003\340A\003\022\022\n" + + "\005count\030\002 \001(\003B\003\340A\003\032i\n" + + "\017SpokeStateCount\022B\n" + + "\005state\030\001" + + " \001(\0162..google.cloud.networkconnectivity.v1beta.StateB\003\340A\003\022\022\n" + + "\005count\030\002 \001(\003B\003\340A\003\032\214\001\n" + + "\025SpokeStateReasonCount\022_\n" + + "\021state_reason_code\030\001 \001(\0162?.google.cloud" + + ".networkconnectivity.v1beta.Spoke.StateReason.CodeB\003\340A\003\022\022\n" + + "\005count\030\002 \001(\003B\003\340A\003\"Q\n" + + "\017GetGroupRequest\022>\n" + + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + + "(networkconnectivity.googleapis.com/Group\"\247\001\n" + + "\022UpdateGroupRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022B\n" + + "\005group\030\002" + + " \001(\0132..google.cloud.networkconnectivity.v1beta.GroupB\003\340A\002\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001*l\n" + + "\tRouteType\022\032\n" + + "\026ROUTE_TYPE_UNSPECIFIED\020\000\022\026\n" + + "\022VPC_PRIMARY_SUBNET\020\001\022\030\n" + + "\024VPC_SECONDARY_SUBNET\020\002\022\021\n\r" + + "DYNAMIC_ROUTE\020\003*\232\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\014\n" + + "\010DELETING\020\003\022\r\n" + + "\tACCEPTING\020\010\022\r\n" + + "\tREJECTING\020\t\022\014\n" + + "\010UPDATING\020\006\022\014\n" + + "\010INACTIVE\020\007\022\014\n" + + "\010OBSOLETE\020\n" + + "\022\n\n" + + "\006FAILED\020\013*\242\001\n" + + "\tSpokeType\022\032\n" + + "\026SPOKE_TYPE_UNSPECIFIED\020\000\022\016\n" + + "\n" + + "VPN_TUNNEL\020\001\022\033\n" + + "\027INTERCONNECT_ATTACHMENT\020\002\022\024\n" + + "\020ROUTER_APPLIANCE\020\003\022\017\n" + + "\013VPC_NETWORK\020\004\022\013\n" + + "\007GATEWAY\020\005\022\030\n" + + "\024PRODUCER_VPC_NETWORK\020\007*5\n\n" + + "PolicyMode\022\033\n" + + "\027POLICY_MODE_UNSPECIFIED\020\000\022\n\n" + + "\006PRESET\020\001*\\\n" + + "\016PresetTopology\022\037\n" + + "\033PRESET_TOPOLOGY_UNSPECIFIED\020\000\022\010\n" + + "\004MESH\020\002\022\010\n" + + "\004STAR\020\003\022\025\n" + + "\021HYBRID_INSPECTION\020\004*z\n" + + "\017LocationFeature\022 \n" + + "\034LOCATION_FEATURE_UNSPECIFIED\020\000\022\030\n" + + "\024SITE_TO_CLOUD_SPOKES\020\001\022\027\n" + + "\023SITE_TO_SITE_SPOKES\020\002\022\022\n" + + "\016GATEWAY_SPOKES\020\0032\3274\n\n" + + "HubService\022\303\001\n" + + "\010ListHubs\0228.google.cloud.networkconnectivity.v1beta.ListHubsRequest\032" + + "9.google.cloud.networkconnectivity.v1bet" + + "a.ListHubsResponse\"B\332A\006parent\202\323\344\223\0023\0221/v1" + + "beta/{parent=projects/*/locations/global}/hubs\022\260\001\n" + + "\006GetHub\0226.google.cloud.networkconnectivity.v1beta.GetHubRequest\032,.goog" + + "le.cloud.networkconnectivity.v1beta.Hub\"" + + "@\332A\004name\202\323\344\223\0023\0221/v1beta/{name=projects/*/locations/global/hubs/*}\022\324\001\n" + + "\tCreateHub\0229.google.cloud.networkconnectivity.v1bet" + + "a.CreateHubRequest\032\035.google.longrunning.Operation\"m\312A\030\n" + + "\003Hub\022\021OperationMetadata\332A" + + "\021parent,hub,hub_id\202\323\344\223\0028\"1/v1beta/{paren" + + "t=projects/*/locations/global}/hubs:\003hub\022\326\001\n" + + "\tUpdateHub\0229.google.cloud.networkcon" + + "nectivity.v1beta.UpdateHubRequest\032\035.google.longrunning.Operation\"o\312A\030\n" + + "\003Hub\022\021OperationMetadata\332A\017hub,update_mask\202\323\344\223\002<25/" + + "v1beta/{hub.name=projects/*/locations/global/hubs/*}:\003hub\022\324\001\n" + + "\tDeleteHub\0229.google.cloud.networkconnectivity.v1beta.Delete" + + "HubRequest\032\035.google.longrunning.Operation\"m\312A*\n" + + "\025google.protobuf.Empty\022\021Operation" + + "Metadata\332A\004name\202\323\344\223\0023*1/v1beta/{name=projects/*/locations/global/hubs/*}\022\333\001\n\r" + + "ListHubSpokes\022=.google.cloud.networkconnect" + + "ivity.v1beta.ListHubSpokesRequest\032>.google.cloud.networkconnectivity.v1beta.List" + + "HubSpokesResponse\"K\332A\004name\202\323\344\223\002>\022.google.cloud.networkconnectivity.v1beta.Quer" + + "yHubStatusRequest\032?.google.cloud.networkconnectivity.v1beta.QueryHubStatusRespon" + + "se\"L\332A\004name\202\323\344\223\002?\022=/v1beta/{name=project" + + "s/*/locations/global/hubs/*}:queryStatus\022\306\001\n\n" + + "ListSpokes\022:.google.cloud.networkconnectivity.v1beta.ListSpokesRequest\032;.go" + + "ogle.cloud.networkconnectivity.v1beta.Li" + + "stSpokesResponse\"?\332A\006parent\202\323\344\223\0020\022./v1be" + + "ta/{parent=projects/*/locations/*}/spokes\022\263\001\n" + + "\010GetSpoke\0228.google.cloud.networkconnectivity.v1beta.GetSpokeRequest\032..googl" + + "e.cloud.networkconnectivity.v1beta.Spoke" + + "\"=\332A\004name\202\323\344\223\0020\022./v1beta/{name=projects/*/locations/*/spokes/*}\022\335\001\n" + + "\013CreateSpoke\022;.google.cloud.networkconnectivity.v1bet" + + "a.CreateSpokeRequest\032\035.google.longrunning.Operation\"r\312A\032\n" + + "\005Spoke\022\021OperationMetada" + + "ta\332A\025parent,spoke,spoke_id\202\323\344\223\0027\"./v1bet" + + "a/{parent=projects/*/locations/*}/spokes:\005spoke\022\337\001\n" + + "\013UpdateSpoke\022;.google.cloud.networkconnectivity.v1beta.UpdateSpokeReq" + + "uest\032\035.google.longrunning.Operation\"t\312A\032\n" + + "\005Spoke\022\021OperationMetadata\332A\021spoke,updat" + + "e_mask\202\323\344\223\002=24/v1beta/{spoke.name=projects/*/locations/*/spokes/*}:\005spoke\022\371\001\n" + + "\016RejectHubSpoke\022>.google.cloud.networkconne" + + "ctivity.v1beta.RejectHubSpokeRequest\032\035.google.longrunning.Operation\"\207\001\312A+\n" + + "\026RejectHubSpokeResponse\022\021OperationMetadata\332A\016n" + + "ame,spoke_uri\202\323\344\223\002B\"=/v1beta/{name=proje" + + "cts/*/locations/global/hubs/*}:rejectSpoke:\001*\022\371\001\n" + + "\016AcceptHubSpoke\022>.google.cloud.networkconnectivity.v1beta.AcceptHubSpok" + + "eRequest\032\035.google.longrunning.Operation\"\207\001\312A+\n" + + "\026AcceptHubSpokeResponse\022\021Operation" + + "Metadata\332A\016name,spoke_uri\202\323\344\223\002B\"=/v1beta" + + "/{name=projects/*/locations/global/hubs/*}:acceptSpoke:\001*\022\223\002\n" + + "\021AcceptSpokeUpdate\022A.google.cloud.networkconnectivity.v1bet" + + "a.AcceptSpokeUpdateRequest\032\035.google.longrunning.Operation\"\233\001\312A.\n" + + "\031AcceptSpokeUpdateResponse\022\021OperationMetadata\332A\031name,spo" + + "ke_uri,spoke_etag\202\323\344\223\002H\"C/v1beta/{name=p" + + "rojects/*/locations/global/hubs/*}:acceptSpokeUpdate:\001*\022\223\002\n" + + "\021RejectSpokeUpdate\022A.google.cloud.networkconnectivity.v1beta." + + "RejectSpokeUpdateRequest\032\035.google.longrunning.Operation\"\233\001\312A.\n" + + "\031RejectSpokeUpdateResponse\022\021OperationMetadata\332A\031name,spoke" + + "_uri,spoke_etag\202\323\344\223\002H\"C/v1beta/{name=pro" + + "jects/*/locations/global/hubs/*}:rejectSpokeUpdate:\001*\022\325\001\n" + + "\013DeleteSpoke\022;.google.cloud.networkconnectivity.v1beta.DeleteSp" + + "okeRequest\032\035.google.longrunning.Operation\"j\312A*\n" + + "\025google.protobuf.Empty\022\021Operation" + + "Metadata\332A\004name\202\323\344\223\0020*./v1beta/{name=projects/*/locations/*/spokes/*}\022\323\001\n\r" + + "GetRouteTable\022=.google.cloud.networkconnectivi" + + "ty.v1beta.GetRouteTableRequest\0323.google.cloud.networkconnectivity.v1beta.RouteTa" + + "ble\"N\332A\004name\202\323\344\223\002A\022?/v1beta/{name=projec" + + "ts/*/locations/global/hubs/*/routeTables/*}\022\315\001\n" + + "\010GetRoute\0228.google.cloud.networkconnectivity.v1beta.GetRouteRequest\032..goo" + + "gle.cloud.networkconnectivity.v1beta.Rou" + + "te\"W\332A\004name\202\323\344\223\002J\022H/v1beta/{name=project" + + "s/*/locations/global/hubs/*/routeTables/*/routes/*}\022\340\001\n\n" + + "ListRoutes\022:.google.cloud.networkconnectivity.v1beta.ListRoutesR" + + "equest\032;.google.cloud.networkconnectivit" + + "y.v1beta.ListRoutesResponse\"Y\332A\006parent\202\323" + + "\344\223\002J\022H/v1beta/{parent=projects/*/locatio" + + "ns/global/hubs/*/routeTables/*}/routes\022\346\001\n" + + "\017ListRouteTables\022?.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequ" + + "est\032@.google.cloud.networkconnectivity.v" + + "1beta.ListRouteTablesResponse\"P\332A\006parent" + + "\202\323\344\223\002A\022?/v1beta/{parent=projects/*/locations/global/hubs/*}/routeTables\022\277\001\n" + + "\010GetGroup\0228.google.cloud.networkconnectivity." + + "v1beta.GetGroupRequest\032..google.cloud.ne" + + "tworkconnectivity.v1beta.Group\"I\332A\004name\202" + + "\323\344\223\002<\022:/v1beta/{name=projects/*/locations/global/hubs/*/groups/*}\022\322\001\n\n" + + "ListGroups\022:.google.cloud.networkconnectivity.v1be" + + "ta.ListGroupsRequest\032;.google.cloud.networkconnectivity.v1beta.ListGroupsRespons" + + "e\"K\332A\006parent\202\323\344\223\002<\022:/v1beta/{parent=proj" + + "ects/*/locations/global/hubs/*}/groups\022\354\001\n" + + "\013UpdateGroup\022;.google.cloud.networkcon" + + "nectivity.v1beta.UpdateGroupRequest\032\035.google.longrunning.Operation\"\200\001\312A\032\n" + + "\005Group\022\021OperationMetadata\332A\021group,update_mask\202\323" + + "\344\223\002I2@/v1beta/{group.name=projects/*/loc" + + "ations/global/hubs/*/groups/*}:\005group\022\344\002\n" + + "\034CreateGatewayAdvertisedRoute\022L.google.cloud.networkconnectivity.v1beta.CreateG" + + "atewayAdvertisedRouteRequest\032\035.google.longrunning.Operation\"\326\001\312A+\n" + + "\026GatewayAdvertisedRoute\022\021OperationMetadata\332A;parent,ga" + + "teway_advertised_route,gateway_advertise" + + "d_route_id\202\323\344\223\002d\"H/v1beta/{parent=projec" + + "ts/*/locations/*/spokes/*}/gatewayAdvertisedRoutes:\030gateway_advertised_route\022\200\002\n" + + "\031GetGatewayAdvertisedRoute\022I.google.cloud.networkconnectivity.v1beta.GetGatewayA" + + "dvertisedRouteRequest\032?.google.cloud.networkconnectivity.v1beta.GatewayAdvertise" + + "dRoute\"W\332A\004name\202\323\344\223\002J\022H/v1beta/{name=pro" + + "jects/*/locations/*/spokes/*/gatewayAdvertisedRoutes/*}\022\223\002\n" + + "\033ListGatewayAdvertisedRoutes\022K.google.cloud.networkconnectivi" + + "ty.v1beta.ListGatewayAdvertisedRoutesRequest\032L.google.cloud.networkconnectivity." + + "v1beta.ListGatewayAdvertisedRoutesRespon" + + "se\"Y\332A\006parent\202\323\344\223\002J\022H/v1beta/{parent=pro" + + "jects/*/locations/*/spokes/*}/gatewayAdvertisedRoutes\022\346\002\n" + + "\034UpdateGatewayAdvertisedRoute\022L.google.cloud.networkconnectivit" + + "y.v1beta.UpdateGatewayAdvertisedRouteReq" + + "uest\032\035.google.longrunning.Operation\"\330\001\312A+\n" + + "\026GatewayAdvertisedRoute\022\021OperationMeta" + + "data\332A$gateway_advertised_route,update_m" + + "ask\202\323\344\223\002}2a/v1beta/{gateway_advertised_r" + + "oute.name=projects/*/locations/*/spokes/" + + "*/gatewayAdvertisedRoutes/*}:\030gateway_advertised_route\022\222\002\n" + + "\034DeleteGatewayAdvertisedRoute\022L.google.cloud.networkconnectivi" + + "ty.v1beta.DeleteGatewayAdvertisedRouteRe" + + "quest\032\035.google.longrunning.Operation\"\204\001\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMeta" + + "data\332A\004name\202\323\344\223\002J*H/v1beta/{name=project" + + "s/*/locations/*/spokes/*/gatewayAdvertis" + + "edRoutes/*}\032V\312A\"networkconnectivity.goog" + + "leapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\320\004\n" + + "+com.google.cloud.networkconnectivity.v1betaB\010HubProtoP\001Z" + + "]cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;network" + + "connectivitypb\252\002\'Google.Cloud.NetworkCon" + + "nectivity.V1Beta\312\002\'Google\\Cloud\\NetworkC" + + "onnectivity\\V1beta\352\002*Google::Cloud::NetworkConnectivity::V1beta\352A`\n" + + " compute.googleapis.com/VpnTunnel\022 fieldValuesMap; + private final String project; + private final String hub; + private final String routeTable; + private final String route; + + @Deprecated + protected HubRouteName() { + project = null; + hub = null; + routeTable = null; + route = null; + } + + private HubRouteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + routeTable = Preconditions.checkNotNull(builder.getRouteTable()); + route = Preconditions.checkNotNull(builder.getRoute()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public String getRoute() { + return route; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static HubRouteName of(String project, String hub, String routeTable, String route) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .setRoute(route) + .build(); + } + + public static String format(String project, String hub, String routeTable, String route) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .setRoute(route) + .build() + .toString(); + } + + public static HubRouteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_ROUTE_TABLE_ROUTE.validatedMatch( + formattedString, "HubRouteName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("hub"), + matchMap.get("route_table"), + matchMap.get("route")); + } + + 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 (HubRouteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_ROUTE_TABLE_ROUTE.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 (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (routeTable != null) { + fieldMapBuilder.put("route_table", routeTable); + } + if (route != null) { + fieldMapBuilder.put("route", route); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_ROUTE_TABLE_ROUTE.instantiate( + "project", project, "hub", hub, "route_table", routeTable, "route", route); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + HubRouteName that = ((HubRouteName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.routeTable, that.routeTable) + && Objects.equals(this.route, that.route); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(routeTable); + h *= 1000003; + h ^= Objects.hashCode(route); + return h; + } + + /** + * Builder for + * projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}. + */ + public static class Builder { + private String project; + private String hub; + private String routeTable; + private String route; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public String getRoute() { + return route; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setRouteTable(String routeTable) { + this.routeTable = routeTable; + return this; + } + + public Builder setRoute(String route) { + this.route = route; + return this; + } + + private Builder(HubRouteName hubRouteName) { + this.project = hubRouteName.project; + this.hub = hubRouteName.hub; + this.routeTable = hubRouteName.routeTable; + this.route = hubRouteName.route; + } + + public HubRouteName build() { + return new HubRouteName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntry.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntry.java new file mode 100644 index 000000000000..1e46d644adbd --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntry.java @@ -0,0 +1,1038 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A hub status entry represents the status of a set of propagated Private
+ * Service Connect connections grouped by certain fields.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.HubStatusEntry} + */ +@com.google.protobuf.Generated +public final class HubStatusEntry extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.HubStatusEntry) + HubStatusEntryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HubStatusEntry"); + } + + // Use HubStatusEntry.newBuilder() to construct. + private HubStatusEntry(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HubStatusEntry() { + groupBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.class, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder.class); + } + + private int bitField0_; + public static final int COUNT_FIELD_NUMBER = 1; + private int count_ = 0; + + /** + * + * + *
+   * The number of propagated Private Service Connect connections with this
+   * status. If the `group_by` field was not set in the request message, the
+   * value of this field is 1.
+   * 
+ * + * int32 count = 1; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + + public static final int GROUP_BY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object groupBy_ = ""; + + /** + * + * + *
+   * The fields that this entry is grouped by. This has the same value as the
+   * `group_by` field in the request message.
+   * 
+ * + * string group_by = 2; + * + * @return The groupBy. + */ + @java.lang.Override + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupBy_ = s; + return s; + } + } + + /** + * + * + *
+   * The fields that this entry is grouped by. This has the same value as the
+   * `group_by` field in the request message.
+   * 
+ * + * string group_by = 2; + * + * @return The bytes for groupBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PSC_PROPAGATION_STATUS_FIELD_NUMBER = 3; + private com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus pscPropagationStatus_; + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return Whether the pscPropagationStatus field is set. + */ + @java.lang.Override + public boolean hasPscPropagationStatus() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return The pscPropagationStatus. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + getPscPropagationStatus() { + return pscPropagationStatus_ == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance() + : pscPropagationStatus_; + } + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder + getPscPropagationStatusOrBuilder() { + return pscPropagationStatus_ == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance() + : pscPropagationStatus_; + } + + 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 (count_ != 0) { + output.writeInt32(1, count_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, groupBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPscPropagationStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (count_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, count_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, groupBy_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPscPropagationStatus()); + } + 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.networkconnectivity.v1beta.HubStatusEntry)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry other = + (com.google.cloud.networkconnectivity.v1beta.HubStatusEntry) obj; + + if (getCount() != other.getCount()) return false; + if (!getGroupBy().equals(other.getGroupBy())) return false; + if (hasPscPropagationStatus() != other.hasPscPropagationStatus()) return false; + if (hasPscPropagationStatus()) { + if (!getPscPropagationStatus().equals(other.getPscPropagationStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount(); + hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; + hash = (53 * hash) + getGroupBy().hashCode(); + if (hasPscPropagationStatus()) { + hash = (37 * hash) + PSC_PROPAGATION_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getPscPropagationStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry 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.networkconnectivity.v1beta.HubStatusEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry 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.networkconnectivity.v1beta.HubStatusEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A hub status entry represents the status of a set of propagated Private
+   * Service Connect connections grouped by certain fields.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.HubStatusEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.HubStatusEntry) + com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.class, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPscPropagationStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + count_ = 0; + groupBy_ = ""; + pscPropagationStatus_ = null; + if (pscPropagationStatusBuilder_ != null) { + pscPropagationStatusBuilder_.dispose(); + pscPropagationStatusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_HubStatusEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry build() { + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry buildPartial() { + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry result = + new com.google.cloud.networkconnectivity.v1beta.HubStatusEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.HubStatusEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.groupBy_ = groupBy_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pscPropagationStatus_ = + pscPropagationStatusBuilder_ == null + ? pscPropagationStatus_ + : pscPropagationStatusBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.HubStatusEntry) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.HubStatusEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.HubStatusEntry other) { + if (other == com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.getDefaultInstance()) + return this; + if (other.getCount() != 0) { + setCount(other.getCount()); + } + if (!other.getGroupBy().isEmpty()) { + groupBy_ = other.groupBy_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPscPropagationStatus()) { + mergePscPropagationStatus(other.getPscPropagationStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + count_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + groupBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetPscPropagationStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int count_; + + /** + * + * + *
+     * The number of propagated Private Service Connect connections with this
+     * status. If the `group_by` field was not set in the request message, the
+     * value of this field is 1.
+     * 
+ * + * int32 count = 1; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + + /** + * + * + *
+     * The number of propagated Private Service Connect connections with this
+     * status. If the `group_by` field was not set in the request message, the
+     * value of this field is 1.
+     * 
+ * + * int32 count = 1; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(int value) { + + count_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The number of propagated Private Service Connect connections with this
+     * status. If the `group_by` field was not set in the request message, the
+     * value of this field is 1.
+     * 
+ * + * int32 count = 1; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0; + onChanged(); + return this; + } + + private java.lang.Object groupBy_ = ""; + + /** + * + * + *
+     * The fields that this entry is grouped by. This has the same value as the
+     * `group_by` field in the request message.
+     * 
+ * + * string group_by = 2; + * + * @return The groupBy. + */ + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The fields that this entry is grouped by. This has the same value as the
+     * `group_by` field in the request message.
+     * 
+ * + * string group_by = 2; + * + * @return The bytes for groupBy. + */ + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The fields that this entry is grouped by. This has the same value as the
+     * `group_by` field in the request message.
+     * 
+ * + * string group_by = 2; + * + * @param value The groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + groupBy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The fields that this entry is grouped by. This has the same value as the
+     * `group_by` field in the request message.
+     * 
+ * + * string group_by = 2; + * + * @return This builder for chaining. + */ + public Builder clearGroupBy() { + groupBy_ = getDefaultInstance().getGroupBy(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The fields that this entry is grouped by. This has the same value as the
+     * `group_by` field in the request message.
+     * 
+ * + * string group_by = 2; + * + * @param value The bytes for groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + groupBy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus pscPropagationStatus_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder> + pscPropagationStatusBuilder_; + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return Whether the pscPropagationStatus field is set. + */ + public boolean hasPscPropagationStatus() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return The pscPropagationStatus. + */ + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + getPscPropagationStatus() { + if (pscPropagationStatusBuilder_ == null) { + return pscPropagationStatus_ == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance() + : pscPropagationStatus_; + } else { + return pscPropagationStatusBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public Builder setPscPropagationStatus( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus value) { + if (pscPropagationStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pscPropagationStatus_ = value; + } else { + pscPropagationStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public Builder setPscPropagationStatus( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder builderForValue) { + if (pscPropagationStatusBuilder_ == null) { + pscPropagationStatus_ = builderForValue.build(); + } else { + pscPropagationStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public Builder mergePscPropagationStatus( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus value) { + if (pscPropagationStatusBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && pscPropagationStatus_ != null + && pscPropagationStatus_ + != com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + .getDefaultInstance()) { + getPscPropagationStatusBuilder().mergeFrom(value); + } else { + pscPropagationStatus_ = value; + } + } else { + pscPropagationStatusBuilder_.mergeFrom(value); + } + if (pscPropagationStatus_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public Builder clearPscPropagationStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + pscPropagationStatus_ = null; + if (pscPropagationStatusBuilder_ != null) { + pscPropagationStatusBuilder_.dispose(); + pscPropagationStatusBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder + getPscPropagationStatusBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetPscPropagationStatusFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder + getPscPropagationStatusOrBuilder() { + if (pscPropagationStatusBuilder_ != null) { + return pscPropagationStatusBuilder_.getMessageOrBuilder(); + } else { + return pscPropagationStatus_ == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance() + : pscPropagationStatus_; + } + } + + /** + * + * + *
+     * The Private Service Connect propagation status.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder> + internalGetPscPropagationStatusFieldBuilder() { + if (pscPropagationStatusBuilder_ == null) { + pscPropagationStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder>( + getPscPropagationStatus(), getParentForChildren(), isClean()); + pscPropagationStatus_ = null; + } + return pscPropagationStatusBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.HubStatusEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.HubStatusEntry) + private static final com.google.cloud.networkconnectivity.v1beta.HubStatusEntry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.HubStatusEntry(); + } + + public static com.google.cloud.networkconnectivity.v1beta.HubStatusEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HubStatusEntry 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.networkconnectivity.v1beta.HubStatusEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntryOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntryOrBuilder.java new file mode 100644 index 000000000000..568300ba58eb --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/HubStatusEntryOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface HubStatusEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.HubStatusEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The number of propagated Private Service Connect connections with this
+   * status. If the `group_by` field was not set in the request message, the
+   * value of this field is 1.
+   * 
+ * + * int32 count = 1; + * + * @return The count. + */ + int getCount(); + + /** + * + * + *
+   * The fields that this entry is grouped by. This has the same value as the
+   * `group_by` field in the request message.
+   * 
+ * + * string group_by = 2; + * + * @return The groupBy. + */ + java.lang.String getGroupBy(); + + /** + * + * + *
+   * The fields that this entry is grouped by. This has the same value as the
+   * `group_by` field in the request message.
+   * 
+ * + * string group_by = 2; + * + * @return The bytes for groupBy. + */ + com.google.protobuf.ByteString getGroupByBytes(); + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return Whether the pscPropagationStatus field is set. + */ + boolean hasPscPropagationStatus(); + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + * + * @return The pscPropagationStatus. + */ + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus getPscPropagationStatus(); + + /** + * + * + *
+   * The Private Service Connect propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus psc_propagation_status = 3; + * + */ + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder + getPscPropagationStatusOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachments.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachments.java new file mode 100644 index 000000000000..05e28e2b1aa7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachments.java @@ -0,0 +1,1346 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A collection of VLAN attachment resources. These resources should
+ * be redundant attachments that all advertise the same prefixes to Google
+ * Cloud. Alternatively, in active/passive configurations, all attachments
+ * should be capable of advertising the same prefixes.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments} + */ +@com.google.protobuf.Generated +public final class LinkedInterconnectAttachments extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) + LinkedInterconnectAttachmentsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LinkedInterconnectAttachments"); + } + + // Use LinkedInterconnectAttachments.newBuilder() to construct. + private LinkedInterconnectAttachments(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LinkedInterconnectAttachments() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.class, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder + .class); + } + + public static final int URIS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 2; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * Output only. The VPC network where these VLAN attachments are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The VPC network where these VLAN attachments are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_IMPORT_RANGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + return includeImportRanges_; + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.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 < uris_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uris_.getRaw(i)); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, vpcNetwork_); + } + for (int i = 0; i < includeImportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, includeImportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, vpcNetwork_); + } + { + int dataSize = 0; + for (int i = 0; i < includeImportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(includeImportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeImportRangesList().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.networkconnectivity.v1beta.LinkedInterconnectAttachments)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments other = + (com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) obj; + + if (!getUrisList().equals(other.getUrisList())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (!getIncludeImportRangesList().equals(other.getIncludeImportRangesList())) 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 (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + if (getIncludeImportRangesCount() > 0) { + hash = (37 * hash) + INCLUDE_IMPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIncludeImportRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments 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.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments 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.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of VLAN attachment resources. These resources should
+   * be redundant attachments that all advertise the same prefixes to Google
+   * Cloud. Alternatively, in active/passive configurations, all attachments
+   * should be capable of advertising the same prefixes.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.class, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + siteToSiteDataTransfer_ = false; + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedInterconnectAttachments_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments build() { + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments result = + new com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + uris_.makeImmutable(); + result.uris_ = uris_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + includeImportRanges_.makeImmutable(); + result.includeImportRanges_ = includeImportRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance()) return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ |= 0x00000001; + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.includeImportRanges_.isEmpty()) { + if (includeImportRanges_.isEmpty()) { + includeImportRanges_ = other.includeImportRanges_; + bitField0_ |= 0x00000008; + } else { + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.addAll(other.includeImportRanges_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 10 + case 16: + { + siteToSiteDataTransfer_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrisIsMutable() { + if (!uris_.isModifiable()) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + uris_.makeImmutable(); + return uris_; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked interconnect attachment resources
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000002); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * Output only. The VPC network where these VLAN attachments are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these VLAN attachments are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these VLAN attachments are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these VLAN attachments are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these VLAN attachments are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludeImportRangesIsMutable() { + if (!includeImportRanges_.isModifiable()) { + includeImportRanges_ = new com.google.protobuf.LazyStringArrayList(includeImportRanges_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + includeImportRanges_.makeImmutable(); + return includeImportRanges_; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includeImportRanges to set. + * @return This builder for chaining. + */ + public Builder setIncludeImportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeImportRanges(java.lang.Iterable values) { + ensureIncludeImportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeImportRanges_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeImportRanges() { + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) + private static final com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedInterconnectAttachments 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.networkconnectivity.v1beta.LinkedInterconnectAttachments + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachmentsOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachmentsOrBuilder.java new file mode 100644 index 000000000000..4d86526b6f83 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedInterconnectAttachmentsOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LinkedInterconnectAttachmentsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + int getUrisCount(); + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + + /** + * + * + *
+   * The URIs of linked interconnect attachment resources
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); + + /** + * + * + *
+   * Output only. The VPC network where these VLAN attachments are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * Output only. The VPC network where these VLAN attachments are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + java.util.List getIncludeImportRangesList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + int getIncludeImportRangesCount(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + java.lang.String getIncludeImportRanges(int index); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + com.google.protobuf.ByteString getIncludeImportRangesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetwork.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetwork.java new file mode 100644 index 000000000000..32d255e73b09 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetwork.java @@ -0,0 +1,2492 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork} */ +@com.google.protobuf.Generated +public final class LinkedProducerVpcNetwork extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) + LinkedProducerVpcNetworkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LinkedProducerVpcNetwork"); + } + + // Use LinkedProducerVpcNetwork.newBuilder() to construct. + private LinkedProducerVpcNetwork(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LinkedProducerVpcNetwork() { + network_ = ""; + serviceConsumerVpcSpoke_ = ""; + peering_ = ""; + producerNetwork_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder.class); + } + + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+   * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+   * peered with.
+   * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+   * peered with.
+   * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_CONSUMER_VPC_SPOKE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceConsumerVpcSpoke_ = ""; + + /** + * + * + *
+   * Output only. The Service Consumer Network spoke.
+   * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceConsumerVpcSpoke. + */ + @java.lang.Override + public java.lang.String getServiceConsumerVpcSpoke() { + java.lang.Object ref = serviceConsumerVpcSpoke_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceConsumerVpcSpoke_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Service Consumer Network spoke.
+   * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceConsumerVpcSpoke. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceConsumerVpcSpokeBytes() { + java.lang.Object ref = serviceConsumerVpcSpoke_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceConsumerVpcSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEERING_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object peering_ = ""; + + /** + * + * + *
+   * Immutable. The name of the VPC peering between the Service Consumer VPC and
+   * the Producer VPC (defined in the Tenant project) which is added to the NCC
+   * hub. This peering must be in ACTIVE state.
+   * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The peering. + */ + @java.lang.Override + public java.lang.String getPeering() { + java.lang.Object ref = peering_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peering_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The name of the VPC peering between the Service Consumer VPC and
+   * the Producer VPC (defined in the Tenant project) which is added to the NCC
+   * hub. This peering must be in ACTIVE state.
+   * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for peering. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeeringBytes() { + java.lang.Object ref = peering_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peering_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_NETWORK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object producerNetwork_ = ""; + + /** + * + * + *
+   * Output only. The URI of the Producer VPC.
+   * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The producerNetwork. + */ + @java.lang.Override + public java.lang.String getProducerNetwork() { + java.lang.Object ref = producerNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The URI of the Producer VPC.
+   * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for producerNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProducerNetworkBytes() { + java.lang.Object ref = producerNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXCLUDE_EXPORT_RANGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + return excludeExportRanges_; + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + + public static final int INCLUDE_EXPORT_RANGES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeExportRangesList() { + return includeExportRanges_; + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + public int getIncludeExportRangesCount() { + return includeExportRanges_.size(); + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + public java.lang.String getIncludeExportRanges(int index) { + return includeExportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeExportRangesBytes(int index) { + return includeExportRanges_.getByteString(index); + } + + public static final int PROPOSED_INCLUDE_EXPORT_RANGES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList proposedIncludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedIncludeExportRangesList() { + return proposedIncludeExportRanges_; + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + public int getProposedIncludeExportRangesCount() { + return proposedIncludeExportRanges_.size(); + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + public java.lang.String getProposedIncludeExportRanges(int index) { + return proposedIncludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index) { + return proposedIncludeExportRanges_.getByteString(index); + } + + public static final int PROPOSED_EXCLUDE_EXPORT_RANGES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList proposedExcludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedExcludeExportRangesList() { + return proposedExcludeExportRanges_; + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + public int getProposedExcludeExportRangesCount() { + return proposedExcludeExportRanges_.size(); + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + public java.lang.String getProposedExcludeExportRanges(int index) { + return proposedExcludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index) { + return proposedExcludeExportRanges_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, network_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peering_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, peering_); + } + for (int i = 0; i < excludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, excludeExportRanges_.getRaw(i)); + } + for (int i = 0; i < includeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, includeExportRanges_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(producerNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, producerNetwork_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceConsumerVpcSpoke_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, serviceConsumerVpcSpoke_); + } + for (int i = 0; i < proposedIncludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 7, proposedIncludeExportRanges_.getRaw(i)); + } + for (int i = 0; i < proposedExcludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 8, proposedExcludeExportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, network_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peering_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, peering_); + } + { + int dataSize = 0; + for (int i = 0; i < excludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeExportRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < includeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(includeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeExportRangesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(producerNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, producerNetwork_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceConsumerVpcSpoke_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, serviceConsumerVpcSpoke_); + } + { + int dataSize = 0; + for (int i = 0; i < proposedIncludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(proposedIncludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getProposedIncludeExportRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < proposedExcludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(proposedExcludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getProposedExcludeExportRangesList().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.networkconnectivity.v1beta.LinkedProducerVpcNetwork)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork other = + (com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) obj; + + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getServiceConsumerVpcSpoke().equals(other.getServiceConsumerVpcSpoke())) return false; + if (!getPeering().equals(other.getPeering())) return false; + if (!getProducerNetwork().equals(other.getProducerNetwork())) return false; + if (!getExcludeExportRangesList().equals(other.getExcludeExportRangesList())) return false; + if (!getIncludeExportRangesList().equals(other.getIncludeExportRangesList())) return false; + if (!getProposedIncludeExportRangesList().equals(other.getProposedIncludeExportRangesList())) + return false; + if (!getProposedExcludeExportRangesList().equals(other.getProposedExcludeExportRangesList())) + 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) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SERVICE_CONSUMER_VPC_SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getServiceConsumerVpcSpoke().hashCode(); + hash = (37 * hash) + PEERING_FIELD_NUMBER; + hash = (53 * hash) + getPeering().hashCode(); + hash = (37 * hash) + PRODUCER_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getProducerNetwork().hashCode(); + if (getExcludeExportRangesCount() > 0) { + hash = (37 * hash) + EXCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getExcludeExportRangesList().hashCode(); + } + if (getIncludeExportRangesCount() > 0) { + hash = (37 * hash) + INCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIncludeExportRangesList().hashCode(); + } + if (getProposedIncludeExportRangesCount() > 0) { + hash = (37 * hash) + PROPOSED_INCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getProposedIncludeExportRangesList().hashCode(); + } + if (getProposedExcludeExportRangesCount() > 0) { + hash = (37 * hash) + PROPOSED_EXCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getProposedExcludeExportRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork 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.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork 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.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + serviceConsumerVpcSpoke_ = ""; + peering_ = ""; + producerNetwork_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedProducerVpcNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork build() { + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork result = + new com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceConsumerVpcSpoke_ = serviceConsumerVpcSpoke_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.peering_ = peering_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.producerNetwork_ = producerNetwork_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + excludeExportRanges_.makeImmutable(); + result.excludeExportRanges_ = excludeExportRanges_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + includeExportRanges_.makeImmutable(); + result.includeExportRanges_ = includeExportRanges_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + proposedIncludeExportRanges_.makeImmutable(); + result.proposedIncludeExportRanges_ = proposedIncludeExportRanges_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + proposedExcludeExportRanges_.makeImmutable(); + result.proposedExcludeExportRanges_ = proposedExcludeExportRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + .getDefaultInstance()) return this; + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getServiceConsumerVpcSpoke().isEmpty()) { + serviceConsumerVpcSpoke_ = other.serviceConsumerVpcSpoke_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPeering().isEmpty()) { + peering_ = other.peering_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getProducerNetwork().isEmpty()) { + producerNetwork_ = other.producerNetwork_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.excludeExportRanges_.isEmpty()) { + if (excludeExportRanges_.isEmpty()) { + excludeExportRanges_ = other.excludeExportRanges_; + bitField0_ |= 0x00000010; + } else { + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.addAll(other.excludeExportRanges_); + } + onChanged(); + } + if (!other.includeExportRanges_.isEmpty()) { + if (includeExportRanges_.isEmpty()) { + includeExportRanges_ = other.includeExportRanges_; + bitField0_ |= 0x00000020; + } else { + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.addAll(other.includeExportRanges_); + } + onChanged(); + } + if (!other.proposedIncludeExportRanges_.isEmpty()) { + if (proposedIncludeExportRanges_.isEmpty()) { + proposedIncludeExportRanges_ = other.proposedIncludeExportRanges_; + bitField0_ |= 0x00000040; + } else { + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.addAll(other.proposedIncludeExportRanges_); + } + onChanged(); + } + if (!other.proposedExcludeExportRanges_.isEmpty()) { + if (proposedExcludeExportRanges_.isEmpty()) { + proposedExcludeExportRanges_ = other.proposedExcludeExportRanges_; + bitField0_ |= 0x00000080; + } else { + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.addAll(other.proposedExcludeExportRanges_); + } + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + peering_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(s); + break; + } // case 34 + case 42: + { + producerNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + serviceConsumerVpcSpoke_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(s); + break; + } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(s); + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object network_ = ""; + + /** + * + * + *
+     * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+     * peered with.
+     * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+     * peered with.
+     * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+     * peered with.
+     * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+     * peered with.
+     * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+     * peered with.
+     * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object serviceConsumerVpcSpoke_ = ""; + + /** + * + * + *
+     * Output only. The Service Consumer Network spoke.
+     * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceConsumerVpcSpoke. + */ + public java.lang.String getServiceConsumerVpcSpoke() { + java.lang.Object ref = serviceConsumerVpcSpoke_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceConsumerVpcSpoke_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Service Consumer Network spoke.
+     * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceConsumerVpcSpoke. + */ + public com.google.protobuf.ByteString getServiceConsumerVpcSpokeBytes() { + java.lang.Object ref = serviceConsumerVpcSpoke_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceConsumerVpcSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Service Consumer Network spoke.
+     * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The serviceConsumerVpcSpoke to set. + * @return This builder for chaining. + */ + public Builder setServiceConsumerVpcSpoke(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceConsumerVpcSpoke_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Service Consumer Network spoke.
+     * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServiceConsumerVpcSpoke() { + serviceConsumerVpcSpoke_ = getDefaultInstance().getServiceConsumerVpcSpoke(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Service Consumer Network spoke.
+     * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for serviceConsumerVpcSpoke to set. + * @return This builder for chaining. + */ + public Builder setServiceConsumerVpcSpokeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceConsumerVpcSpoke_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object peering_ = ""; + + /** + * + * + *
+     * Immutable. The name of the VPC peering between the Service Consumer VPC and
+     * the Producer VPC (defined in the Tenant project) which is added to the NCC
+     * hub. This peering must be in ACTIVE state.
+     * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The peering. + */ + public java.lang.String getPeering() { + java.lang.Object ref = peering_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peering_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The name of the VPC peering between the Service Consumer VPC and
+     * the Producer VPC (defined in the Tenant project) which is added to the NCC
+     * hub. This peering must be in ACTIVE state.
+     * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for peering. + */ + public com.google.protobuf.ByteString getPeeringBytes() { + java.lang.Object ref = peering_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peering_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The name of the VPC peering between the Service Consumer VPC and
+     * the Producer VPC (defined in the Tenant project) which is added to the NCC
+     * hub. This peering must be in ACTIVE state.
+     * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The peering to set. + * @return This builder for chaining. + */ + public Builder setPeering(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peering_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the VPC peering between the Service Consumer VPC and
+     * the Producer VPC (defined in the Tenant project) which is added to the NCC
+     * hub. This peering must be in ACTIVE state.
+     * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPeering() { + peering_ = getDefaultInstance().getPeering(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the VPC peering between the Service Consumer VPC and
+     * the Producer VPC (defined in the Tenant project) which is added to the NCC
+     * hub. This peering must be in ACTIVE state.
+     * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for peering to set. + * @return This builder for chaining. + */ + public Builder setPeeringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peering_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object producerNetwork_ = ""; + + /** + * + * + *
+     * Output only. The URI of the Producer VPC.
+     * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The producerNetwork. + */ + public java.lang.String getProducerNetwork() { + java.lang.Object ref = producerNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the Producer VPC.
+     * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for producerNetwork. + */ + public com.google.protobuf.ByteString getProducerNetworkBytes() { + java.lang.Object ref = producerNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The URI of the Producer VPC.
+     * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The producerNetwork to set. + * @return This builder for chaining. + */ + public Builder setProducerNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + producerNetwork_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the Producer VPC.
+     * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProducerNetwork() { + producerNetwork_ = getDefaultInstance().getProducerNetwork(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The URI of the Producer VPC.
+     * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for producerNetwork to set. + * @return This builder for chaining. + */ + public Builder setProducerNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + producerNetwork_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeExportRangesIsMutable() { + if (!excludeExportRanges_.isModifiable()) { + excludeExportRanges_ = new com.google.protobuf.LazyStringArrayList(excludeExportRanges_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + excludeExportRanges_.makeImmutable(); + return excludeExportRanges_; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setExcludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeExportRanges(java.lang.Iterable values) { + ensureExcludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeExportRanges_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeExportRanges() { + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludeExportRangesIsMutable() { + if (!includeExportRanges_.isModifiable()) { + includeExportRanges_ = new com.google.protobuf.LazyStringArrayList(includeExportRanges_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeExportRangesList() { + includeExportRanges_.makeImmutable(); + return includeExportRanges_; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + public int getIncludeExportRangesCount() { + return includeExportRanges_.size(); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + public java.lang.String getIncludeExportRanges(int index) { + return includeExportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeExportRangesBytes(int index) { + return includeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setIncludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeExportRanges(java.lang.Iterable values) { + ensureIncludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeExportRanges_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeExportRanges() { + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList proposedIncludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProposedIncludeExportRangesIsMutable() { + if (!proposedIncludeExportRanges_.isModifiable()) { + proposedIncludeExportRanges_ = + new com.google.protobuf.LazyStringArrayList(proposedIncludeExportRanges_); + } + bitField0_ |= 0x00000040; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedIncludeExportRangesList() { + proposedIncludeExportRanges_.makeImmutable(); + return proposedIncludeExportRanges_; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + public int getProposedIncludeExportRangesCount() { + return proposedIncludeExportRanges_.size(); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + public java.lang.String getProposedIncludeExportRanges(int index) { + return proposedIncludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index) { + return proposedIncludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The proposedIncludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setProposedIncludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedIncludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllProposedIncludeExportRanges(java.lang.Iterable values) { + ensureProposedIncludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, proposedIncludeExportRanges_); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProposedIncludeExportRanges() { + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedIncludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList proposedExcludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProposedExcludeExportRangesIsMutable() { + if (!proposedExcludeExportRanges_.isModifiable()) { + proposedExcludeExportRanges_ = + new com.google.protobuf.LazyStringArrayList(proposedExcludeExportRanges_); + } + bitField0_ |= 0x00000080; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedExcludeExportRangesList() { + proposedExcludeExportRanges_.makeImmutable(); + return proposedExcludeExportRanges_; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + public int getProposedExcludeExportRangesCount() { + return proposedExcludeExportRanges_.size(); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + public java.lang.String getProposedExcludeExportRanges(int index) { + return proposedExcludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index) { + return proposedExcludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The proposedExcludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setProposedExcludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.set(index, value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedExcludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllProposedExcludeExportRanges(java.lang.Iterable values) { + ensureProposedExcludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, proposedExcludeExportRanges_); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProposedExcludeExportRanges() { + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedExcludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) + private static final com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedProducerVpcNetwork 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.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetworkOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetworkOrBuilder.java new file mode 100644 index 000000000000..a72d9c56f298 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedProducerVpcNetworkOrBuilder.java @@ -0,0 +1,398 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LinkedProducerVpcNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+   * peered with.
+   * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+   * Immutable. The URI of the Service Consumer VPC that the Producer VPC is
+   * peered with.
+   * 
+ * + * + * string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Output only. The Service Consumer Network spoke.
+   * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The serviceConsumerVpcSpoke. + */ + java.lang.String getServiceConsumerVpcSpoke(); + + /** + * + * + *
+   * Output only. The Service Consumer Network spoke.
+   * 
+ * + * + * string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for serviceConsumerVpcSpoke. + */ + com.google.protobuf.ByteString getServiceConsumerVpcSpokeBytes(); + + /** + * + * + *
+   * Immutable. The name of the VPC peering between the Service Consumer VPC and
+   * the Producer VPC (defined in the Tenant project) which is added to the NCC
+   * hub. This peering must be in ACTIVE state.
+   * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The peering. + */ + java.lang.String getPeering(); + + /** + * + * + *
+   * Immutable. The name of the VPC peering between the Service Consumer VPC and
+   * the Producer VPC (defined in the Tenant project) which is added to the NCC
+   * hub. This peering must be in ACTIVE state.
+   * 
+ * + * string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for peering. + */ + com.google.protobuf.ByteString getPeeringBytes(); + + /** + * + * + *
+   * Output only. The URI of the Producer VPC.
+   * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The producerNetwork. + */ + java.lang.String getProducerNetwork(); + + /** + * + * + *
+   * Output only. The URI of the Producer VPC.
+   * 
+ * + * + * string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for producerNetwork. + */ + com.google.protobuf.ByteString getProducerNetworkBytes(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + java.util.List getExcludeExportRangesList(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + int getExcludeExportRangesCount(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + java.lang.String getExcludeExportRanges(int index); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getExcludeExportRangesBytes(int index); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + java.util.List getIncludeExportRangesList(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + int getIncludeExportRangesCount(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + java.lang.String getIncludeExportRanges(int index); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + com.google.protobuf.ByteString getIncludeExportRangesBytes(int index); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + java.util.List getProposedIncludeExportRangesList(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + int getProposedIncludeExportRangesCount(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + java.lang.String getProposedIncludeExportRanges(int index); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + java.util.List getProposedExcludeExportRangesList(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + int getProposedExcludeExportRangesCount(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + java.lang.String getProposedExcludeExportRanges(int index); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstances.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstances.java new file mode 100644 index 000000000000..a97940fafcc4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstances.java @@ -0,0 +1,1657 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A collection of router appliance instances. If you configure multiple router
+ * appliance instances to receive data from the same set of sites outside of
+ * Google Cloud, we recommend that you associate those instances with the same
+ * spoke.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances} + */ +@com.google.protobuf.Generated +public final class LinkedRouterApplianceInstances extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) + LinkedRouterApplianceInstancesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LinkedRouterApplianceInstances"); + } + + // Use LinkedRouterApplianceInstances.newBuilder() to construct. + private LinkedRouterApplianceInstances(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LinkedRouterApplianceInstances() { + instances_ = java.util.Collections.emptyList(); + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.class, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder + .class); + } + + public static final int INSTANCES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + instances_; + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + @java.lang.Override + public java.util.List + getInstancesList() { + return instances_; + } + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder> + getInstancesOrBuilderList() { + return instances_; + } + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance getInstances( + int index) { + return instances_.get(index); + } + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder + getInstancesOrBuilder(int index) { + return instances_.get(index); + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 2; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * Output only. The VPC network where these router appliance instances are
+   * located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The VPC network where these router appliance instances are
+   * located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_IMPORT_RANGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + return includeImportRanges_; + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(1, instances_.get(i)); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, vpcNetwork_); + } + for (int i = 0; i < includeImportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, includeImportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instances_.get(i)); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, vpcNetwork_); + } + { + int dataSize = 0; + for (int i = 0; i < includeImportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(includeImportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeImportRangesList().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.networkconnectivity.v1beta.LinkedRouterApplianceInstances)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances other = + (com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) obj; + + if (!getInstancesList().equals(other.getInstancesList())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (!getIncludeImportRangesList().equals(other.getIncludeImportRangesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + if (getIncludeImportRangesCount() > 0) { + hash = (37 * hash) + INCLUDE_IMPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIncludeImportRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + 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.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + 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.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of router appliance instances. If you configure multiple router
+   * appliance instances to receive data from the same set of sites outside of
+   * Google Cloud, we recommend that you associate those instances with the same
+   * spoke.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.class, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + siteToSiteDataTransfer_ = false; + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedRouterApplianceInstances_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances build() { + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances result = + new com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances result) { + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + includeImportRanges_.makeImmutable(); + result.includeImportRanges_ = includeImportRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance()) return this; + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInstancesFieldBuilder() + : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.includeImportRanges_.isEmpty()) { + if (includeImportRanges_.isEmpty()) { + includeImportRanges_ = other.includeImportRanges_; + bitField0_ |= 0x00000008; + } else { + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.addAll(other.includeImportRanges_); + } + 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.networkconnectivity.v1beta.RouterApplianceInstance m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + .parser(), + extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + siteToSiteDataTransfer_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + instances_ = java.util.Collections.emptyList(); + + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance>(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder> + instancesBuilder_; + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public java.util.List + getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance getInstances( + int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder setInstances( + int index, com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder setInstances( + int index, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder addInstances( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder addInstances( + int index, com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder addInstances( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder addInstances( + int index, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder addAllInstances( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance> + values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + getInstancesBuilder(int index) { + return internalGetInstancesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder + getInstancesOrBuilder(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder> + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + addInstancesBuilder() { + return internalGetInstancesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder + addInstancesBuilder(int index) { + return internalGetInstancesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of router appliance instances.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder> + getInstancesBuilderList() { + return internalGetInstancesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder> + internalGetInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder>( + instances_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instances_ = null; + } + return instancesBuilder_; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000002); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * Output only. The VPC network where these router appliance instances are
+     * located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these router appliance instances are
+     * located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these router appliance instances are
+     * located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these router appliance instances are
+     * located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these router appliance instances are
+     * located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludeImportRangesIsMutable() { + if (!includeImportRanges_.isModifiable()) { + includeImportRanges_ = new com.google.protobuf.LazyStringArrayList(includeImportRanges_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + includeImportRanges_.makeImmutable(); + return includeImportRanges_; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includeImportRanges to set. + * @return This builder for chaining. + */ + public Builder setIncludeImportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeImportRanges(java.lang.Iterable values) { + ensureIncludeImportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeImportRanges_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeImportRanges() { + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) + private static final com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedRouterApplianceInstances 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.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstancesOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstancesOrBuilder.java new file mode 100644 index 000000000000..482b3110aa97 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedRouterApplianceInstancesOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LinkedRouterApplianceInstancesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + java.util.List + getInstancesList(); + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance getInstances(int index); + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + int getInstancesCount(); + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder> + getInstancesOrBuilderList(); + + /** + * + * + *
+   * The list of router appliance instances.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouterApplianceInstance instances = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder + getInstancesOrBuilder(int index); + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); + + /** + * + * + *
+   * Output only. The VPC network where these router appliance instances are
+   * located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * Output only. The VPC network where these router appliance instances are
+   * located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + java.util.List getIncludeImportRangesList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + int getIncludeImportRangesCount(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + java.lang.String getIncludeImportRanges(int index); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + com.google.protobuf.ByteString getIncludeImportRangesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetwork.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetwork.java new file mode 100644 index 000000000000..8888b579a94e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetwork.java @@ -0,0 +1,2279 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * An existing VPC network.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork} + */ +@com.google.protobuf.Generated +public final class LinkedVpcNetwork extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) + LinkedVpcNetworkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LinkedVpcNetwork"); + } + + // Use LinkedVpcNetwork.newBuilder() to construct. + private LinkedVpcNetwork(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LinkedVpcNetwork() { + uri_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + producerVpcSpokes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXCLUDE_EXPORT_RANGES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + return excludeExportRanges_; + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + + public static final int INCLUDE_EXPORT_RANGES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeExportRangesList() { + return includeExportRanges_; + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + public int getIncludeExportRangesCount() { + return includeExportRanges_.size(); + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + public java.lang.String getIncludeExportRanges(int index) { + return includeExportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeExportRangesBytes(int index) { + return includeExportRanges_.getByteString(index); + } + + public static final int PROPOSED_INCLUDE_EXPORT_RANGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList proposedIncludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedIncludeExportRangesList() { + return proposedIncludeExportRanges_; + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + public int getProposedIncludeExportRangesCount() { + return proposedIncludeExportRanges_.size(); + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + public java.lang.String getProposedIncludeExportRanges(int index) { + return proposedIncludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index) { + return proposedIncludeExportRanges_.getByteString(index); + } + + public static final int PROPOSED_EXCLUDE_EXPORT_RANGES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList proposedExcludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedExcludeExportRangesList() { + return proposedExcludeExportRanges_; + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + public int getProposedExcludeExportRangesCount() { + return proposedExcludeExportRanges_.size(); + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + public java.lang.String getProposedExcludeExportRanges(int index) { + return proposedExcludeExportRanges_.get(index); + } + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index) { + return proposedExcludeExportRanges_.getByteString(index); + } + + public static final int PRODUCER_VPC_SPOKES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList producerVpcSpokes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the producerVpcSpokes. + */ + public com.google.protobuf.ProtocolStringList getProducerVpcSpokesList() { + return producerVpcSpokes_; + } + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of producerVpcSpokes. + */ + public int getProducerVpcSpokesCount() { + return producerVpcSpokes_.size(); + } + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The producerVpcSpokes at the given index. + */ + public java.lang.String getProducerVpcSpokes(int index) { + return producerVpcSpokes_.get(index); + } + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the producerVpcSpokes at the given index. + */ + public com.google.protobuf.ByteString getProducerVpcSpokesBytes(int index) { + return producerVpcSpokes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + for (int i = 0; i < excludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, excludeExportRanges_.getRaw(i)); + } + for (int i = 0; i < includeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, includeExportRanges_.getRaw(i)); + } + for (int i = 0; i < producerVpcSpokes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, producerVpcSpokes_.getRaw(i)); + } + for (int i = 0; i < proposedIncludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 5, proposedIncludeExportRanges_.getRaw(i)); + } + for (int i = 0; i < proposedExcludeExportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 6, proposedExcludeExportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + { + int dataSize = 0; + for (int i = 0; i < excludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeExportRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < includeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(includeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeExportRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < producerVpcSpokes_.size(); i++) { + dataSize += computeStringSizeNoTag(producerVpcSpokes_.getRaw(i)); + } + size += dataSize; + size += 1 * getProducerVpcSpokesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < proposedIncludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(proposedIncludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getProposedIncludeExportRangesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < proposedExcludeExportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(proposedExcludeExportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getProposedExcludeExportRangesList().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.networkconnectivity.v1beta.LinkedVpcNetwork)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork other = + (com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getExcludeExportRangesList().equals(other.getExcludeExportRangesList())) return false; + if (!getIncludeExportRangesList().equals(other.getIncludeExportRangesList())) return false; + if (!getProposedIncludeExportRangesList().equals(other.getProposedIncludeExportRangesList())) + return false; + if (!getProposedExcludeExportRangesList().equals(other.getProposedExcludeExportRangesList())) + return false; + if (!getProducerVpcSpokesList().equals(other.getProducerVpcSpokesList())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + if (getExcludeExportRangesCount() > 0) { + hash = (37 * hash) + EXCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getExcludeExportRangesList().hashCode(); + } + if (getIncludeExportRangesCount() > 0) { + hash = (37 * hash) + INCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIncludeExportRangesList().hashCode(); + } + if (getProposedIncludeExportRangesCount() > 0) { + hash = (37 * hash) + PROPOSED_INCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getProposedIncludeExportRangesList().hashCode(); + } + if (getProposedExcludeExportRangesCount() > 0) { + hash = (37 * hash) + PROPOSED_EXCLUDE_EXPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getProposedExcludeExportRangesList().hashCode(); + } + if (getProducerVpcSpokesCount() > 0) { + hash = (37 * hash) + PRODUCER_VPC_SPOKES_FIELD_NUMBER; + hash = (53 * hash) + getProducerVpcSpokesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork 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.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork 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.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * An existing VPC network.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + producerVpcSpokes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpcNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork build() { + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork result = + new com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + excludeExportRanges_.makeImmutable(); + result.excludeExportRanges_ = excludeExportRanges_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + includeExportRanges_.makeImmutable(); + result.includeExportRanges_ = includeExportRanges_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + proposedIncludeExportRanges_.makeImmutable(); + result.proposedIncludeExportRanges_ = proposedIncludeExportRanges_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + proposedExcludeExportRanges_.makeImmutable(); + result.proposedExcludeExportRanges_ = proposedExcludeExportRanges_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + producerVpcSpokes_.makeImmutable(); + result.producerVpcSpokes_ = producerVpcSpokes_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.excludeExportRanges_.isEmpty()) { + if (excludeExportRanges_.isEmpty()) { + excludeExportRanges_ = other.excludeExportRanges_; + bitField0_ |= 0x00000002; + } else { + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.addAll(other.excludeExportRanges_); + } + onChanged(); + } + if (!other.includeExportRanges_.isEmpty()) { + if (includeExportRanges_.isEmpty()) { + includeExportRanges_ = other.includeExportRanges_; + bitField0_ |= 0x00000004; + } else { + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.addAll(other.includeExportRanges_); + } + onChanged(); + } + if (!other.proposedIncludeExportRanges_.isEmpty()) { + if (proposedIncludeExportRanges_.isEmpty()) { + proposedIncludeExportRanges_ = other.proposedIncludeExportRanges_; + bitField0_ |= 0x00000008; + } else { + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.addAll(other.proposedIncludeExportRanges_); + } + onChanged(); + } + if (!other.proposedExcludeExportRanges_.isEmpty()) { + if (proposedExcludeExportRanges_.isEmpty()) { + proposedExcludeExportRanges_ = other.proposedExcludeExportRanges_; + bitField0_ |= 0x00000010; + } else { + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.addAll(other.proposedExcludeExportRanges_); + } + onChanged(); + } + if (!other.producerVpcSpokes_.isEmpty()) { + if (producerVpcSpokes_.isEmpty()) { + producerVpcSpokes_ = other.producerVpcSpokes_; + bitField0_ |= 0x00000020; + } else { + ensureProducerVpcSpokesIsMutable(); + producerVpcSpokes_.addAll(other.producerVpcSpokes_); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProducerVpcSpokesIsMutable(); + producerVpcSpokes_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(s); + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the VPC network resource.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeExportRangesIsMutable() { + if (!excludeExportRanges_.isModifiable()) { + excludeExportRanges_ = new com.google.protobuf.LazyStringArrayList(excludeExportRanges_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getExcludeExportRangesList() { + excludeExportRanges_.makeImmutable(); + return excludeExportRanges_; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + public int getExcludeExportRangesCount() { + return excludeExportRanges_.size(); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + public java.lang.String getExcludeExportRanges(int index) { + return excludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getExcludeExportRangesBytes(int index) { + return excludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setExcludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeExportRanges(java.lang.Iterable values) { + ensureExcludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeExportRanges_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeExportRanges() { + excludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges encompassing the subnets to be excluded from peering.
+     * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addExcludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeExportRangesIsMutable(); + excludeExportRanges_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludeExportRangesIsMutable() { + if (!includeExportRanges_.isModifiable()) { + includeExportRanges_ = new com.google.protobuf.LazyStringArrayList(includeExportRanges_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeExportRangesList() { + includeExportRanges_.makeImmutable(); + return includeExportRanges_; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + public int getIncludeExportRangesCount() { + return includeExportRanges_.size(); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + public java.lang.String getIncludeExportRanges(int index) { + return includeExportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeExportRangesBytes(int index) { + return includeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setIncludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeExportRanges(java.lang.Iterable values) { + ensureIncludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeExportRanges_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeExportRanges() { + includeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP ranges allowed to be included from peering.
+     * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeExportRangesIsMutable(); + includeExportRanges_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList proposedIncludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProposedIncludeExportRangesIsMutable() { + if (!proposedIncludeExportRanges_.isModifiable()) { + proposedIncludeExportRanges_ = + new com.google.protobuf.LazyStringArrayList(proposedIncludeExportRanges_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedIncludeExportRangesList() { + proposedIncludeExportRanges_.makeImmutable(); + return proposedIncludeExportRanges_; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + public int getProposedIncludeExportRangesCount() { + return proposedIncludeExportRanges_.size(); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + public java.lang.String getProposedIncludeExportRanges(int index) { + return proposedIncludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index) { + return proposedIncludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The proposedIncludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setProposedIncludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedIncludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllProposedIncludeExportRanges(java.lang.Iterable values) { + ensureProposedIncludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, proposedIncludeExportRanges_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProposedIncludeExportRanges() { + proposedIncludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed include export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the proposedIncludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedIncludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProposedIncludeExportRangesIsMutable(); + proposedIncludeExportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList proposedExcludeExportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProposedExcludeExportRangesIsMutable() { + if (!proposedExcludeExportRanges_.isModifiable()) { + proposedExcludeExportRanges_ = + new com.google.protobuf.LazyStringArrayList(proposedExcludeExportRanges_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + public com.google.protobuf.ProtocolStringList getProposedExcludeExportRangesList() { + proposedExcludeExportRanges_.makeImmutable(); + return proposedExcludeExportRanges_; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + public int getProposedExcludeExportRangesCount() { + return proposedExcludeExportRanges_.size(); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + public java.lang.String getProposedExcludeExportRanges(int index) { + return proposedExcludeExportRanges_.get(index); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + public com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index) { + return proposedExcludeExportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The proposedExcludeExportRanges to set. + * @return This builder for chaining. + */ + public Builder setProposedExcludeExportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedExcludeExportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllProposedExcludeExportRanges(java.lang.Iterable values) { + ensureProposedExcludeExportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, proposedExcludeExportRanges_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProposedExcludeExportRanges() { + proposedExcludeExportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The proposed exclude export IP ranges waiting for hub
+     * administrator's approval.
+     * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the proposedExcludeExportRanges to add. + * @return This builder for chaining. + */ + public Builder addProposedExcludeExportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProposedExcludeExportRangesIsMutable(); + proposedExcludeExportRanges_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList producerVpcSpokes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProducerVpcSpokesIsMutable() { + if (!producerVpcSpokes_.isModifiable()) { + producerVpcSpokes_ = new com.google.protobuf.LazyStringArrayList(producerVpcSpokes_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the producerVpcSpokes. + */ + public com.google.protobuf.ProtocolStringList getProducerVpcSpokesList() { + producerVpcSpokes_.makeImmutable(); + return producerVpcSpokes_; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of producerVpcSpokes. + */ + public int getProducerVpcSpokesCount() { + return producerVpcSpokes_.size(); + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The producerVpcSpokes at the given index. + */ + public java.lang.String getProducerVpcSpokes(int index) { + return producerVpcSpokes_.get(index); + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the producerVpcSpokes at the given index. + */ + public com.google.protobuf.ByteString getProducerVpcSpokesBytes(int index) { + return producerVpcSpokes_.getByteString(index); + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The producerVpcSpokes to set. + * @return This builder for chaining. + */ + public Builder setProducerVpcSpokes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerVpcSpokesIsMutable(); + producerVpcSpokes_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The producerVpcSpokes to add. + * @return This builder for chaining. + */ + public Builder addProducerVpcSpokes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProducerVpcSpokesIsMutable(); + producerVpcSpokes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The producerVpcSpokes to add. + * @return This builder for chaining. + */ + public Builder addAllProducerVpcSpokes(java.lang.Iterable values) { + ensureProducerVpcSpokesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, producerVpcSpokes_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearProducerVpcSpokes() { + producerVpcSpokes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The list of Producer VPC spokes that this VPC spoke is a
+     * service consumer VPC spoke for. These producer VPCs are connected through
+     * VPC peering to this spoke's backing VPC network. Because they are directly
+     * connected through VPC peering, NCC export filters do not apply between the
+     * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+     * spoke cannot be deleted as long as any of these producer VPC spokes are
+     * connected to the NCC Hub.
+     * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the producerVpcSpokes to add. + * @return This builder for chaining. + */ + public Builder addProducerVpcSpokesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProducerVpcSpokesIsMutable(); + producerVpcSpokes_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) + private static final com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedVpcNetwork 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.networkconnectivity.v1beta.LinkedVpcNetwork getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetworkOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetworkOrBuilder.java new file mode 100644 index 000000000000..f9d01dce0382 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpcNetworkOrBuilder.java @@ -0,0 +1,392 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LinkedVpcNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * Required. The URI of the VPC network resource.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeExportRanges. + */ + java.util.List getExcludeExportRangesList(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeExportRanges. + */ + int getExcludeExportRangesCount(); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeExportRanges at the given index. + */ + java.lang.String getExcludeExportRanges(int index); + + /** + * + * + *
+   * Optional. IP ranges encompassing the subnets to be excluded from peering.
+   * 
+ * + * repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getExcludeExportRangesBytes(int index); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeExportRanges. + */ + java.util.List getIncludeExportRangesList(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeExportRanges. + */ + int getIncludeExportRangesCount(); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeExportRanges at the given index. + */ + java.lang.String getIncludeExportRanges(int index); + + /** + * + * + *
+   * Optional. IP ranges allowed to be included from peering.
+   * 
+ * + * repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeExportRanges at the given index. + */ + com.google.protobuf.ByteString getIncludeExportRangesBytes(int index); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedIncludeExportRanges. + */ + java.util.List getProposedIncludeExportRangesList(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedIncludeExportRanges. + */ + int getProposedIncludeExportRangesCount(); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedIncludeExportRanges at the given index. + */ + java.lang.String getProposedIncludeExportRanges(int index); + + /** + * + * + *
+   * Output only. The proposed include export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_include_export_ranges = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedIncludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getProposedIncludeExportRangesBytes(int index); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the proposedExcludeExportRanges. + */ + java.util.List getProposedExcludeExportRangesList(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of proposedExcludeExportRanges. + */ + int getProposedExcludeExportRangesCount(); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The proposedExcludeExportRanges at the given index. + */ + java.lang.String getProposedExcludeExportRanges(int index); + + /** + * + * + *
+   * Output only. The proposed exclude export IP ranges waiting for hub
+   * administrator's approval.
+   * 
+ * + * + * repeated string proposed_exclude_export_ranges = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the proposedExcludeExportRanges at the given index. + */ + com.google.protobuf.ByteString getProposedExcludeExportRangesBytes(int index); + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the producerVpcSpokes. + */ + java.util.List getProducerVpcSpokesList(); + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of producerVpcSpokes. + */ + int getProducerVpcSpokesCount(); + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The producerVpcSpokes at the given index. + */ + java.lang.String getProducerVpcSpokes(int index); + + /** + * + * + *
+   * Output only. The list of Producer VPC spokes that this VPC spoke is a
+   * service consumer VPC spoke for. These producer VPCs are connected through
+   * VPC peering to this spoke's backing VPC network. Because they are directly
+   * connected through VPC peering, NCC export filters do not apply between the
+   * service consumer VPC spoke and any of its producer VPC spokes. This VPC
+   * spoke cannot be deleted as long as any of these producer VPC spokes are
+   * connected to the NCC Hub.
+   * 
+ * + * + * repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the producerVpcSpokes at the given index. + */ + com.google.protobuf.ByteString getProducerVpcSpokesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnels.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnels.java new file mode 100644 index 000000000000..f3087e9f8850 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnels.java @@ -0,0 +1,1332 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A collection of Cloud VPN tunnel resources. These resources should be
+ * redundant HA VPN tunnels that all advertise the same prefixes to Google
+ * Cloud. Alternatively, in a passive/active configuration, all tunnels
+ * should be capable of advertising the same prefixes.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels} + */ +@com.google.protobuf.Generated +public final class LinkedVpnTunnels extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) + LinkedVpnTunnelsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LinkedVpnTunnels"); + } + + // Use LinkedVpnTunnels.newBuilder() to construct. + private LinkedVpnTunnels(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LinkedVpnTunnels() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.class, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder.class); + } + + public static final int URIS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + return uris_; + } + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 2; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * Output only. The VPC network where these VPN tunnels are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The VPC network where these VPN tunnels are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_IMPORT_RANGES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + return includeImportRanges_; + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.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 < uris_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uris_.getRaw(i)); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, vpcNetwork_); + } + for (int i = 0; i < includeImportRanges_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, includeImportRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < uris_.size(); i++) { + dataSize += computeStringSizeNoTag(uris_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrisList().size(); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, siteToSiteDataTransfer_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, vpcNetwork_); + } + { + int dataSize = 0; + for (int i = 0; i < includeImportRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(includeImportRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludeImportRangesList().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.networkconnectivity.v1beta.LinkedVpnTunnels)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels other = + (com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) obj; + + if (!getUrisList().equals(other.getUrisList())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (!getIncludeImportRangesList().equals(other.getIncludeImportRangesList())) 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 (getUrisCount() > 0) { + hash = (37 * hash) + URIS_FIELD_NUMBER; + hash = (53 * hash) + getUrisList().hashCode(); + } + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + if (getIncludeImportRangesCount() > 0) { + hash = (37 * hash) + INCLUDE_IMPORT_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getIncludeImportRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels 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.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels 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.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A collection of Cloud VPN tunnel resources. These resources should be
+   * redundant HA VPN tunnels that all advertise the same prefixes to Google
+   * Cloud. Alternatively, in a passive/active configuration, all tunnels
+   * should be capable of advertising the same prefixes.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.class, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + siteToSiteDataTransfer_ = false; + vpcNetwork_ = ""; + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LinkedVpnTunnels_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels build() { + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels result = + new com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + uris_.makeImmutable(); + result.uris_ = uris_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + includeImportRanges_.makeImmutable(); + result.includeImportRanges_ = includeImportRanges_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance()) + return this; + if (!other.uris_.isEmpty()) { + if (uris_.isEmpty()) { + uris_ = other.uris_; + bitField0_ |= 0x00000001; + } else { + ensureUrisIsMutable(); + uris_.addAll(other.uris_); + } + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.includeImportRanges_.isEmpty()) { + if (includeImportRanges_.isEmpty()) { + includeImportRanges_ = other.includeImportRanges_; + bitField0_ |= 0x00000008; + } else { + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.addAll(other.includeImportRanges_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrisIsMutable(); + uris_.add(s); + break; + } // case 10 + case 16: + { + siteToSiteDataTransfer_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList uris_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUrisIsMutable() { + if (!uris_.isModifiable()) { + uris_ = new com.google.protobuf.LazyStringArrayList(uris_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + public com.google.protobuf.ProtocolStringList getUrisList() { + uris_.makeImmutable(); + return uris_; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + public int getUrisCount() { + return uris_.size(); + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + public java.lang.String getUris(int index) { + return uris_.get(index); + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + public com.google.protobuf.ByteString getUrisBytes(int index) { + return uris_.getByteString(index); + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The uris to set. + * @return This builder for chaining. + */ + public Builder setUris(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uris to add. + * @return This builder for chaining. + */ + public Builder addUris(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The uris to add. + * @return This builder for chaining. + */ + public Builder addAllUris(java.lang.Iterable values) { + ensureUrisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uris_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUris() { + uris_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URIs of linked VPN tunnel resources.
+     * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the uris to add. + * @return This builder for chaining. + */ + public Builder addUrisBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUrisIsMutable(); + uris_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A value that controls whether site-to-site data transfer is enabled for
+     * these resources. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000002); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * Output only. The VPC network where these VPN tunnels are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these VPN tunnels are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The VPC network where these VPN tunnels are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these VPN tunnels are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The VPC network where these VPN tunnels are located.
+     * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList includeImportRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureIncludeImportRangesIsMutable() { + if (!includeImportRanges_.isModifiable()) { + includeImportRanges_ = new com.google.protobuf.LazyStringArrayList(includeImportRanges_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + public com.google.protobuf.ProtocolStringList getIncludeImportRangesList() { + includeImportRanges_.makeImmutable(); + return includeImportRanges_; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + public int getIncludeImportRangesCount() { + return includeImportRanges_.size(); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + public java.lang.String getIncludeImportRanges(int index) { + return includeImportRanges_.get(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + public com.google.protobuf.ByteString getIncludeImportRangesBytes(int index) { + return includeImportRanges_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The includeImportRanges to set. + * @return This builder for chaining. + */ + public Builder setIncludeImportRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addAllIncludeImportRanges(java.lang.Iterable values) { + ensureIncludeImportRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includeImportRanges_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIncludeImportRanges() { + includeImportRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hub routes fully encompassed by include import ranges are
+     * included during import from hub.
+     * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the includeImportRanges to add. + * @return This builder for chaining. + */ + public Builder addIncludeImportRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludeImportRangesIsMutable(); + includeImportRanges_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) + private static final com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LinkedVpnTunnels 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.networkconnectivity.v1beta.LinkedVpnTunnels getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnelsOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnelsOrBuilder.java new file mode 100644 index 000000000000..b23f43c465f7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LinkedVpnTunnelsOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LinkedVpnTunnelsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the uris. + */ + java.util.List getUrisList(); + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of uris. + */ + int getUrisCount(); + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The uris at the given index. + */ + java.lang.String getUris(int index); + + /** + * + * + *
+   * The URIs of linked VPN tunnel resources.
+   * 
+ * + * repeated string uris = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the uris at the given index. + */ + com.google.protobuf.ByteString getUrisBytes(int index); + + /** + * + * + *
+   * A value that controls whether site-to-site data transfer is enabled for
+   * these resources. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); + + /** + * + * + *
+   * Output only. The VPC network where these VPN tunnels are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * Output only. The VPC network where these VPN tunnels are located.
+   * 
+ * + * + * string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the includeImportRanges. + */ + java.util.List getIncludeImportRangesList(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of includeImportRanges. + */ + int getIncludeImportRangesCount(); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The includeImportRanges at the given index. + */ + java.lang.String getIncludeImportRanges(int index); + + /** + * + * + *
+   * Optional. Hub routes fully encompassed by include import ranges are
+   * included during import from hub.
+   * 
+ * + * repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the includeImportRanges at the given index. + */ + com.google.protobuf.ByteString getIncludeImportRangesBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequest.java new file mode 100644 index 000000000000..97a3570e9980 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequest.java @@ -0,0 +1,1387 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to list `Destination` resources.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListDestinationsRequest} + */ +@com.google.protobuf.Generated +public final class ListDestinationsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) + ListDestinationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDestinationsRequest"); + } + + // Use ListDestinationsRequest.newBuilder() to construct. + private ListDestinationsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDestinationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * 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 name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RETURN_PARTIAL_SUCCESS_FIELD_NUMBER = 6; + private boolean returnPartialSuccess_ = false; + + /** + * + * + *
+   * Optional. If `true`, allow partial responses for multi-regional aggregated
+   * list requests.
+   * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (returnPartialSuccess_ != false) { + output.writeBool(6, returnPartialSuccess_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (returnPartialSuccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, returnPartialSuccess_); + } + 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.networkconnectivity.v1beta.ListDestinationsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) 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 (getReturnPartialSuccess() != other.getReturnPartialSuccess()) 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 = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest 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.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest 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.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to list `Destination` resources.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListDestinationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + returnPartialSuccess_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest 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_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.returnPartialSuccess_ = returnPartialSuccess_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + .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(); + } + if (other.getReturnPartialSuccess() != false) { + setReturnPartialSuccess(other.getReturnPartialSuccess()); + } + 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 + case 48: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean returnPartialSuccess_; + + /** + * + * + *
+     * Optional. If `true`, allow partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + /** + * + * + *
+     * Optional. If `true`, allow partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnPartialSuccess to set. + * @return This builder for chaining. + */ + public Builder setReturnPartialSuccess(boolean value) { + + returnPartialSuccess_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If `true`, allow partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnPartialSuccess() { + bitField0_ = (bitField0_ & ~0x00000020); + returnPartialSuccess_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDestinationsRequest 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.networkconnectivity.v1beta.ListDestinationsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequestOrBuilder.java new file mode 100644 index 000000000000..613f2b529285 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListDestinationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListDestinationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. If `true`, allow partial responses for multi-regional aggregated
+   * list requests.
+   * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + boolean getReturnPartialSuccess(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponse.java new file mode 100644 index 000000000000..818acc38a669 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response message to list `Destination` resources.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListDestinationsResponse} + */ +@com.google.protobuf.Generated +public final class ListDestinationsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) + ListDestinationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListDestinationsResponse"); + } + + // Use ListDestinationsResponse.newBuilder() to construct. + private ListDestinationsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListDestinationsResponse() { + destinations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.Builder.class); + } + + public static final int DESTINATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List destinations_; + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + @java.lang.Override + public java.util.List + getDestinationsList() { + return destinations_; + } + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + @java.lang.Override + public java.util.List + getDestinationsOrBuilderList() { + return destinations_; + } + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + @java.lang.Override + public int getDestinationsCount() { + return destinations_.size(); + } + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination getDestinations(int index) { + return destinations_.get(index); + } + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder getDestinationsOrBuilder( + int index) { + return destinations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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 < destinations_.size(); i++) { + output.writeMessage(1, destinations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < destinations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, destinations_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListDestinationsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) obj; + + if (!getDestinationsList().equals(other.getDestinationsList())) 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 (getDestinationsCount() > 0) { + hash = (37 * hash) + DESTINATIONS_FIELD_NUMBER; + hash = (53 * hash) + getDestinationsList().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.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse 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.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse 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.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message to list `Destination` resources.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListDestinationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (destinationsBuilder_ == null) { + destinations_ = java.util.Collections.emptyList(); + } else { + destinations_ = null; + destinationsBuilder_.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.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListDestinationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse result) { + if (destinationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + destinations_ = java.util.Collections.unmodifiableList(destinations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.destinations_ = destinations_; + } else { + result.destinations_ = destinationsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + .getDefaultInstance()) return this; + if (destinationsBuilder_ == null) { + if (!other.destinations_.isEmpty()) { + if (destinations_.isEmpty()) { + destinations_ = other.destinations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDestinationsIsMutable(); + destinations_.addAll(other.destinations_); + } + onChanged(); + } + } else { + if (!other.destinations_.isEmpty()) { + if (destinationsBuilder_.isEmpty()) { + destinationsBuilder_.dispose(); + destinationsBuilder_ = null; + destinations_ = other.destinations_; + bitField0_ = (bitField0_ & ~0x00000001); + destinationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDestinationsFieldBuilder() + : null; + } else { + destinationsBuilder_.addAllMessages(other.destinations_); + } + } + } + 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.networkconnectivity.v1beta.Destination m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Destination.parser(), + extensionRegistry); + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(m); + } else { + destinationsBuilder_.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 destinations_ = + java.util.Collections.emptyList(); + + private void ensureDestinationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + destinations_ = + new java.util.ArrayList( + destinations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + destinationsBuilder_; + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public java.util.List + getDestinationsList() { + if (destinationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(destinations_); + } else { + return destinationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public int getDestinationsCount() { + if (destinationsBuilder_ == null) { + return destinations_.size(); + } else { + return destinationsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Destination getDestinations(int index) { + if (destinationsBuilder_ == null) { + return destinations_.get(index); + } else { + return destinationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder setDestinations( + int index, com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.set(index, value); + onChanged(); + } else { + destinationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder setDestinations( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.set(index, builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder addDestinations(com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.add(value); + onChanged(); + } else { + destinationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder addDestinations( + int index, com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationsIsMutable(); + destinations_.add(index, value); + onChanged(); + } else { + destinationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder addDestinations( + com.google.cloud.networkconnectivity.v1beta.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder addDestinations( + int index, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder builderForValue) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.add(index, builderForValue.build()); + onChanged(); + } else { + destinationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder addAllDestinations( + java.lang.Iterable + values) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destinations_); + onChanged(); + } else { + destinationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder clearDestinations() { + if (destinationsBuilder_ == null) { + destinations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + destinationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public Builder removeDestinations(int index) { + if (destinationsBuilder_ == null) { + ensureDestinationsIsMutable(); + destinations_.remove(index); + onChanged(); + } else { + destinationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.Builder getDestinationsBuilder( + int index) { + return internalGetDestinationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder + getDestinationsOrBuilder(int index) { + if (destinationsBuilder_ == null) { + return destinations_.get(index); + } else { + return destinationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + getDestinationsOrBuilderList() { + if (destinationsBuilder_ != null) { + return destinationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(destinations_); + } + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.Builder + addDestinationsBuilder() { + return internalGetDestinationsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.Builder addDestinationsBuilder( + int index) { + return internalGetDestinationsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `Destination` resources to be listed.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + public java.util.List + getDestinationsBuilderList() { + return internalGetDestinationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + internalGetDestinationsFieldBuilder() { + if (destinationsBuilder_ == null) { + destinationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder>( + destinations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + destinations_ = null; + } + return destinationsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDestinationsResponse 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.networkconnectivity.v1beta.ListDestinationsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponseOrBuilder.java new file mode 100644 index 000000000000..06a6216dbe38 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListDestinationsResponseOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListDestinationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListDestinationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + java.util.List getDestinationsList(); + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Destination getDestinations(int index); + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + int getDestinationsCount(); + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + java.util.List + getDestinationsOrBuilderList(); + + /** + * + * + *
+   * The list of `Destination` resources to be listed.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Destination destinations = 1; + */ + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder getDestinationsOrBuilder( + int index); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequest.java new file mode 100644 index 000000000000..456a0a6306b7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequest.java @@ -0,0 +1,1347 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest} + */ +@com.google.protobuf.Generated +public final class ListGatewayAdvertisedRoutesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + ListGatewayAdvertisedRoutesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListGatewayAdvertisedRoutesRequest"); + } + + // Use ListGatewayAdvertisedRoutesRequest.newBuilder() to construct. + private ListGatewayAdvertisedRoutesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListGatewayAdvertisedRoutesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results per page that should be returned.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes].
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + .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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of results per page that should be returned.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results per page that should be returned.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results per page that should be returned.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous
+     * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+     * page.
+     *
+     * When paginating, all other parameters provided to
+     * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+     * token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGatewayAdvertisedRoutesRequest 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequestOrBuilder.java new file mode 100644 index 000000000000..d3f8155fa96c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesRequestOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListGatewayAdvertisedRoutesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results per page that should be returned.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous
+   * `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent
+   * page.
+   *
+   * When paginating, all other parameters provided to
+   * `ListGatewayAdvertisedRoutes` must match the call that provided the page
+   * token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponse.java new file mode 100644 index 000000000000..66d4469840af --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponse.java @@ -0,0 +1,1535 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse} + */ +@com.google.protobuf.Generated +public final class ListGatewayAdvertisedRoutesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + ListGatewayAdvertisedRoutesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListGatewayAdvertisedRoutesResponse"); + } + + // Use ListGatewayAdvertisedRoutesResponse.newBuilder() to construct. + private ListGatewayAdvertisedRoutesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListGatewayAdvertisedRoutesResponse() { + gatewayAdvertisedRoutes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse.Builder + .class); + } + + public static final int GATEWAY_ADVERTISED_ROUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + gatewayAdvertisedRoutes_; + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + @java.lang.Override + public java.util.List + getGatewayAdvertisedRoutesList() { + return gatewayAdvertisedRoutes_; + } + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + getGatewayAdvertisedRoutesOrBuilderList() { + return gatewayAdvertisedRoutes_; + } + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + @java.lang.Override + public int getGatewayAdvertisedRoutesCount() { + return gatewayAdvertisedRoutes_.size(); + } + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoutes(int index) { + return gatewayAdvertisedRoutes_.get(index); + } + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRoutesOrBuilder(int index) { + return gatewayAdvertisedRoutes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Hubs 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); + } + + /** + * + * + *
+   * Hubs 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 < gatewayAdvertisedRoutes_.size(); i++) { + output.writeMessage(1, gatewayAdvertisedRoutes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < gatewayAdvertisedRoutes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, gatewayAdvertisedRoutes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) obj; + + if (!getGatewayAdvertisedRoutesList().equals(other.getGatewayAdvertisedRoutesList())) + 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 (getGatewayAdvertisedRoutesCount() > 0) { + hash = (37 * hash) + GATEWAY_ADVERTISED_ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getGatewayAdvertisedRoutesList().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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gatewayAdvertisedRoutesBuilder_ == null) { + gatewayAdvertisedRoutes_ = java.util.Collections.emptyList(); + } else { + gatewayAdvertisedRoutes_ = null; + gatewayAdvertisedRoutesBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGatewayAdvertisedRoutesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse result) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + gatewayAdvertisedRoutes_ = + java.util.Collections.unmodifiableList(gatewayAdvertisedRoutes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.gatewayAdvertisedRoutes_ = gatewayAdvertisedRoutes_; + } else { + result.gatewayAdvertisedRoutes_ = gatewayAdvertisedRoutesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + .getDefaultInstance()) return this; + if (gatewayAdvertisedRoutesBuilder_ == null) { + if (!other.gatewayAdvertisedRoutes_.isEmpty()) { + if (gatewayAdvertisedRoutes_.isEmpty()) { + gatewayAdvertisedRoutes_ = other.gatewayAdvertisedRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.addAll(other.gatewayAdvertisedRoutes_); + } + onChanged(); + } + } else { + if (!other.gatewayAdvertisedRoutes_.isEmpty()) { + if (gatewayAdvertisedRoutesBuilder_.isEmpty()) { + gatewayAdvertisedRoutesBuilder_.dispose(); + gatewayAdvertisedRoutesBuilder_ = null; + gatewayAdvertisedRoutes_ = other.gatewayAdvertisedRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + gatewayAdvertisedRoutesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGatewayAdvertisedRoutesFieldBuilder() + : null; + } else { + gatewayAdvertisedRoutesBuilder_.addAllMessages(other.gatewayAdvertisedRoutes_); + } + } + } + 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.networkconnectivity.v1beta.GatewayAdvertisedRoute m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.parser(), + extensionRegistry); + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.add(m); + } else { + gatewayAdvertisedRoutesBuilder_.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 + gatewayAdvertisedRoutes_ = java.util.Collections.emptyList(); + + private void ensureGatewayAdvertisedRoutesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + gatewayAdvertisedRoutes_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute>( + gatewayAdvertisedRoutes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + gatewayAdvertisedRoutesBuilder_; + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public java.util.List + getGatewayAdvertisedRoutesList() { + if (gatewayAdvertisedRoutesBuilder_ == null) { + return java.util.Collections.unmodifiableList(gatewayAdvertisedRoutes_); + } else { + return gatewayAdvertisedRoutesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public int getGatewayAdvertisedRoutesCount() { + if (gatewayAdvertisedRoutesBuilder_ == null) { + return gatewayAdvertisedRoutes_.size(); + } else { + return gatewayAdvertisedRoutesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoutes(int index) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + return gatewayAdvertisedRoutes_.get(index); + } else { + return gatewayAdvertisedRoutesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder setGatewayAdvertisedRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.set(index, value); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder setGatewayAdvertisedRoutes( + int index, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + builderForValue) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.set(index, builderForValue.build()); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder addGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.add(value); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder addGatewayAdvertisedRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.add(index, value); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder addGatewayAdvertisedRoutes( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + builderForValue) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.add(builderForValue.build()); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder addGatewayAdvertisedRoutes( + int index, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + builderForValue) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.add(index, builderForValue.build()); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder addAllGatewayAdvertisedRoutes( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute> + values) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gatewayAdvertisedRoutes_); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder clearGatewayAdvertisedRoutes() { + if (gatewayAdvertisedRoutesBuilder_ == null) { + gatewayAdvertisedRoutes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public Builder removeGatewayAdvertisedRoutes(int index) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + ensureGatewayAdvertisedRoutesIsMutable(); + gatewayAdvertisedRoutes_.remove(index); + onChanged(); + } else { + gatewayAdvertisedRoutesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + getGatewayAdvertisedRoutesBuilder(int index) { + return internalGetGatewayAdvertisedRoutesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRoutesOrBuilder(int index) { + if (gatewayAdvertisedRoutesBuilder_ == null) { + return gatewayAdvertisedRoutes_.get(index); + } else { + return gatewayAdvertisedRoutesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + getGatewayAdvertisedRoutesOrBuilderList() { + if (gatewayAdvertisedRoutesBuilder_ != null) { + return gatewayAdvertisedRoutesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gatewayAdvertisedRoutes_); + } + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + addGatewayAdvertisedRoutesBuilder() { + return internalGetGatewayAdvertisedRoutesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance()); + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + addGatewayAdvertisedRoutesBuilder(int index) { + return internalGetGatewayAdvertisedRoutesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance()); + } + + /** + * + * + *
+     * The requested gateway advertised routes.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder> + getGatewayAdvertisedRoutesBuilderList() { + return internalGetGatewayAdvertisedRoutesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + internalGetGatewayAdvertisedRoutesFieldBuilder() { + if (gatewayAdvertisedRoutesBuilder_ == null) { + gatewayAdvertisedRoutesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder>( + gatewayAdvertisedRoutes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + gatewayAdvertisedRoutes_ = null; + } + return gatewayAdvertisedRoutesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * Hubs 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_; + } + + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + private static final com.google.cloud.networkconnectivity.v1beta + .ListGatewayAdvertisedRoutesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGatewayAdvertisedRoutesResponse 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.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponseOrBuilder.java new file mode 100644 index 000000000000..c5ddc6c2045d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGatewayAdvertisedRoutesResponseOrBuilder.java @@ -0,0 +1,182 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListGatewayAdvertisedRoutesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + java.util.List + getGatewayAdvertisedRoutesList(); + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute getGatewayAdvertisedRoutes( + int index); + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + int getGatewayAdvertisedRoutesCount(); + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + getGatewayAdvertisedRoutesOrBuilderList(); + + /** + * + * + *
+   * The requested gateway advertised routes.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_routes = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRoutesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Hubs 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); + + /** + * + * + *
+   * Hubs 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequest.java new file mode 100644 index 000000000000..00479a86c33d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequest.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGroupsRequest} + */ +@com.google.protobuf.Generated +public final class ListGroupsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListGroupsRequest) + ListGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListGroupsRequest"); + } + + // Use ListGroupsRequest.newBuilder() to construct. + private ListGroupsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest) 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.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest 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.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest 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.networkconnectivity.v1beta.ListGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListGroupsRequest) + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest.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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListGroupsRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsRequest 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.networkconnectivity.v1beta.ListGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..d44304e3aa37 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponse.java new file mode 100644 index 000000000000..33c8b5011bf3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGroupsResponse} + */ +@com.google.protobuf.Generated +public final class ListGroupsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListGroupsResponse) + ListGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListGroupsResponse"); + } + + // Use ListGroupsResponse.newBuilder() to construct. + private ListGroupsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListGroupsResponse() { + groups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.Builder.class); + } + + public static final int GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List groups_; + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + @java.lang.Override + public java.util.List getGroupsList() { + return groups_; + } + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + @java.lang.Override + public java.util.List + getGroupsOrBuilderList() { + return groups_; + } + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + @java.lang.Override + public int getGroupsCount() { + return groups_.size(); + } + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Group getGroups(int index) { + return groups_.get(index); + } + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupsOrBuilder(int index) { + return groups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Hubs 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); + } + + /** + * + * + *
+   * Hubs 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 < groups_.size(); i++) { + output.writeMessage(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < groups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, groups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse) obj; + + if (!getGroupsList().equals(other.getGroupsList())) 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 (getGroupsCount() > 0) { + hash = (37 * hash) + GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getGroupsList().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.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse 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.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse 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.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListGroupsResponse) + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + } else { + groups_ = null; + groupsBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse result) { + if (groupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + groups_ = java.util.Collections.unmodifiableList(groups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groups_ = groups_; + } else { + result.groups_ = groupsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse.getDefaultInstance()) + return this; + if (groupsBuilder_ == null) { + if (!other.groups_.isEmpty()) { + if (groups_.isEmpty()) { + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupsIsMutable(); + groups_.addAll(other.groups_); + } + onChanged(); + } + } else { + if (!other.groups_.isEmpty()) { + if (groupsBuilder_.isEmpty()) { + groupsBuilder_.dispose(); + groupsBuilder_ = null; + groups_ = other.groups_; + bitField0_ = (bitField0_ & ~0x00000001); + groupsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGroupsFieldBuilder() + : null; + } else { + groupsBuilder_.addAllMessages(other.groups_); + } + } + } + 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.networkconnectivity.v1beta.Group m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Group.parser(), + extensionRegistry); + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(m); + } else { + groupsBuilder_.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 groups_ = + java.util.Collections.emptyList(); + + private void ensureGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + groups_ = + new java.util.ArrayList(groups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder> + groupsBuilder_; + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public java.util.List getGroupsList() { + if (groupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groups_); + } else { + return groupsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public int getGroupsCount() { + if (groupsBuilder_ == null) { + return groups_.size(); + } else { + return groupsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Group getGroups(int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder setGroups(int index, com.google.cloud.networkconnectivity.v1beta.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.set(index, value); + onChanged(); + } else { + groupsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder setGroups( + int index, com.google.cloud.networkconnectivity.v1beta.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.set(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder addGroups(com.google.cloud.networkconnectivity.v1beta.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(value); + onChanged(); + } else { + groupsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder addGroups(int index, com.google.cloud.networkconnectivity.v1beta.Group value) { + if (groupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupsIsMutable(); + groups_.add(index, value); + onChanged(); + } else { + groupsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder addGroups( + com.google.cloud.networkconnectivity.v1beta.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder addGroups( + int index, com.google.cloud.networkconnectivity.v1beta.Group.Builder builderForValue) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.add(index, builderForValue.build()); + onChanged(); + } else { + groupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder addAllGroups( + java.lang.Iterable values) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groups_); + onChanged(); + } else { + groupsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder clearGroups() { + if (groupsBuilder_ == null) { + groups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public Builder removeGroups(int index) { + if (groupsBuilder_ == null) { + ensureGroupsIsMutable(); + groups_.remove(index); + onChanged(); + } else { + groupsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Group.Builder getGroupsBuilder(int index) { + return internalGetGroupsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupsOrBuilder( + int index) { + if (groupsBuilder_ == null) { + return groups_.get(index); + } else { + return groupsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public java.util.List + getGroupsOrBuilderList() { + if (groupsBuilder_ != null) { + return groupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groups_); + } + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Group.Builder addGroupsBuilder() { + return internalGetGroupsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Group.Builder addGroupsBuilder(int index) { + return internalGetGroupsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested groups.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + public java.util.List + getGroupsBuilderList() { + return internalGetGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder> + internalGetGroupsFieldBuilder() { + if (groupsBuilder_ == null) { + groupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder>( + groups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + groups_ = null; + } + return groupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * Hubs 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_; + } + + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListGroupsResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListGroupsResponse 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.networkconnectivity.v1beta.ListGroupsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..609bc5562411 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListGroupsResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + java.util.List getGroupsList(); + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Group getGroups(int index); + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + int getGroupsCount(); + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + java.util.List + getGroupsOrBuilderList(); + + /** + * + * + *
+   * The requested groups.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Group groups = 1; + */ + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupsOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Hubs 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); + + /** + * + * + *
+   * Hubs 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequest.java new file mode 100644 index 000000000000..5b3733a97c63 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequest.java @@ -0,0 +1,2030 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest} + */ +@com.google.protobuf.Generated +public final class ListHubSpokesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) + ListHubSpokesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHubSpokesRequest"); + } + + // Use ListHubSpokesRequest.newBuilder() to construct. + private ListHubSpokesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListHubSpokesRequest() { + name_ = ""; + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.Builder.class); + } + + /** + * + * + *
+   * Enum that controls which spoke fields are included in the response.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView} + */ + public enum SpokeView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The spoke view is unspecified. When the spoke view is unspecified, the
+     * API returns the same fields as the `BASIC` view.
+     * 
+ * + * SPOKE_VIEW_UNSPECIFIED = 0; + */ + SPOKE_VIEW_UNSPECIFIED(0), + /** + * + * + *
+     * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
+     * and `spoke_type`. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+     * Includes all spoke fields except `labels`.
+     * You can use the `DETAILED` view only when you set the `spoke_locations`
+     * field to `[global]`.
+     * 
+ * + * DETAILED = 2; + */ + DETAILED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeView"); + } + + /** + * + * + *
+     * The spoke view is unspecified. When the spoke view is unspecified, the
+     * API returns the same fields as the `BASIC` view.
+     * 
+ * + * SPOKE_VIEW_UNSPECIFIED = 0; + */ + public static final int SPOKE_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`,
+     * and `spoke_type`. This is the default value.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + + /** + * + * + *
+     * Includes all spoke fields except `labels`.
+     * You can use the `DETAILED` view only when you set the `spoke_locations`
+     * field to `[global]`.
+     * 
+ * + * DETAILED = 2; + */ + public static final int DETAILED_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 SpokeView 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 SpokeView forNumber(int value) { + switch (value) { + case 0: + return SPOKE_VIEW_UNSPECIFIED; + case 1: + return BASIC; + case 2: + return DETAILED; + 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 SpokeView findValueByNumber(int number) { + return SpokeView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SpokeView[] VALUES = values(); + + public static SpokeView 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 SpokeView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * 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 hub.
+   * 
+ * + * + * 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 SPOKE_LOCATIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList spokeLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + public com.google.protobuf.ProtocolStringList getSpokeLocationsList() { + return spokeLocations_; + } + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + public int getSpokeLocationsCount() { + return spokeLocations_.size(); + } + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + public java.lang.String getSpokeLocations(int index) { + return spokeLocations_.get(index); + } + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + public com.google.protobuf.ByteString getSpokeLocationsBytes(int index) { + return spokeLocations_.getByteString(index); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @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; + } + } + + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 7; + private int view_ = 0; + + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView getView() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView result = + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView.forNumber(view_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < spokeLocations_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeLocations_.getRaw(i)); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, orderBy_); + } + if (view_ + != com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView + .SPOKE_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, view_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + { + int dataSize = 0; + for (int i = 0; i < spokeLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(spokeLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getSpokeLocationsList().size(); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, orderBy_); + } + if (view_ + != com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView + .SPOKE_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, view_); + } + 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.networkconnectivity.v1beta.ListHubSpokesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeLocationsList().equals(other.getSpokeLocationsList())) 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 (view_ != other.view_) 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 (getSpokeLocationsCount() > 0) { + hash = (37 * hash) + SPOKE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeLocationsList().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 = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest 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.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest 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.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + spokeLocations_.makeImmutable(); + result.spokeLocations_ = spokeLocations_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.spokeLocations_.isEmpty()) { + if (spokeLocations_.isEmpty()) { + spokeLocations_ = other.spokeLocations_; + bitField0_ |= 0x00000002; + } else { + ensureSpokeLocationsIsMutable(); + spokeLocations_.addAll(other.spokeLocations_); + } + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(s); + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList spokeLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSpokeLocationsIsMutable() { + if (!spokeLocations_.isModifiable()) { + spokeLocations_ = new com.google.protobuf.LazyStringArrayList(spokeLocations_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + public com.google.protobuf.ProtocolStringList getSpokeLocationsList() { + spokeLocations_.makeImmutable(); + return spokeLocations_; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + public int getSpokeLocationsCount() { + return spokeLocations_.size(); + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + public java.lang.String getSpokeLocations(int index) { + return spokeLocations_.get(index); + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + public com.google.protobuf.ByteString getSpokeLocationsBytes(int index) { + return spokeLocations_.getByteString(index); + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index to set the value at. + * @param value The spokeLocations to set. + * @return This builder for chaining. + */ + public Builder setSpokeLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeLocationsIsMutable(); + spokeLocations_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param value The spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addSpokeLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param values The spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addAllSpokeLocations(java.lang.Iterable values) { + ensureSpokeLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeLocations_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @return This builder for chaining. + */ + public Builder clearSpokeLocations() { + spokeLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * A list of locations.
+     * Specify one of the following: `[global]`, a single region (for
+     * example, `[us-central1]`), or a combination of
+     * values (for example, `[global, us-central1, us-west1]`).
+     * If the spoke_locations field is populated, the list of results
+     * includes only spokes in the specified location.
+     * If the spoke_locations field is not populated, the list of results
+     * includes spokes in all locations.
+     * 
+ * + * repeated string spoke_locations = 2; + * + * @param value The bytes of the spokeLocations to add. + * @return This builder for chaining. + */ + public Builder addSpokeLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSpokeLocationsIsMutable(); + spokeLocations_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 5; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @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; + } + } + + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @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; + } + } + + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by name or create_time.
+     * 
+ * + * string order_by = 6; + * + * @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_ |= 0x00000020; + onChanged(); + return this; + } + + private int view_ = 0; + + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView getView() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView result = + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView.forNumber( + view_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The view of the spoke to return.
+     * The view that you use determines which spoke fields are included in the
+     * response.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000040); + view_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubSpokesRequest 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.networkconnectivity.v1beta.ListHubSpokesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequestOrBuilder.java new file mode 100644 index 000000000000..d4f6fd999af7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesRequestOrBuilder.java @@ -0,0 +1,261 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListHubSpokesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return A list containing the spokeLocations. + */ + java.util.List getSpokeLocationsList(); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @return The count of spokeLocations. + */ + int getSpokeLocationsCount(); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the element to return. + * @return The spokeLocations at the given index. + */ + java.lang.String getSpokeLocations(int index); + + /** + * + * + *
+   * A list of locations.
+   * Specify one of the following: `[global]`, a single region (for
+   * example, `[us-central1]`), or a combination of
+   * values (for example, `[global, us-central1, us-west1]`).
+   * If the spoke_locations field is populated, the list of results
+   * includes only spokes in the specified location.
+   * If the spoke_locations field is not populated, the list of results
+   * includes spokes in all locations.
+   * 
+ * + * repeated string spoke_locations = 2; + * + * @param index The index of the value to return. + * @return The bytes of the spokeLocations at the given index. + */ + com.google.protobuf.ByteString getSpokeLocationsBytes(int index); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 5; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by name or create_time.
+   * 
+ * + * string order_by = 6; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * The view of the spoke to return.
+   * The view that you use determines which spoke fields are included in the
+   * response.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView view = 7; + * + * @return The view. + */ + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest.SpokeView getView(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponse.java new file mode 100644 index 000000000000..35d3e25c5f11 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponse.java @@ -0,0 +1,1478 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse} + */ +@com.google.protobuf.Generated +public final class ListHubSpokesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) + ListHubSpokesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHubSpokesResponse"); + } + + // Use ListHubSpokesResponse.newBuilder() to construct. + private ListHubSpokesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListHubSpokesResponse() { + spokes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.Builder.class); + } + + public static final int SPOKES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List spokes_; + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List getSpokesList() { + return spokes_; + } + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List + getSpokesOrBuilderList() { + return spokes_; + } + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public int getSpokesCount() { + return spokes_.size(); + } + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index) { + return spokes_.get(index); + } + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder(int index) { + return spokes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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 < spokes_.size(); i++) { + output.writeMessage(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < spokes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListHubSpokesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) obj; + + if (!getSpokesList().equals(other.getSpokesList())) 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 (getSpokesCount() > 0) { + hash = (37 * hash) + SPOKES_FIELD_NUMBER; + hash = (53 * hash) + getSpokesList().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.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse 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.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse 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.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + } else { + spokes_ = null; + spokesBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubSpokesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse result) { + if (spokesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + spokes_ = java.util.Collections.unmodifiableList(spokes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.spokes_ = spokes_; + } else { + result.spokes_ = spokesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse.getDefaultInstance()) + return this; + if (spokesBuilder_ == null) { + if (!other.spokes_.isEmpty()) { + if (spokes_.isEmpty()) { + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpokesIsMutable(); + spokes_.addAll(other.spokes_); + } + onChanged(); + } + } else { + if (!other.spokes_.isEmpty()) { + if (spokesBuilder_.isEmpty()) { + spokesBuilder_.dispose(); + spokesBuilder_ = null; + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + spokesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSpokesFieldBuilder() + : null; + } else { + spokesBuilder_.addAllMessages(other.spokes_); + } + } + } + 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.networkconnectivity.v1beta.Spoke m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Spoke.parser(), + extensionRegistry); + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(m); + } else { + spokesBuilder_.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 spokes_ = + java.util.Collections.emptyList(); + + private void ensureSpokesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + spokes_ = + new java.util.ArrayList(spokes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokesBuilder_; + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List getSpokesList() { + if (spokesBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokes_); + } else { + return spokesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public int getSpokesCount() { + if (spokesBuilder_ == null) { + return spokes_.size(); + } else { + return spokesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder setSpokes(int index, com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.set(index, value); + onChanged(); + } else { + spokesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder setSpokes( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.set(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(value); + onChanged(); + } else { + spokesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes(int index, com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(index, value); + onChanged(); + } else { + spokesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addAllSpokes( + java.lang.Iterable values) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokes_); + onChanged(); + } else { + spokesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder clearSpokes() { + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + spokesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder removeSpokes(int index) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.remove(index); + onChanged(); + } else { + spokesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokesBuilder(int index) { + return internalGetSpokesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder( + int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List + getSpokesOrBuilderList() { + if (spokesBuilder_ != null) { + return spokesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokes_); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder addSpokesBuilder() { + return internalGetSpokesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder addSpokesBuilder(int index) { + return internalGetSpokesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested spokes.
+     * The spoke fields can be partially populated based on the `view` field in
+     * the request message.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List + getSpokesBuilderList() { + return internalGetSpokesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokesFieldBuilder() { + if (spokesBuilder_ == null) { + spokesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + spokes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + spokes_ = null; + } + return spokesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubSpokesResponse 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.networkconnectivity.v1beta.ListHubSpokesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponseOrBuilder.java new file mode 100644 index 000000000000..98ea18fc1214 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubSpokesResponseOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListHubSpokesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + java.util.List getSpokesList(); + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index); + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + int getSpokesCount(); + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + java.util.List + getSpokesOrBuilderList(); + + /** + * + * + *
+   * The requested spokes.
+   * The spoke fields can be partially populated based on the `view` field in
+   * the request message.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequest.java new file mode 100644 index 000000000000..7468b75718b4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequest.java @@ -0,0 +1,1279 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubsRequest} + */ +@com.google.protobuf.Generated +public final class ListHubsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListHubsRequest) + ListHubsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHubsRequest"); + } + + // Use ListHubsRequest.newBuilder() to construct. + private ListHubsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListHubsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results per page to return.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListHubsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListHubsRequest) 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.networkconnectivity.v1beta.ListHubsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest 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.networkconnectivity.v1beta.ListHubsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest 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.networkconnectivity.v1beta.ListHubsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListHubsRequest) + com.google.cloud.networkconnectivity.v1beta.ListHubsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsRequest getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListHubsRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListHubsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.ListHubsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListHubsRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListHubsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListHubsRequest other) { + if (other == com.google.cloud.networkconnectivity.v1beta.ListHubsRequest.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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results per page to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results per page to return.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The maximum number of results per page to return.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListHubsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListHubsRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListHubsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListHubsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubsRequest 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.networkconnectivity.v1beta.ListHubsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequestOrBuilder.java new file mode 100644 index 000000000000..0e1c460cc546 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListHubsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListHubsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results per page to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponse.java new file mode 100644 index 000000000000..5d054538a25d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponse.java @@ -0,0 +1,1426 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubsResponse} + */ +@com.google.protobuf.Generated +public final class ListHubsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListHubsResponse) + ListHubsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListHubsResponse"); + } + + // Use ListHubsResponse.newBuilder() to construct. + private ListHubsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListHubsResponse() { + hubs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.Builder.class); + } + + public static final int HUBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List hubs_; + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + @java.lang.Override + public java.util.List getHubsList() { + return hubs_; + } + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + @java.lang.Override + public java.util.List + getHubsOrBuilderList() { + return hubs_; + } + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + @java.lang.Override + public int getHubsCount() { + return hubs_.size(); + } + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub getHubs(int index) { + return hubs_.get(index); + } + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubsOrBuilder(int index) { + return hubs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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 < hubs_.size(); i++) { + output.writeMessage(1, hubs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < hubs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hubs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListHubsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListHubsResponse) obj; + + if (!getHubsList().equals(other.getHubsList())) 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 (getHubsCount() > 0) { + hash = (37 * hash) + HUBS_FIELD_NUMBER; + hash = (53 * hash) + getHubsList().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.networkconnectivity.v1beta.ListHubsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse 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.networkconnectivity.v1beta.ListHubsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse 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.networkconnectivity.v1beta.ListHubsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListHubsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListHubsResponse) + com.google.cloud.networkconnectivity.v1beta.ListHubsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hubsBuilder_ == null) { + hubs_ = java.util.Collections.emptyList(); + } else { + hubs_ = null; + hubsBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListHubsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListHubsResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListHubsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse result) { + if (hubsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + hubs_ = java.util.Collections.unmodifiableList(hubs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.hubs_ = hubs_; + } else { + result.hubs_ = hubsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListHubsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListHubsResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListHubsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListHubsResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListHubsResponse.getDefaultInstance()) + return this; + if (hubsBuilder_ == null) { + if (!other.hubs_.isEmpty()) { + if (hubs_.isEmpty()) { + hubs_ = other.hubs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHubsIsMutable(); + hubs_.addAll(other.hubs_); + } + onChanged(); + } + } else { + if (!other.hubs_.isEmpty()) { + if (hubsBuilder_.isEmpty()) { + hubsBuilder_.dispose(); + hubsBuilder_ = null; + hubs_ = other.hubs_; + bitField0_ = (bitField0_ & ~0x00000001); + hubsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHubsFieldBuilder() + : null; + } else { + hubsBuilder_.addAllMessages(other.hubs_); + } + } + } + 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.networkconnectivity.v1beta.Hub m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Hub.parser(), + extensionRegistry); + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + hubs_.add(m); + } else { + hubsBuilder_.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 hubs_ = + java.util.Collections.emptyList(); + + private void ensureHubsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + hubs_ = new java.util.ArrayList(hubs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + hubsBuilder_; + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public java.util.List getHubsList() { + if (hubsBuilder_ == null) { + return java.util.Collections.unmodifiableList(hubs_); + } else { + return hubsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public int getHubsCount() { + if (hubsBuilder_ == null) { + return hubs_.size(); + } else { + return hubsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Hub getHubs(int index) { + if (hubsBuilder_ == null) { + return hubs_.get(index); + } else { + return hubsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder setHubs(int index, com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubsIsMutable(); + hubs_.set(index, value); + onChanged(); + } else { + hubsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder setHubs( + int index, com.google.cloud.networkconnectivity.v1beta.Hub.Builder builderForValue) { + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + hubs_.set(index, builderForValue.build()); + onChanged(); + } else { + hubsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder addHubs(com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubsIsMutable(); + hubs_.add(value); + onChanged(); + } else { + hubsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder addHubs(int index, com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubsIsMutable(); + hubs_.add(index, value); + onChanged(); + } else { + hubsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder addHubs( + com.google.cloud.networkconnectivity.v1beta.Hub.Builder builderForValue) { + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + hubs_.add(builderForValue.build()); + onChanged(); + } else { + hubsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder addHubs( + int index, com.google.cloud.networkconnectivity.v1beta.Hub.Builder builderForValue) { + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + hubs_.add(index, builderForValue.build()); + onChanged(); + } else { + hubsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder addAllHubs( + java.lang.Iterable values) { + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hubs_); + onChanged(); + } else { + hubsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder clearHubs() { + if (hubsBuilder_ == null) { + hubs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + hubsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public Builder removeHubs(int index) { + if (hubsBuilder_ == null) { + ensureHubsIsMutable(); + hubs_.remove(index); + onChanged(); + } else { + hubsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Hub.Builder getHubsBuilder(int index) { + return internalGetHubsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubsOrBuilder(int index) { + if (hubsBuilder_ == null) { + return hubs_.get(index); + } else { + return hubsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public java.util.List + getHubsOrBuilderList() { + if (hubsBuilder_ != null) { + return hubsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(hubs_); + } + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Hub.Builder addHubsBuilder() { + return internalGetHubsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Hub.Builder addHubsBuilder(int index) { + return internalGetHubsFieldBuilder() + .addBuilder(index, com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested hubs.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + public java.util.List + getHubsBuilderList() { + return internalGetHubsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + internalGetHubsFieldBuilder() { + if (hubsBuilder_ == null) { + hubsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder>( + hubs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + hubs_ = null; + } + return hubsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListHubsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListHubsResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListHubsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListHubsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListHubsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListHubsResponse 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.networkconnectivity.v1beta.ListHubsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponseOrBuilder.java new file mode 100644 index 000000000000..58a79b389560 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListHubsResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListHubsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListHubsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + java.util.List getHubsList(); + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Hub getHubs(int index); + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + int getHubsCount(); + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + java.util.List + getHubsOrBuilderList(); + + /** + * + * + *
+   * The requested hubs.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Hub hubs = 1; + */ + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubsOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequest.java new file mode 100644 index 000000000000..e9d04b7d40a5 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequest.java @@ -0,0 +1,1415 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to list `MulticloudDataTransferConfig` resources.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest} + */ +@com.google.protobuf.Generated +public final class ListMulticloudDataTransferConfigsRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + ListMulticloudDataTransferConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMulticloudDataTransferConfigsRequest"); + } + + // Use ListMulticloudDataTransferConfigsRequest.newBuilder() to construct. + private ListMulticloudDataTransferConfigsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMulticloudDataTransferConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .class, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * 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 name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RETURN_PARTIAL_SUCCESS_FIELD_NUMBER = 6; + private boolean returnPartialSuccess_ = false; + + /** + * + * + *
+   * Optional. If `true`, allows partial responses for multi-regional aggregated
+   * list requests.
+   * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (returnPartialSuccess_ != false) { + output.writeBool(6, returnPartialSuccess_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (returnPartialSuccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, returnPartialSuccess_); + } + 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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) 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 (getReturnPartialSuccess() != other.getReturnPartialSuccess()) 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 = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + 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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + 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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to list `MulticloudDataTransferConfig` resources.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .class, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + returnPartialSuccess_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + build() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + 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_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.returnPartialSuccess_ = returnPartialSuccess_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + .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(); + } + if (other.getReturnPartialSuccess() != false) { + setReturnPartialSuccess(other.getReturnPartialSuccess()); + } + 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 + case 48: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The sort order of the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean returnPartialSuccess_; + + /** + * + * + *
+     * Optional. If `true`, allows partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + /** + * + * + *
+     * Optional. If `true`, allows partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnPartialSuccess to set. + * @return This builder for chaining. + */ + public Builder setReturnPartialSuccess(boolean value) { + + returnPartialSuccess_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If `true`, allows partial responses for multi-regional aggregated
+     * list requests.
+     * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnPartialSuccess() { + bitField0_ = (bitField0_ & ~0x00000020); + returnPartialSuccess_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMulticloudDataTransferConfigsRequest 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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..fed02b3800bc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListMulticloudDataTransferConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. The sort order of the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. If `true`, allows partial responses for multi-regional aggregated
+   * list requests.
+   * 
+ * + * bool return_partial_success = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + boolean getReturnPartialSuccess(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponse.java new file mode 100644 index 000000000000..15b2bf52ee40 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponse.java @@ -0,0 +1,1548 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response message to list `MulticloudDataTransferConfig` resources.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse} + */ +@com.google.protobuf.Generated +public final class ListMulticloudDataTransferConfigsResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + ListMulticloudDataTransferConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMulticloudDataTransferConfigsResponse"); + } + + // Use ListMulticloudDataTransferConfigsResponse.newBuilder() to construct. + private ListMulticloudDataTransferConfigsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMulticloudDataTransferConfigsResponse() { + multicloudDataTransferConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .class, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .Builder.class); + } + + public static final int MULTICLOUD_DATA_TRANSFER_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + multicloudDataTransferConfigs_; + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + @java.lang.Override + public java.util.List + getMulticloudDataTransferConfigsList() { + return multicloudDataTransferConfigs_; + } + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + getMulticloudDataTransferConfigsOrBuilderList() { + return multicloudDataTransferConfigs_; + } + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + @java.lang.Override + public int getMulticloudDataTransferConfigsCount() { + return multicloudDataTransferConfigs_.size(); + } + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfigs(int index) { + return multicloudDataTransferConfigs_.get(index); + } + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigsOrBuilder(int index) { + return multicloudDataTransferConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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 < multicloudDataTransferConfigs_.size(); i++) { + output.writeMessage(1, multicloudDataTransferConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < multicloudDataTransferConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, multicloudDataTransferConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) obj; + + if (!getMulticloudDataTransferConfigsList() + .equals(other.getMulticloudDataTransferConfigsList())) 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 (getMulticloudDataTransferConfigsCount() > 0) { + hash = (37 * hash) + MULTICLOUD_DATA_TRANSFER_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getMulticloudDataTransferConfigsList().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.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message to list `MulticloudDataTransferConfig` resources.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .class, + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multicloudDataTransferConfigsBuilder_ == null) { + multicloudDataTransferConfigs_ = java.util.Collections.emptyList(); + } else { + multicloudDataTransferConfigs_ = null; + multicloudDataTransferConfigsBuilder_.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.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + build() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + result) { + if (multicloudDataTransferConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + multicloudDataTransferConfigs_ = + java.util.Collections.unmodifiableList(multicloudDataTransferConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.multicloudDataTransferConfigs_ = multicloudDataTransferConfigs_; + } else { + result.multicloudDataTransferConfigs_ = multicloudDataTransferConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + .getDefaultInstance()) return this; + if (multicloudDataTransferConfigsBuilder_ == null) { + if (!other.multicloudDataTransferConfigs_.isEmpty()) { + if (multicloudDataTransferConfigs_.isEmpty()) { + multicloudDataTransferConfigs_ = other.multicloudDataTransferConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.addAll(other.multicloudDataTransferConfigs_); + } + onChanged(); + } + } else { + if (!other.multicloudDataTransferConfigs_.isEmpty()) { + if (multicloudDataTransferConfigsBuilder_.isEmpty()) { + multicloudDataTransferConfigsBuilder_.dispose(); + multicloudDataTransferConfigsBuilder_ = null; + multicloudDataTransferConfigs_ = other.multicloudDataTransferConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + multicloudDataTransferConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMulticloudDataTransferConfigsFieldBuilder() + : null; + } else { + multicloudDataTransferConfigsBuilder_.addAllMessages( + other.multicloudDataTransferConfigs_); + } + } + } + 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.networkconnectivity.v1beta.MulticloudDataTransferConfig m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .parser(), + extensionRegistry); + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.add(m); + } else { + multicloudDataTransferConfigsBuilder_.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 + multicloudDataTransferConfigs_ = java.util.Collections.emptyList(); + + private void ensureMulticloudDataTransferConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + multicloudDataTransferConfigs_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig>( + multicloudDataTransferConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + multicloudDataTransferConfigsBuilder_; + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public java.util.List + getMulticloudDataTransferConfigsList() { + if (multicloudDataTransferConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(multicloudDataTransferConfigs_); + } else { + return multicloudDataTransferConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public int getMulticloudDataTransferConfigsCount() { + if (multicloudDataTransferConfigsBuilder_ == null) { + return multicloudDataTransferConfigs_.size(); + } else { + return multicloudDataTransferConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfigs(int index) { + if (multicloudDataTransferConfigsBuilder_ == null) { + return multicloudDataTransferConfigs_.get(index); + } else { + return multicloudDataTransferConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder setMulticloudDataTransferConfigs( + int index, com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.set(index, value); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder setMulticloudDataTransferConfigs( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + builderForValue) { + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder addMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.add(value); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder addMulticloudDataTransferConfigs( + int index, com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.add(index, value); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder addMulticloudDataTransferConfigs( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + builderForValue) { + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.add(builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder addMulticloudDataTransferConfigs( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + builderForValue) { + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder addAllMulticloudDataTransferConfigs( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig> + values) { + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, multicloudDataTransferConfigs_); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder clearMulticloudDataTransferConfigs() { + if (multicloudDataTransferConfigsBuilder_ == null) { + multicloudDataTransferConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public Builder removeMulticloudDataTransferConfigs(int index) { + if (multicloudDataTransferConfigsBuilder_ == null) { + ensureMulticloudDataTransferConfigsIsMutable(); + multicloudDataTransferConfigs_.remove(index); + onChanged(); + } else { + multicloudDataTransferConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + getMulticloudDataTransferConfigsBuilder(int index) { + return internalGetMulticloudDataTransferConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigsOrBuilder(int index) { + if (multicloudDataTransferConfigsBuilder_ == null) { + return multicloudDataTransferConfigs_.get(index); + } else { + return multicloudDataTransferConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + getMulticloudDataTransferConfigsOrBuilderList() { + if (multicloudDataTransferConfigsBuilder_ != null) { + return multicloudDataTransferConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(multicloudDataTransferConfigs_); + } + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + addMulticloudDataTransferConfigsBuilder() { + return internalGetMulticloudDataTransferConfigsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + addMulticloudDataTransferConfigsBuilder(int index) { + return internalGetMulticloudDataTransferConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `MulticloudDataTransferConfig` resources to be listed.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder> + getMulticloudDataTransferConfigsBuilderList() { + return internalGetMulticloudDataTransferConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + internalGetMulticloudDataTransferConfigsFieldBuilder() { + if (multicloudDataTransferConfigsBuilder_ == null) { + multicloudDataTransferConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder>( + multicloudDataTransferConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + multicloudDataTransferConfigs_ = null; + } + return multicloudDataTransferConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + private static final com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListMulticloudDataTransferConfigsResponse 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.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..85ced27abb88 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferConfigsResponseOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListMulticloudDataTransferConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + java.util.List + getMulticloudDataTransferConfigsList(); + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfigs(int index); + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + int getMulticloudDataTransferConfigsCount(); + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + getMulticloudDataTransferConfigsOrBuilderList(); + + /** + * + * + *
+   * The list of `MulticloudDataTransferConfig` resources to be listed.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigsOrBuilder(int index); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequest.java new file mode 100644 index 000000000000..ca1319902bc2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequest.java @@ -0,0 +1,971 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to list the services in your project that are eligible for
+ * Data Transfer Essentials configuration.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest} + */ +@com.google.protobuf.Generated +public final class ListMulticloudDataTransferSupportedServicesRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest) + ListMulticloudDataTransferSupportedServicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMulticloudDataTransferSupportedServicesRequest"); + } + + // Use ListMulticloudDataTransferSupportedServicesRequest.newBuilder() to construct. + private ListMulticloudDataTransferSupportedServicesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMulticloudDataTransferSupportedServicesRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.class, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * 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 name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest + other = + (com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest) + obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to list the services in your project that are eligible for
+   * Data Transfer Essentials configuration.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest) + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.class, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + build() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest + result = + new com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * 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 name of the parent resource.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results listed per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + ListMulticloudDataTransferSupportedServicesRequest> + PARSER = + new com.google.protobuf.AbstractParser< + ListMulticloudDataTransferSupportedServicesRequest>() { + @java.lang.Override + public ListMulticloudDataTransferSupportedServicesRequest 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequestOrBuilder.java new file mode 100644 index 000000000000..adae25d6b78d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListMulticloudDataTransferSupportedServicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The name of the parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results listed per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponse.java new file mode 100644 index 000000000000..6c7d1936eb54 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponse.java @@ -0,0 +1,1309 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response message to list the services in your project in regions that are
+ * eligible for Data Transfer Essentials configuration.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse} + */ +@com.google.protobuf.Generated +public final class ListMulticloudDataTransferSupportedServicesResponse + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse) + ListMulticloudDataTransferSupportedServicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListMulticloudDataTransferSupportedServicesResponse"); + } + + // Use ListMulticloudDataTransferSupportedServicesResponse.newBuilder() to construct. + private ListMulticloudDataTransferSupportedServicesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListMulticloudDataTransferSupportedServicesResponse() { + multicloudDataTransferSupportedServices_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.class, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.Builder.class); + } + + public static final int MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + multicloudDataTransferSupportedServices_; + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServicesList() { + return multicloudDataTransferSupportedServices_; + } + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder> + getMulticloudDataTransferSupportedServicesOrBuilderList() { + return multicloudDataTransferSupportedServices_; + } + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + @java.lang.Override + public int getMulticloudDataTransferSupportedServicesCount() { + return multicloudDataTransferSupportedServices_.size(); + } + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getMulticloudDataTransferSupportedServices(int index) { + return multicloudDataTransferSupportedServices_.get(index); + } + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceOrBuilder + getMulticloudDataTransferSupportedServicesOrBuilder(int index) { + return multicloudDataTransferSupportedServices_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < multicloudDataTransferSupportedServices_.size(); i++) { + output.writeMessage(1, multicloudDataTransferSupportedServices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < multicloudDataTransferSupportedServices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, multicloudDataTransferSupportedServices_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse + other = + (com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse) + obj; + + if (!getMulticloudDataTransferSupportedServicesList() + .equals(other.getMulticloudDataTransferSupportedServicesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMulticloudDataTransferSupportedServicesCount() > 0) { + hash = (37 * hash) + MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getMulticloudDataTransferSupportedServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response message to list the services in your project in regions that are
+   * eligible for Data Transfer Essentials configuration.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse) + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.class, + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + multicloudDataTransferSupportedServices_ = java.util.Collections.emptyList(); + } else { + multicloudDataTransferSupportedServices_ = null; + multicloudDataTransferSupportedServicesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListMulticloudDataTransferSupportedServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + build() { + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + buildPartial() { + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + result = + new com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + result) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + multicloudDataTransferSupportedServices_ = + java.util.Collections.unmodifiableList(multicloudDataTransferSupportedServices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.multicloudDataTransferSupportedServices_ = multicloudDataTransferSupportedServices_; + } else { + result.multicloudDataTransferSupportedServices_ = + multicloudDataTransferSupportedServicesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse.getDefaultInstance()) + return this; + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + if (!other.multicloudDataTransferSupportedServices_.isEmpty()) { + if (multicloudDataTransferSupportedServices_.isEmpty()) { + multicloudDataTransferSupportedServices_ = + other.multicloudDataTransferSupportedServices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.addAll( + other.multicloudDataTransferSupportedServices_); + } + onChanged(); + } + } else { + if (!other.multicloudDataTransferSupportedServices_.isEmpty()) { + if (multicloudDataTransferSupportedServicesBuilder_.isEmpty()) { + multicloudDataTransferSupportedServicesBuilder_.dispose(); + multicloudDataTransferSupportedServicesBuilder_ = null; + multicloudDataTransferSupportedServices_ = + other.multicloudDataTransferSupportedServices_; + bitField0_ = (bitField0_ & ~0x00000001); + multicloudDataTransferSupportedServicesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetMulticloudDataTransferSupportedServicesFieldBuilder() + : null; + } else { + multicloudDataTransferSupportedServicesBuilder_.addAllMessages( + other.multicloudDataTransferSupportedServices_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService.parser(), + extensionRegistry); + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.add(m); + } else { + multicloudDataTransferSupportedServicesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + multicloudDataTransferSupportedServices_ = java.util.Collections.emptyList(); + + private void ensureMulticloudDataTransferSupportedServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + multicloudDataTransferSupportedServices_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService>( + multicloudDataTransferSupportedServices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder, + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder> + multicloudDataTransferSupportedServicesBuilder_; + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService> + getMulticloudDataTransferSupportedServicesList() { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(multicloudDataTransferSupportedServices_); + } else { + return multicloudDataTransferSupportedServicesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public int getMulticloudDataTransferSupportedServicesCount() { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + return multicloudDataTransferSupportedServices_.size(); + } else { + return multicloudDataTransferSupportedServicesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getMulticloudDataTransferSupportedServices(int index) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + return multicloudDataTransferSupportedServices_.get(index); + } else { + return multicloudDataTransferSupportedServicesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder setMulticloudDataTransferSupportedServices( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService value) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.set(index, value); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder setMulticloudDataTransferSupportedServices( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService.Builder + builderForValue) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.set(index, builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder addMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService value) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.add(value); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder addMulticloudDataTransferSupportedServices( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService value) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.add(index, value); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder addMulticloudDataTransferSupportedServices( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService.Builder + builderForValue) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.add(builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder addMulticloudDataTransferSupportedServices( + int index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService.Builder + builderForValue) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.add(index, builderForValue.build()); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder addAllMulticloudDataTransferSupportedServices( + java.lang.Iterable< + ? extends + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService> + values) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, multicloudDataTransferSupportedServices_); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder clearMulticloudDataTransferSupportedServices() { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + multicloudDataTransferSupportedServices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public Builder removeMulticloudDataTransferSupportedServices(int index) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + ensureMulticloudDataTransferSupportedServicesIsMutable(); + multicloudDataTransferSupportedServices_.remove(index); + onChanged(); + } else { + multicloudDataTransferSupportedServicesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder + getMulticloudDataTransferSupportedServicesBuilder(int index) { + return internalGetMulticloudDataTransferSupportedServicesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder + getMulticloudDataTransferSupportedServicesOrBuilder(int index) { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + return multicloudDataTransferSupportedServices_.get(index); + } else { + return multicloudDataTransferSupportedServicesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder> + getMulticloudDataTransferSupportedServicesOrBuilderList() { + if (multicloudDataTransferSupportedServicesBuilder_ != null) { + return multicloudDataTransferSupportedServicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(multicloudDataTransferSupportedServices_); + } + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder + addMulticloudDataTransferSupportedServicesBuilder() { + return internalGetMulticloudDataTransferSupportedServicesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder + addMulticloudDataTransferSupportedServicesBuilder(int index) { + return internalGetMulticloudDataTransferSupportedServicesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of supported services.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder> + getMulticloudDataTransferSupportedServicesBuilderList() { + return internalGetMulticloudDataTransferSupportedServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder, + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder> + internalGetMulticloudDataTransferSupportedServicesFieldBuilder() { + if (multicloudDataTransferSupportedServicesBuilder_ == null) { + multicloudDataTransferSupportedServicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder, + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder>( + multicloudDataTransferSupportedServices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + multicloudDataTransferSupportedServices_ = null; + } + return multicloudDataTransferSupportedServicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse) + private static final com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser< + ListMulticloudDataTransferSupportedServicesResponse> + PARSER = + new com.google.protobuf.AbstractParser< + ListMulticloudDataTransferSupportedServicesResponse>() { + @java.lang.Override + public ListMulticloudDataTransferSupportedServicesResponse 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.networkconnectivity.v1beta + .ListMulticloudDataTransferSupportedServicesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponseOrBuilder.java new file mode 100644 index 000000000000..51531815c3d0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListMulticloudDataTransferSupportedServicesResponseOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListMulticloudDataTransferSupportedServicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + java.util.List + getMulticloudDataTransferSupportedServicesList(); + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getMulticloudDataTransferSupportedServices(int index); + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + int getMulticloudDataTransferSupportedServicesCount(); + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedServiceOrBuilder> + getMulticloudDataTransferSupportedServicesOrBuilderList(); + + /** + * + * + *
+   * The list of supported services.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService multicloud_data_transfer_supported_services = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceOrBuilder + getMulticloudDataTransferSupportedServicesOrBuilder(int index); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next page token.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequest.java new file mode 100644 index 000000000000..aaab9adf0887 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequest.java @@ -0,0 +1,1295 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest} + */ +@com.google.protobuf.Generated +public final class ListPolicyBasedRoutesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) + ListPolicyBasedRoutesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBasedRoutesRequest"); + } + + // Use ListPolicyBasedRoutesRequest.newBuilder() to construct. + private ListPolicyBasedRoutesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBasedRoutesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results per page that should 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * A filter expression that filters the results listed in the response.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * A filter expression that filters the results listed in the response.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) 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.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest 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.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest 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.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + .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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results per page that should be returned.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results per page that should 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; + } + + /** + * + * + *
+     * The maximum number of results per page that should 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * A filter expression that filters the results listed in the response.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A filter expression that filters the results listed in the response.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * A filter expression that filters the results listed in the response.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * A filter expression that filters the results listed in the response.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * A filter expression that filters the results listed in the response.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBasedRoutesRequest 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.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequestOrBuilder.java new file mode 100644 index 000000000000..e0c052861d44 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListPolicyBasedRoutesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results per page that should be returned.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A filter expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * A filter expression that filters the results listed in the response.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponse.java new file mode 100644 index 000000000000..d16a543ea238 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponse.java @@ -0,0 +1,1506 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse} + */ +@com.google.protobuf.Generated +public final class ListPolicyBasedRoutesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) + ListPolicyBasedRoutesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListPolicyBasedRoutesResponse"); + } + + // Use ListPolicyBasedRoutesResponse.newBuilder() to construct. + private ListPolicyBasedRoutesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListPolicyBasedRoutesResponse() { + policyBasedRoutes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.Builder + .class); + } + + public static final int POLICY_BASED_ROUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + policyBasedRoutes_; + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + @java.lang.Override + public java.util.List + getPolicyBasedRoutesList() { + return policyBasedRoutes_; + } + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + getPolicyBasedRoutesOrBuilderList() { + return policyBasedRoutes_; + } + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + @java.lang.Override + public int getPolicyBasedRoutesCount() { + return policyBasedRoutes_.size(); + } + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoutes( + int index) { + return policyBasedRoutes_.get(index); + } + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRoutesOrBuilder(int index) { + return policyBasedRoutes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The next pagination token in the List response. It should be used as
+   * page_token for the following request. An empty value means no more result.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The next pagination token in the List response. It should be used as
+   * page_token for the following request. An empty value means no more result.
+   * 
+ * + * 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 < policyBasedRoutes_.size(); i++) { + output.writeMessage(1, policyBasedRoutes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < policyBasedRoutes_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyBasedRoutes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) obj; + + if (!getPolicyBasedRoutesList().equals(other.getPolicyBasedRoutesList())) 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 (getPolicyBasedRoutesCount() > 0) { + hash = (37 * hash) + POLICY_BASED_ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getPolicyBasedRoutesList().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.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse 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.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse 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.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (policyBasedRoutesBuilder_ == null) { + policyBasedRoutes_ = java.util.Collections.emptyList(); + } else { + policyBasedRoutes_ = null; + policyBasedRoutesBuilder_.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.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse result) { + if (policyBasedRoutesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + policyBasedRoutes_ = java.util.Collections.unmodifiableList(policyBasedRoutes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.policyBasedRoutes_ = policyBasedRoutes_; + } else { + result.policyBasedRoutes_ = policyBasedRoutesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + .getDefaultInstance()) return this; + if (policyBasedRoutesBuilder_ == null) { + if (!other.policyBasedRoutes_.isEmpty()) { + if (policyBasedRoutes_.isEmpty()) { + policyBasedRoutes_ = other.policyBasedRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.addAll(other.policyBasedRoutes_); + } + onChanged(); + } + } else { + if (!other.policyBasedRoutes_.isEmpty()) { + if (policyBasedRoutesBuilder_.isEmpty()) { + policyBasedRoutesBuilder_.dispose(); + policyBasedRoutesBuilder_ = null; + policyBasedRoutes_ = other.policyBasedRoutes_; + bitField0_ = (bitField0_ & ~0x00000001); + policyBasedRoutesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyBasedRoutesFieldBuilder() + : null; + } else { + policyBasedRoutesBuilder_.addAllMessages(other.policyBasedRoutes_); + } + } + } + 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.networkconnectivity.v1beta.PolicyBasedRoute m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.parser(), + extensionRegistry); + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.add(m); + } else { + policyBasedRoutesBuilder_.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 + policyBasedRoutes_ = java.util.Collections.emptyList(); + + private void ensurePolicyBasedRoutesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + policyBasedRoutes_ = + new java.util.ArrayList( + policyBasedRoutes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + policyBasedRoutesBuilder_; + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public java.util.List + getPolicyBasedRoutesList() { + if (policyBasedRoutesBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyBasedRoutes_); + } else { + return policyBasedRoutesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public int getPolicyBasedRoutesCount() { + if (policyBasedRoutesBuilder_ == null) { + return policyBasedRoutes_.size(); + } else { + return policyBasedRoutesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoutes( + int index) { + if (policyBasedRoutesBuilder_ == null) { + return policyBasedRoutes_.get(index); + } else { + return policyBasedRoutesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder setPolicyBasedRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute value) { + if (policyBasedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.set(index, value); + onChanged(); + } else { + policyBasedRoutesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder setPolicyBasedRoutes( + int index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder builderForValue) { + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.set(index, builderForValue.build()); + onChanged(); + } else { + policyBasedRoutesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder addPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute value) { + if (policyBasedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.add(value); + onChanged(); + } else { + policyBasedRoutesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder addPolicyBasedRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute value) { + if (policyBasedRoutesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.add(index, value); + onChanged(); + } else { + policyBasedRoutesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder addPolicyBasedRoutes( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder builderForValue) { + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.add(builderForValue.build()); + onChanged(); + } else { + policyBasedRoutesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder addPolicyBasedRoutes( + int index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder builderForValue) { + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.add(index, builderForValue.build()); + onChanged(); + } else { + policyBasedRoutesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder addAllPolicyBasedRoutes( + java.lang.Iterable + values) { + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyBasedRoutes_); + onChanged(); + } else { + policyBasedRoutesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder clearPolicyBasedRoutes() { + if (policyBasedRoutesBuilder_ == null) { + policyBasedRoutes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + policyBasedRoutesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public Builder removePolicyBasedRoutes(int index) { + if (policyBasedRoutesBuilder_ == null) { + ensurePolicyBasedRoutesIsMutable(); + policyBasedRoutes_.remove(index); + onChanged(); + } else { + policyBasedRoutesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder + getPolicyBasedRoutesBuilder(int index) { + return internalGetPolicyBasedRoutesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRoutesOrBuilder(int index) { + if (policyBasedRoutesBuilder_ == null) { + return policyBasedRoutes_.get(index); + } else { + return policyBasedRoutesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + getPolicyBasedRoutesOrBuilderList() { + if (policyBasedRoutesBuilder_ != null) { + return policyBasedRoutesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyBasedRoutes_); + } + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder + addPolicyBasedRoutesBuilder() { + return internalGetPolicyBasedRoutesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance()); + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder + addPolicyBasedRoutesBuilder(int index) { + return internalGetPolicyBasedRoutesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance()); + } + + /** + * + * + *
+     * Policy-based routes to be returned.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + public java.util.List + getPolicyBasedRoutesBuilderList() { + return internalGetPolicyBasedRoutesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder> + internalGetPolicyBasedRoutesFieldBuilder() { + if (policyBasedRoutesBuilder_ == null) { + policyBasedRoutesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder>( + policyBasedRoutes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + policyBasedRoutes_ = null; + } + return policyBasedRoutesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The next pagination token in the List response. It should be used as
+     * page_token for the following request. An empty value means no more result.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next pagination token in the List response. It should be used as
+     * page_token for the following request. An empty value means no more result.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The next pagination token in the List response. It should be used as
+     * page_token for the following request. An empty value means no more result.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The next pagination token in the List response. It should be used as
+     * page_token for the following request. An empty value means no more result.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The next pagination token in the List response. It should be used as
+     * page_token for the following request. An empty value means no more result.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPolicyBasedRoutesResponse 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.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponseOrBuilder.java new file mode 100644 index 000000000000..2aa0e7b648a0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListPolicyBasedRoutesResponseOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListPolicyBasedRoutesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + java.util.List + getPolicyBasedRoutesList(); + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getPolicyBasedRoutes(int index); + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + int getPolicyBasedRoutesCount(); + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + java.util.List + getPolicyBasedRoutesOrBuilderList(); + + /** + * + * + *
+   * Policy-based routes to be returned.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute policy_based_routes = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder + getPolicyBasedRoutesOrBuilder(int index); + + /** + * + * + *
+   * The next pagination token in the List response. It should be used as
+   * page_token for the following request. An empty value means no more result.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The next pagination token in the List response. It should be used as
+   * page_token for the following request. An empty value means no more result.
+   * 
+ * + * 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequest.java new file mode 100644 index 000000000000..d23a028728f1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequest.java @@ -0,0 +1,1307 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for requesting list of RemoteTransportProfiles.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest} + */ +@com.google.protobuf.Generated +public final class ListRemoteTransportProfilesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + ListRemoteTransportProfilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRemoteTransportProfilesRequest"); + } + + // Use ListRemoteTransportProfilesRequest.newBuilder() to construct. + private ListRemoteTransportProfilesRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRemoteTransportProfilesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListRemoteTransportProfilesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListRemoteTransportProfilesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) 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.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + 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.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + 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.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of RemoteTransportProfiles.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListRemoteTransportProfilesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListRemoteTransportProfilesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListRemoteTransportProfilesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListRemoteTransportProfilesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListRemoteTransportProfilesRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRemoteTransportProfilesRequest 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.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequestOrBuilder.java new file mode 100644 index 000000000000..094d54e9c307 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRemoteTransportProfilesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListRemoteTransportProfilesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListRemoteTransportProfilesRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponse.java new file mode 100644 index 000000000000..0ff20acb5081 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponse.java @@ -0,0 +1,1517 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for response to listing RemoteTransportProfiles
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse} + */ +@com.google.protobuf.Generated +public final class ListRemoteTransportProfilesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + ListRemoteTransportProfilesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRemoteTransportProfilesResponse"); + } + + // Use ListRemoteTransportProfilesResponse.newBuilder() to construct. + private ListRemoteTransportProfilesResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRemoteTransportProfilesResponse() { + remoteTransportProfiles_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse.Builder + .class); + } + + public static final int REMOTE_TRANSPORT_PROFILES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + remoteTransportProfiles_; + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + @java.lang.Override + public java.util.List + getRemoteTransportProfilesList() { + return remoteTransportProfiles_; + } + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder> + getRemoteTransportProfilesOrBuilderList() { + return remoteTransportProfiles_; + } + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + @java.lang.Override + public int getRemoteTransportProfilesCount() { + return remoteTransportProfiles_.size(); + } + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getRemoteTransportProfiles(int index) { + return remoteTransportProfiles_.get(index); + } + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder + getRemoteTransportProfilesOrBuilder(int index) { + return remoteTransportProfiles_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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 < remoteTransportProfiles_.size(); i++) { + output.writeMessage(1, remoteTransportProfiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < remoteTransportProfiles_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, remoteTransportProfiles_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) obj; + + if (!getRemoteTransportProfilesList().equals(other.getRemoteTransportProfilesList())) + 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 (getRemoteTransportProfilesCount() > 0) { + hash = (37 * hash) + REMOTE_TRANSPORT_PROFILES_FIELD_NUMBER; + hash = (53 * hash) + getRemoteTransportProfilesList().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.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + 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.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + 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.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing RemoteTransportProfiles
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (remoteTransportProfilesBuilder_ == null) { + remoteTransportProfiles_ = java.util.Collections.emptyList(); + } else { + remoteTransportProfiles_ = null; + remoteTransportProfilesBuilder_.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.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse result) { + if (remoteTransportProfilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + remoteTransportProfiles_ = + java.util.Collections.unmodifiableList(remoteTransportProfiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.remoteTransportProfiles_ = remoteTransportProfiles_; + } else { + result.remoteTransportProfiles_ = remoteTransportProfilesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + .getDefaultInstance()) return this; + if (remoteTransportProfilesBuilder_ == null) { + if (!other.remoteTransportProfiles_.isEmpty()) { + if (remoteTransportProfiles_.isEmpty()) { + remoteTransportProfiles_ = other.remoteTransportProfiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.addAll(other.remoteTransportProfiles_); + } + onChanged(); + } + } else { + if (!other.remoteTransportProfiles_.isEmpty()) { + if (remoteTransportProfilesBuilder_.isEmpty()) { + remoteTransportProfilesBuilder_.dispose(); + remoteTransportProfilesBuilder_ = null; + remoteTransportProfiles_ = other.remoteTransportProfiles_; + bitField0_ = (bitField0_ & ~0x00000001); + remoteTransportProfilesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRemoteTransportProfilesFieldBuilder() + : null; + } else { + remoteTransportProfilesBuilder_.addAllMessages(other.remoteTransportProfiles_); + } + } + } + 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.networkconnectivity.v1beta.RemoteTransportProfile m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.parser(), + extensionRegistry); + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.add(m); + } else { + remoteTransportProfilesBuilder_.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 + remoteTransportProfiles_ = java.util.Collections.emptyList(); + + private void ensureRemoteTransportProfilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + remoteTransportProfiles_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile>( + remoteTransportProfiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder> + remoteTransportProfilesBuilder_; + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public java.util.List + getRemoteTransportProfilesList() { + if (remoteTransportProfilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(remoteTransportProfiles_); + } else { + return remoteTransportProfilesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public int getRemoteTransportProfilesCount() { + if (remoteTransportProfilesBuilder_ == null) { + return remoteTransportProfiles_.size(); + } else { + return remoteTransportProfilesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getRemoteTransportProfiles(int index) { + if (remoteTransportProfilesBuilder_ == null) { + return remoteTransportProfiles_.get(index); + } else { + return remoteTransportProfilesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder setRemoteTransportProfiles( + int index, com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile value) { + if (remoteTransportProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.set(index, value); + onChanged(); + } else { + remoteTransportProfilesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder setRemoteTransportProfiles( + int index, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + builderForValue) { + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.set(index, builderForValue.build()); + onChanged(); + } else { + remoteTransportProfilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder addRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile value) { + if (remoteTransportProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.add(value); + onChanged(); + } else { + remoteTransportProfilesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder addRemoteTransportProfiles( + int index, com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile value) { + if (remoteTransportProfilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.add(index, value); + onChanged(); + } else { + remoteTransportProfilesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder addRemoteTransportProfiles( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + builderForValue) { + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.add(builderForValue.build()); + onChanged(); + } else { + remoteTransportProfilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder addRemoteTransportProfiles( + int index, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + builderForValue) { + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.add(index, builderForValue.build()); + onChanged(); + } else { + remoteTransportProfilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder addAllRemoteTransportProfiles( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile> + values) { + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, remoteTransportProfiles_); + onChanged(); + } else { + remoteTransportProfilesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder clearRemoteTransportProfiles() { + if (remoteTransportProfilesBuilder_ == null) { + remoteTransportProfiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + remoteTransportProfilesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public Builder removeRemoteTransportProfiles(int index) { + if (remoteTransportProfilesBuilder_ == null) { + ensureRemoteTransportProfilesIsMutable(); + remoteTransportProfiles_.remove(index); + onChanged(); + } else { + remoteTransportProfilesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + getRemoteTransportProfilesBuilder(int index) { + return internalGetRemoteTransportProfilesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder + getRemoteTransportProfilesOrBuilder(int index) { + if (remoteTransportProfilesBuilder_ == null) { + return remoteTransportProfiles_.get(index); + } else { + return remoteTransportProfilesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder> + getRemoteTransportProfilesOrBuilderList() { + if (remoteTransportProfilesBuilder_ != null) { + return remoteTransportProfilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(remoteTransportProfiles_); + } + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + addRemoteTransportProfilesBuilder() { + return internalGetRemoteTransportProfilesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder + addRemoteTransportProfilesBuilder(int index) { + return internalGetRemoteTransportProfilesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .getDefaultInstance()); + } + + /** + * + * + *
+     * The list of RemoteTransportProfiles.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder> + getRemoteTransportProfilesBuilderList() { + return internalGetRemoteTransportProfilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder> + internalGetRemoteTransportProfilesFieldBuilder() { + if (remoteTransportProfilesBuilder_ == null) { + remoteTransportProfilesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder>( + remoteTransportProfiles_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + remoteTransportProfiles_ = null; + } + return remoteTransportProfilesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + private static final com.google.cloud.networkconnectivity.v1beta + .ListRemoteTransportProfilesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRemoteTransportProfilesResponse 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.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponseOrBuilder.java new file mode 100644 index 000000000000..1236ba954f55 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRemoteTransportProfilesResponseOrBuilder.java @@ -0,0 +1,178 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRemoteTransportProfilesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + java.util.List + getRemoteTransportProfilesList(); + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile getRemoteTransportProfiles( + int index); + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + int getRemoteTransportProfilesCount(); + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder> + getRemoteTransportProfilesOrBuilderList(); + + /** + * + * + *
+   * The list of RemoteTransportProfiles.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile remote_transport_profiles = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder + getRemoteTransportProfilesOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequest.java new file mode 100644 index 000000000000..4db43847888b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequest.java @@ -0,0 +1,1290 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest} + */ +@com.google.protobuf.Generated +public final class ListRouteTablesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) + ListRouteTablesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRouteTablesRequest"); + } + + // Use ListRouteTablesRequest.newBuilder() to construct. + private ListRouteTablesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRouteTablesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRouteTablesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) 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.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest 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.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest 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.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + .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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRouteTablesRequest 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.networkconnectivity.v1beta.ListRouteTablesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequestOrBuilder.java new file mode 100644 index 000000000000..904538908077 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRouteTablesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponse.java new file mode 100644 index 000000000000..854cdbae2ba8 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponse.java @@ -0,0 +1,1445 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse} + */ +@com.google.protobuf.Generated +public final class ListRouteTablesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) + ListRouteTablesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRouteTablesResponse"); + } + + // Use ListRouteTablesResponse.newBuilder() to construct. + private ListRouteTablesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRouteTablesResponse() { + routeTables_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.Builder.class); + } + + public static final int ROUTE_TABLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List routeTables_; + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + @java.lang.Override + public java.util.List + getRouteTablesList() { + return routeTables_; + } + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + @java.lang.Override + public java.util.List + getRouteTablesOrBuilderList() { + return routeTables_; + } + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + @java.lang.Override + public int getRouteTablesCount() { + return routeTables_.size(); + } + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteTable getRouteTables(int index) { + return routeTables_.get(index); + } + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder getRouteTablesOrBuilder( + int index) { + return routeTables_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Hubs 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); + } + + /** + * + * + *
+   * Hubs 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 < routeTables_.size(); i++) { + output.writeMessage(1, routeTables_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < routeTables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routeTables_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRouteTablesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) obj; + + if (!getRouteTablesList().equals(other.getRouteTablesList())) 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 (getRouteTablesCount() > 0) { + hash = (37 * hash) + ROUTE_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getRouteTablesList().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.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse 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.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse 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.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (routeTablesBuilder_ == null) { + routeTables_ = java.util.Collections.emptyList(); + } else { + routeTables_ = null; + routeTablesBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRouteTablesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse result) { + if (routeTablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routeTables_ = java.util.Collections.unmodifiableList(routeTables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routeTables_ = routeTables_; + } else { + result.routeTables_ = routeTablesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + .getDefaultInstance()) return this; + if (routeTablesBuilder_ == null) { + if (!other.routeTables_.isEmpty()) { + if (routeTables_.isEmpty()) { + routeTables_ = other.routeTables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRouteTablesIsMutable(); + routeTables_.addAll(other.routeTables_); + } + onChanged(); + } + } else { + if (!other.routeTables_.isEmpty()) { + if (routeTablesBuilder_.isEmpty()) { + routeTablesBuilder_.dispose(); + routeTablesBuilder_ = null; + routeTables_ = other.routeTables_; + bitField0_ = (bitField0_ & ~0x00000001); + routeTablesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRouteTablesFieldBuilder() + : null; + } else { + routeTablesBuilder_.addAllMessages(other.routeTables_); + } + } + } + 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.networkconnectivity.v1beta.RouteTable m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.RouteTable.parser(), + extensionRegistry); + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(m); + } else { + routeTablesBuilder_.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 routeTables_ = + java.util.Collections.emptyList(); + + private void ensureRouteTablesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routeTables_ = + new java.util.ArrayList( + routeTables_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouteTable, + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder> + routeTablesBuilder_; + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public java.util.List + getRouteTablesList() { + if (routeTablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(routeTables_); + } else { + return routeTablesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public int getRouteTablesCount() { + if (routeTablesBuilder_ == null) { + return routeTables_.size(); + } else { + return routeTablesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable getRouteTables(int index) { + if (routeTablesBuilder_ == null) { + return routeTables_.get(index); + } else { + return routeTablesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder setRouteTables( + int index, com.google.cloud.networkconnectivity.v1beta.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.set(index, value); + onChanged(); + } else { + routeTablesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder setRouteTables( + int index, com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.set(index, builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder addRouteTables(com.google.cloud.networkconnectivity.v1beta.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(value); + onChanged(); + } else { + routeTablesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + int index, com.google.cloud.networkconnectivity.v1beta.RouteTable value) { + if (routeTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRouteTablesIsMutable(); + routeTables_.add(index, value); + onChanged(); + } else { + routeTablesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder addRouteTables( + int index, com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder builderForValue) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.add(index, builderForValue.build()); + onChanged(); + } else { + routeTablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder addAllRouteTables( + java.lang.Iterable + values) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routeTables_); + onChanged(); + } else { + routeTablesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder clearRouteTables() { + if (routeTablesBuilder_ == null) { + routeTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routeTablesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public Builder removeRouteTables(int index) { + if (routeTablesBuilder_ == null) { + ensureRouteTablesIsMutable(); + routeTables_.remove(index); + onChanged(); + } else { + routeTablesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder getRouteTablesBuilder( + int index) { + return internalGetRouteTablesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder getRouteTablesOrBuilder( + int index) { + if (routeTablesBuilder_ == null) { + return routeTables_.get(index); + } else { + return routeTablesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public java.util.List + getRouteTablesOrBuilderList() { + if (routeTablesBuilder_ != null) { + return routeTablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routeTables_); + } + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder addRouteTablesBuilder() { + return internalGetRouteTablesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.RouteTable.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder addRouteTablesBuilder( + int index) { + return internalGetRouteTablesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.RouteTable.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested route tables.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + public java.util.List + getRouteTablesBuilderList() { + return internalGetRouteTablesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouteTable, + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder> + internalGetRouteTablesFieldBuilder() { + if (routeTablesBuilder_ == null) { + routeTablesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.RouteTable, + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder>( + routeTables_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + routeTables_ = null; + } + return routeTablesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * Hubs 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_; + } + + /** + * + * + *
+     * Hubs that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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); + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + /** + * + * + *
+     * Hubs 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRouteTablesResponse 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.networkconnectivity.v1beta.ListRouteTablesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponseOrBuilder.java new file mode 100644 index 000000000000..8004e29f65bf --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRouteTablesResponseOrBuilder.java @@ -0,0 +1,169 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRouteTablesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + java.util.List getRouteTablesList(); + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + com.google.cloud.networkconnectivity.v1beta.RouteTable getRouteTables(int index); + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + int getRouteTablesCount(); + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + java.util.List + getRouteTablesOrBuilderList(); + + /** + * + * + *
+   * The requested route tables.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.RouteTable route_tables = 1; + */ + com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder getRouteTablesOrBuilder( + int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Hubs that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Hubs 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); + + /** + * + * + *
+   * Hubs 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequest.java new file mode 100644 index 000000000000..cce3cd135475 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequest.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRoutesRequest} + */ +@com.google.protobuf.Generated +public final class ListRoutesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRoutesRequest) + ListRoutesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRoutesRequest"); + } + + // Use ListRoutesRequest.newBuilder() to construct. + private ListRoutesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRoutesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * 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 resource's name.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRoutesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest) 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.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest 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.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest 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.networkconnectivity.v1beta.ListRoutesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRoutesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRoutesRequest) + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest.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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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 resource's name.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRoutesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRoutesRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutesRequest 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.networkconnectivity.v1beta.ListRoutesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequestOrBuilder.java new file mode 100644 index 000000000000..4edb097369dc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRoutesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRoutesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource's name.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponse.java new file mode 100644 index 000000000000..a5d35d40c076 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponse.java @@ -0,0 +1,1431 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Response for
+ * [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRoutesResponse} + */ +@com.google.protobuf.Generated +public final class ListRoutesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListRoutesResponse) + ListRoutesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRoutesResponse"); + } + + // Use ListRoutesResponse.newBuilder() to construct. + private ListRoutesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRoutesResponse() { + routes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.Builder.class); + } + + public static final int ROUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List routes_; + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + @java.lang.Override + public java.util.List getRoutesList() { + return routes_; + } + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + @java.lang.Override + public java.util.List + getRoutesOrBuilderList() { + return routes_; + } + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + @java.lang.Override + public int getRoutesCount() { + return routes_.size(); + } + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Route getRoutes(int index) { + return routes_.get(index); + } + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder getRoutesOrBuilder(int index) { + return routes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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(); + + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * RouteTables 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); + } + + /** + * + * + *
+   * RouteTables 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 < routes_.size(); i++) { + output.writeMessage(1, routes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < routes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListRoutesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse) obj; + + if (!getRoutesList().equals(other.getRoutesList())) 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 (getRoutesCount() > 0) { + hash = (37 * hash) + ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getRoutesList().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.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse 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.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse 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.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response for
+   * [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListRoutesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListRoutesResponse) + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (routesBuilder_ == null) { + routes_ = java.util.Collections.emptyList(); + } else { + routes_ = null; + routesBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListRoutesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse result) { + if (routesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + routes_ = java.util.Collections.unmodifiableList(routes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.routes_ = routes_; + } else { + result.routes_ = routesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse.getDefaultInstance()) + return this; + if (routesBuilder_ == null) { + if (!other.routes_.isEmpty()) { + if (routes_.isEmpty()) { + routes_ = other.routes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRoutesIsMutable(); + routes_.addAll(other.routes_); + } + onChanged(); + } + } else { + if (!other.routes_.isEmpty()) { + if (routesBuilder_.isEmpty()) { + routesBuilder_.dispose(); + routesBuilder_ = null; + routes_ = other.routes_; + bitField0_ = (bitField0_ & ~0x00000001); + routesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRoutesFieldBuilder() + : null; + } else { + routesBuilder_.addAllMessages(other.routes_); + } + } + } + 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.networkconnectivity.v1beta.Route m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Route.parser(), + extensionRegistry); + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(m); + } else { + routesBuilder_.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 routes_ = + java.util.Collections.emptyList(); + + private void ensureRoutesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + routes_ = + new java.util.ArrayList(routes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Route, + com.google.cloud.networkconnectivity.v1beta.Route.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder> + routesBuilder_; + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public java.util.List getRoutesList() { + if (routesBuilder_ == null) { + return java.util.Collections.unmodifiableList(routes_); + } else { + return routesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public int getRoutesCount() { + if (routesBuilder_ == null) { + return routes_.size(); + } else { + return routesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Route getRoutes(int index) { + if (routesBuilder_ == null) { + return routes_.get(index); + } else { + return routesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder setRoutes(int index, com.google.cloud.networkconnectivity.v1beta.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.set(index, value); + onChanged(); + } else { + routesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder setRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.set(index, builderForValue.build()); + onChanged(); + } else { + routesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder addRoutes(com.google.cloud.networkconnectivity.v1beta.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.add(value); + onChanged(); + } else { + routesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder addRoutes(int index, com.google.cloud.networkconnectivity.v1beta.Route value) { + if (routesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutesIsMutable(); + routes_.add(index, value); + onChanged(); + } else { + routesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder addRoutes( + com.google.cloud.networkconnectivity.v1beta.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(builderForValue.build()); + onChanged(); + } else { + routesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder addRoutes( + int index, com.google.cloud.networkconnectivity.v1beta.Route.Builder builderForValue) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.add(index, builderForValue.build()); + onChanged(); + } else { + routesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder addAllRoutes( + java.lang.Iterable values) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routes_); + onChanged(); + } else { + routesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder clearRoutes() { + if (routesBuilder_ == null) { + routes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + routesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public Builder removeRoutes(int index) { + if (routesBuilder_ == null) { + ensureRoutesIsMutable(); + routes_.remove(index); + onChanged(); + } else { + routesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Route.Builder getRoutesBuilder(int index) { + return internalGetRoutesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder getRoutesOrBuilder( + int index) { + if (routesBuilder_ == null) { + return routes_.get(index); + } else { + return routesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public java.util.List + getRoutesOrBuilderList() { + if (routesBuilder_ != null) { + return routesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(routes_); + } + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Route.Builder addRoutesBuilder() { + return internalGetRoutesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Route.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Route.Builder addRoutesBuilder(int index) { + return internalGetRoutesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Route.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested routes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + public java.util.List + getRoutesBuilderList() { + return internalGetRoutesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Route, + com.google.cloud.networkconnectivity.v1beta.Route.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder> + internalGetRoutesFieldBuilder() { + if (routesBuilder_ == null) { + routesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Route, + com.google.cloud.networkconnectivity.v1beta.Route.Builder, + com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder>( + routes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + routes_ = null; + } + return routesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * RouteTables 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_; + } + + /** + * + * + *
+     * RouteTables that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * RouteTables 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); + } + + /** + * + * + *
+     * RouteTables 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); + } + + /** + * + * + *
+     * RouteTables 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; + } + + /** + * + * + *
+     * RouteTables 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; + } + + /** + * + * + *
+     * RouteTables 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; + } + + /** + * + * + *
+     * RouteTables 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; + } + + /** + * + * + *
+     * RouteTables 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListRoutesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListRoutesResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRoutesResponse 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.networkconnectivity.v1beta.ListRoutesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponseOrBuilder.java new file mode 100644 index 000000000000..0ee8c0db5959 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListRoutesResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListRoutesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListRoutesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + java.util.List getRoutesList(); + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Route getRoutes(int index); + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + int getRoutesCount(); + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + java.util.List + getRoutesOrBuilderList(); + + /** + * + * + *
+   * The requested routes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Route routes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder getRoutesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * RouteTables that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * RouteTables 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); + + /** + * + * + *
+   * RouteTables 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequest.java new file mode 100644 index 000000000000..952bf164b6c7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequest.java @@ -0,0 +1,1281 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListSpokesRequest} + */ +@com.google.protobuf.Generated +public final class ListSpokesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListSpokesRequest) + ListSpokesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSpokesRequest"); + } + + // Use ListSpokesRequest.newBuilder() to construct. + private ListSpokesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSpokesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * 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 resource.
+   * 
+ * + * + * 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; + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * The page token.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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; + } + } + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * 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.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListSpokesRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest) 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.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest 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.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest 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.networkconnectivity.v1beta.ListSpokesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListSpokesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListSpokesRequest) + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest.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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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 resource.
+     * 
+ * + * + * 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_; + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The maximum number of results to return per page.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The page token.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * An expression that filters the list of results.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Sort the results by a certain order.
+     * 
+ * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListSpokesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListSpokesRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSpokesRequest 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.networkconnectivity.v1beta.ListSpokesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequestOrBuilder.java new file mode 100644 index 000000000000..08d2755923b9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListSpokesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListSpokesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * An expression that filters the list of results.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Sort the results by a certain order.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponse.java new file mode 100644 index 000000000000..db3ba581a4d2 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponse.java @@ -0,0 +1,1429 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListSpokesResponse} + */ +@com.google.protobuf.Generated +public final class ListSpokesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListSpokesResponse) + ListSpokesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListSpokesResponse"); + } + + // Use ListSpokesResponse.newBuilder() to construct. + private ListSpokesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListSpokesResponse() { + spokes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.Builder.class); + } + + public static final int SPOKES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List spokes_; + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List getSpokesList() { + return spokes_; + } + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public java.util.List + getSpokesOrBuilderList() { + return spokes_; + } + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public int getSpokesCount() { + return spokes_.size(); + } + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index) { + return spokes_.get(index); + } + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder(int index) { + return spokes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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 < spokes_.size(); i++) { + output.writeMessage(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < spokes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, spokes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListSpokesResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse) obj; + + if (!getSpokesList().equals(other.getSpokesList())) 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 (getSpokesCount() > 0) { + hash = (37 * hash) + SPOKES_FIELD_NUMBER; + hash = (53 * hash) + getSpokesList().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.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse 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.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse 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.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListSpokesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListSpokesResponse) + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + } else { + spokes_ = null; + spokesBuilder_.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.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListSpokesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse result) { + if (spokesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + spokes_ = java.util.Collections.unmodifiableList(spokes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.spokes_ = spokes_; + } else { + result.spokes_ = spokesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse.getDefaultInstance()) + return this; + if (spokesBuilder_ == null) { + if (!other.spokes_.isEmpty()) { + if (spokes_.isEmpty()) { + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpokesIsMutable(); + spokes_.addAll(other.spokes_); + } + onChanged(); + } + } else { + if (!other.spokes_.isEmpty()) { + if (spokesBuilder_.isEmpty()) { + spokesBuilder_.dispose(); + spokesBuilder_ = null; + spokes_ = other.spokes_; + bitField0_ = (bitField0_ & ~0x00000001); + spokesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSpokesFieldBuilder() + : null; + } else { + spokesBuilder_.addAllMessages(other.spokes_); + } + } + } + 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.networkconnectivity.v1beta.Spoke m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Spoke.parser(), + extensionRegistry); + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(m); + } else { + spokesBuilder_.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 spokes_ = + java.util.Collections.emptyList(); + + private void ensureSpokesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + spokes_ = + new java.util.ArrayList(spokes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokesBuilder_; + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List getSpokesList() { + if (spokesBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokes_); + } else { + return spokesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public int getSpokesCount() { + if (spokesBuilder_ == null) { + return spokes_.size(); + } else { + return spokesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder setSpokes(int index, com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.set(index, value); + onChanged(); + } else { + spokesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder setSpokes( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.set(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(value); + onChanged(); + } else { + spokesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes(int index, com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokesIsMutable(); + spokes_.add(index, value); + onChanged(); + } else { + spokesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addSpokes( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.add(index, builderForValue.build()); + onChanged(); + } else { + spokesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder addAllSpokes( + java.lang.Iterable values) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokes_); + onChanged(); + } else { + spokesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder clearSpokes() { + if (spokesBuilder_ == null) { + spokes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + spokesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public Builder removeSpokes(int index) { + if (spokesBuilder_ == null) { + ensureSpokesIsMutable(); + spokes_.remove(index); + onChanged(); + } else { + spokesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokesBuilder(int index) { + return internalGetSpokesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder( + int index) { + if (spokesBuilder_ == null) { + return spokes_.get(index); + } else { + return spokesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List + getSpokesOrBuilderList() { + if (spokesBuilder_ != null) { + return spokesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokes_); + } + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder addSpokesBuilder() { + return internalGetSpokesFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder addSpokesBuilder(int index) { + return internalGetSpokesFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()); + } + + /** + * + * + *
+     * The requested spokes.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + public java.util.List + getSpokesBuilderList() { + return internalGetSpokesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokesFieldBuilder() { + if (spokesBuilder_ == null) { + spokesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + spokes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + spokes_ = null; + } + return spokesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListSpokesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListSpokesResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSpokesResponse 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.networkconnectivity.v1beta.ListSpokesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponseOrBuilder.java new file mode 100644 index 000000000000..510710c3d93c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListSpokesResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListSpokesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListSpokesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + java.util.List getSpokesList(); + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpokes(int index); + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + int getSpokesCount(); + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + java.util.List + getSpokesOrBuilderList(); + + /** + * + * + *
+   * The requested spokes.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke spokes = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokesOrBuilder(int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequest.java new file mode 100644 index 000000000000..c6667a6feb5d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequest.java @@ -0,0 +1,1288 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for requesting list of Transports.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListTransportsRequest} + */ +@com.google.protobuf.Generated +public final class ListTransportsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListTransportsRequest) + ListTransportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTransportsRequest"); + } + + // Use ListTransportsRequest.newBuilder() to construct. + private ListTransportsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListTransportsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListTransportsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListTransportsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListTransportsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest other = + (com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest) 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.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest 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.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest 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.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of Transports.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListTransportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListTransportsRequest) + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.class, + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest build() { + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest result = + new com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListTransportsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListTransportsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListTransportsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListTransportsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Parent value for ListTransportsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListTransportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListTransportsRequest) + private static final com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransportsRequest 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.networkconnectivity.v1beta.ListTransportsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequestOrBuilder.java new file mode 100644 index 000000000000..1eadfb809a89 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListTransportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListTransportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListTransportsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListTransportsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponse.java new file mode 100644 index 000000000000..061fe9998351 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponse.java @@ -0,0 +1,1426 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for response to listing Transports.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListTransportsResponse} + */ +@com.google.protobuf.Generated +public final class ListTransportsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ListTransportsResponse) + ListTransportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListTransportsResponse"); + } + + // Use ListTransportsResponse.newBuilder() to construct. + private ListTransportsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListTransportsResponse() { + transports_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.Builder.class); + } + + public static final int TRANSPORTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List transports_; + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + @java.lang.Override + public java.util.List getTransportsList() { + return transports_; + } + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + @java.lang.Override + public java.util.List + getTransportsOrBuilderList() { + return transports_; + } + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + @java.lang.Override + public int getTransportsCount() { + return transports_.size(); + } + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport getTransports(int index) { + return transports_.get(index); + } + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportsOrBuilder( + int index) { + return transports_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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 < transports_.size(); i++) { + output.writeMessage(1, transports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.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 < transports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, transports_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.ListTransportsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse other = + (com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse) obj; + + if (!getTransportsList().equals(other.getTransportsList())) 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 (getTransportsCount() > 0) { + hash = (37 * hash) + TRANSPORTS_FIELD_NUMBER; + hash = (53 * hash) + getTransportsList().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.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse 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.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse 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.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Transports.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ListTransportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ListTransportsResponse) + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.class, + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (transportsBuilder_ == null) { + transports_ = java.util.Collections.emptyList(); + } else { + transports_ = null; + transportsBuilder_.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.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse build() { + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse result = + new com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse result) { + if (transportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transports_ = java.util.Collections.unmodifiableList(transports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transports_ = transports_; + } else { + result.transports_ = transportsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse 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 mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + .getDefaultInstance()) return this; + if (transportsBuilder_ == null) { + if (!other.transports_.isEmpty()) { + if (transports_.isEmpty()) { + transports_ = other.transports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransportsIsMutable(); + transports_.addAll(other.transports_); + } + onChanged(); + } + } else { + if (!other.transports_.isEmpty()) { + if (transportsBuilder_.isEmpty()) { + transportsBuilder_.dispose(); + transportsBuilder_ = null; + transports_ = other.transports_; + bitField0_ = (bitField0_ & ~0x00000001); + transportsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetTransportsFieldBuilder() + : null; + } else { + transportsBuilder_.addAllMessages(other.transports_); + } + } + } + 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.networkconnectivity.v1beta.Transport m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Transport.parser(), + extensionRegistry); + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + transports_.add(m); + } else { + transportsBuilder_.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 transports_ = + java.util.Collections.emptyList(); + + private void ensureTransportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transports_ = + new java.util.ArrayList( + transports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + transportsBuilder_; + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public java.util.List + getTransportsList() { + if (transportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transports_); + } else { + return transportsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public int getTransportsCount() { + if (transportsBuilder_ == null) { + return transports_.size(); + } else { + return transportsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Transport getTransports(int index) { + if (transportsBuilder_ == null) { + return transports_.get(index); + } else { + return transportsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder setTransports( + int index, com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransportsIsMutable(); + transports_.set(index, value); + onChanged(); + } else { + transportsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder setTransports( + int index, com.google.cloud.networkconnectivity.v1beta.Transport.Builder builderForValue) { + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + transports_.set(index, builderForValue.build()); + onChanged(); + } else { + transportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder addTransports(com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransportsIsMutable(); + transports_.add(value); + onChanged(); + } else { + transportsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder addTransports( + int index, com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransportsIsMutable(); + transports_.add(index, value); + onChanged(); + } else { + transportsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder addTransports( + com.google.cloud.networkconnectivity.v1beta.Transport.Builder builderForValue) { + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + transports_.add(builderForValue.build()); + onChanged(); + } else { + transportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder addTransports( + int index, com.google.cloud.networkconnectivity.v1beta.Transport.Builder builderForValue) { + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + transports_.add(index, builderForValue.build()); + onChanged(); + } else { + transportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder addAllTransports( + java.lang.Iterable + values) { + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transports_); + onChanged(); + } else { + transportsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder clearTransports() { + if (transportsBuilder_ == null) { + transports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transportsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public Builder removeTransports(int index) { + if (transportsBuilder_ == null) { + ensureTransportsIsMutable(); + transports_.remove(index); + onChanged(); + } else { + transportsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Transport.Builder getTransportsBuilder( + int index) { + return internalGetTransportsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportsOrBuilder( + int index) { + if (transportsBuilder_ == null) { + return transports_.get(index); + } else { + return transportsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public java.util.List + getTransportsOrBuilderList() { + if (transportsBuilder_ != null) { + return transportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transports_); + } + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Transport.Builder addTransportsBuilder() { + return internalGetTransportsFieldBuilder() + .addBuilder(com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Transport.Builder addTransportsBuilder( + int index) { + return internalGetTransportsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Transport.
+     * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + public java.util.List + getTransportsBuilderList() { + return internalGetTransportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + internalGetTransportsFieldBuilder() { + if (transportsBuilder_ == null) { + transportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder>( + transports_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + transports_ = null; + } + return transportsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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); + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unordered list. Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ListTransportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ListTransportsResponse) + private static final com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransportsResponse 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.networkconnectivity.v1beta.ListTransportsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponseOrBuilder.java new file mode 100644 index 000000000000..62aadc2e5b76 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ListTransportsResponseOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ListTransportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ListTransportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + java.util.List getTransportsList(); + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + com.google.cloud.networkconnectivity.v1beta.Transport getTransports(int index); + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + int getTransportsCount(); + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + java.util.List + getTransportsOrBuilderList(); + + /** + * + * + *
+   * The list of Transport.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.Transport transports = 1; + */ + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportsOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unordered list. Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * + * @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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationFeature.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationFeature.java new file mode 100644 index 000000000000..eb2f112194cf --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationFeature.java @@ -0,0 +1,216 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Supported features for a location
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.LocationFeature} + */ +@com.google.protobuf.Generated +public enum LocationFeature implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No publicly supported feature in this location
+   * 
+ * + * LOCATION_FEATURE_UNSPECIFIED = 0; + */ + LOCATION_FEATURE_UNSPECIFIED(0), + /** + * + * + *
+   * Site-to-cloud spokes are supported in this location
+   * 
+ * + * SITE_TO_CLOUD_SPOKES = 1; + */ + SITE_TO_CLOUD_SPOKES(1), + /** + * + * + *
+   * Site-to-site spokes are supported in this location
+   * 
+ * + * SITE_TO_SITE_SPOKES = 2; + */ + SITE_TO_SITE_SPOKES(2), + /** + * + * + *
+   * Gateway spokes are supported in this location.
+   * 
+ * + * GATEWAY_SPOKES = 3; + */ + GATEWAY_SPOKES(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LocationFeature"); + } + + /** + * + * + *
+   * No publicly supported feature in this location
+   * 
+ * + * LOCATION_FEATURE_UNSPECIFIED = 0; + */ + public static final int LOCATION_FEATURE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Site-to-cloud spokes are supported in this location
+   * 
+ * + * SITE_TO_CLOUD_SPOKES = 1; + */ + public static final int SITE_TO_CLOUD_SPOKES_VALUE = 1; + + /** + * + * + *
+   * Site-to-site spokes are supported in this location
+   * 
+ * + * SITE_TO_SITE_SPOKES = 2; + */ + public static final int SITE_TO_SITE_SPOKES_VALUE = 2; + + /** + * + * + *
+   * Gateway spokes are supported in this location.
+   * 
+ * + * GATEWAY_SPOKES = 3; + */ + public static final int GATEWAY_SPOKES_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 LocationFeature 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 LocationFeature forNumber(int value) { + switch (value) { + case 0: + return LOCATION_FEATURE_UNSPECIFIED; + case 1: + return SITE_TO_CLOUD_SPOKES; + case 2: + return SITE_TO_SITE_SPOKES; + case 3: + return GATEWAY_SPOKES; + 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 LocationFeature findValueByNumber(int number) { + return LocationFeature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor() + .getEnumTypes() + .get(5); + } + + private static final LocationFeature[] VALUES = values(); + + public static LocationFeature 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 LocationFeature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.LocationFeature) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadata.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadata.java new file mode 100644 index 000000000000..189d9d249fb7 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadata.java @@ -0,0 +1,848 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Metadata about locations
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LocationMetadata} + */ +@com.google.protobuf.Generated +public final class LocationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.LocationMetadata) + LocationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LocationMetadata"); + } + + // Use LocationMetadata.newBuilder() to construct. + private LocationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LocationMetadata() { + locationFeatures_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LocationMetadata.class, + com.google.cloud.networkconnectivity.v1beta.LocationMetadata.Builder.class); + } + + public static final int LOCATION_FEATURES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList locationFeatures_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkconnectivity.v1beta.LocationFeature> + locationFeatures_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkconnectivity.v1beta.LocationFeature>() { + public com.google.cloud.networkconnectivity.v1beta.LocationFeature convert(int from) { + com.google.cloud.networkconnectivity.v1beta.LocationFeature result = + com.google.cloud.networkconnectivity.v1beta.LocationFeature.forNumber(from); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.LocationFeature.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the locationFeatures. + */ + @java.lang.Override + public java.util.List + getLocationFeaturesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkconnectivity.v1beta.LocationFeature>( + locationFeatures_, locationFeatures_converter_); + } + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return The count of locationFeatures. + */ + @java.lang.Override + public int getLocationFeaturesCount() { + return locationFeatures_.size(); + } + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the element to return. + * @return The locationFeatures at the given index. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LocationFeature getLocationFeatures( + int index) { + return locationFeatures_converter_.convert(locationFeatures_.getInt(index)); + } + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the enum numeric values on the wire for locationFeatures. + */ + @java.lang.Override + public java.util.List getLocationFeaturesValueList() { + return locationFeatures_; + } + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of locationFeatures at the given index. + */ + @java.lang.Override + public int getLocationFeaturesValue(int index) { + return locationFeatures_.getInt(index); + } + + private int locationFeaturesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getLocationFeaturesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(locationFeaturesMemoizedSerializedSize); + } + for (int i = 0; i < locationFeatures_.size(); i++) { + output.writeEnumNoTag(locationFeatures_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < locationFeatures_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(locationFeatures_.getInt(i)); + } + size += dataSize; + if (!getLocationFeaturesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + locationFeaturesMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.LocationMetadata)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.LocationMetadata other = + (com.google.cloud.networkconnectivity.v1beta.LocationMetadata) obj; + + if (!locationFeatures_.equals(other.locationFeatures_)) 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 (getLocationFeaturesCount() > 0) { + hash = (37 * hash) + LOCATION_FEATURES_FIELD_NUMBER; + hash = (53 * hash) + locationFeatures_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata 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.networkconnectivity.v1beta.LocationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata 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.networkconnectivity.v1beta.LocationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.LocationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Metadata about locations
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.LocationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.LocationMetadata) + com.google.cloud.networkconnectivity.v1beta.LocationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.LocationMetadata.class, + com.google.cloud.networkconnectivity.v1beta.LocationMetadata.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.LocationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + locationFeatures_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_LocationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LocationMetadata + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.LocationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LocationMetadata build() { + com.google.cloud.networkconnectivity.v1beta.LocationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LocationMetadata buildPartial() { + com.google.cloud.networkconnectivity.v1beta.LocationMetadata result = + new com.google.cloud.networkconnectivity.v1beta.LocationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.LocationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + locationFeatures_.makeImmutable(); + result.locationFeatures_ = locationFeatures_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.LocationMetadata) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.LocationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.LocationMetadata other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.LocationMetadata.getDefaultInstance()) + return this; + if (!other.locationFeatures_.isEmpty()) { + if (locationFeatures_.isEmpty()) { + locationFeatures_ = other.locationFeatures_; + locationFeatures_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureLocationFeaturesIsMutable(); + locationFeatures_.addAll(other.locationFeatures_); + } + 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: + { + int tmpRaw = input.readEnum(); + ensureLocationFeaturesIsMutable(); + locationFeatures_.addInt(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLocationFeaturesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + locationFeatures_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.IntList locationFeatures_ = emptyIntList(); + + private void ensureLocationFeaturesIsMutable() { + if (!locationFeatures_.isModifiable()) { + locationFeatures_ = makeMutableCopy(locationFeatures_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the locationFeatures. + */ + public java.util.List + getLocationFeaturesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkconnectivity.v1beta.LocationFeature>( + locationFeatures_, locationFeatures_converter_); + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return The count of locationFeatures. + */ + public int getLocationFeaturesCount() { + return locationFeatures_.size(); + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the element to return. + * @return The locationFeatures at the given index. + */ + public com.google.cloud.networkconnectivity.v1beta.LocationFeature getLocationFeatures( + int index) { + return locationFeatures_converter_.convert(locationFeatures_.getInt(index)); + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index to set the value at. + * @param value The locationFeatures to set. + * @return This builder for chaining. + */ + public Builder setLocationFeatures( + int index, com.google.cloud.networkconnectivity.v1beta.LocationFeature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFeaturesIsMutable(); + locationFeatures_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param value The locationFeatures to add. + * @return This builder for chaining. + */ + public Builder addLocationFeatures( + com.google.cloud.networkconnectivity.v1beta.LocationFeature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationFeaturesIsMutable(); + locationFeatures_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param values The locationFeatures to add. + * @return This builder for chaining. + */ + public Builder addAllLocationFeatures( + java.lang.Iterable + values) { + ensureLocationFeaturesIsMutable(); + for (com.google.cloud.networkconnectivity.v1beta.LocationFeature value : values) { + locationFeatures_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearLocationFeatures() { + locationFeatures_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the enum numeric values on the wire for locationFeatures. + */ + public java.util.List getLocationFeaturesValueList() { + locationFeatures_.makeImmutable(); + return locationFeatures_; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of locationFeatures at the given index. + */ + public int getLocationFeaturesValue(int index) { + return locationFeatures_.getInt(index); + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for locationFeatures to set. + * @return This builder for chaining. + */ + public Builder setLocationFeaturesValue(int index, int value) { + ensureLocationFeaturesIsMutable(); + locationFeatures_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param value The enum numeric value on the wire for locationFeatures to add. + * @return This builder for chaining. + */ + public Builder addLocationFeaturesValue(int value) { + ensureLocationFeaturesIsMutable(); + locationFeatures_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * List of supported features
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param values The enum numeric values on the wire for locationFeatures to add. + * @return This builder for chaining. + */ + public Builder addAllLocationFeaturesValue(java.lang.Iterable values) { + ensureLocationFeaturesIsMutable(); + for (int value : values) { + locationFeatures_.addInt(value); + } + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.LocationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.LocationMetadata) + private static final com.google.cloud.networkconnectivity.v1beta.LocationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.LocationMetadata(); + } + + public static com.google.cloud.networkconnectivity.v1beta.LocationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LocationMetadata 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.networkconnectivity.v1beta.LocationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadataOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadataOrBuilder.java new file mode 100644 index 000000000000..26ce219e7948 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationMetadataOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface LocationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.LocationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the locationFeatures. + */ + java.util.List + getLocationFeaturesList(); + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return The count of locationFeatures. + */ + int getLocationFeaturesCount(); + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the element to return. + * @return The locationFeatures at the given index. + */ + com.google.cloud.networkconnectivity.v1beta.LocationFeature getLocationFeatures(int index); + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @return A list containing the enum numeric values on the wire for locationFeatures. + */ + java.util.List getLocationFeaturesValueList(); + + /** + * + * + *
+   * List of supported features
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.LocationFeature location_features = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of locationFeatures at the given index. + */ + int getLocationFeaturesValue(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationName.java new file mode 100644 index 000000000000..7949833587db --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/LocationName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfig.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfig.java new file mode 100644 index 000000000000..fd202dff3b87 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfig.java @@ -0,0 +1,3150 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The `MulticloudDataTransferConfig` resource. It lists the services that you
+ * configure for Data Transfer Essentials billing and metering.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig} + */ +@com.google.protobuf.Generated +public final class MulticloudDataTransferConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) + MulticloudDataTransferConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MulticloudDataTransferConfig"); + } + + // Use MulticloudDataTransferConfig.newBuilder() to construct. + private MulticloudDataTransferConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MulticloudDataTransferConfig() { + name_ = ""; + etag_ = ""; + description_ = ""; + uid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 9: + return internalGetServices(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.class, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATIONS_COUNT_FIELD_NUMBER = 7; + private int destinationsCount_ = 0; + + /** + * + * + *
+   * Output only. The number of `Destination` resources configured for the
+   * `MulticloudDataTransferConfig` resource.
+   * 
+ * + * int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationsCount. + */ + @java.lang.Override + public int getDestinationsCount() { + return destinationsCount_; + } + + public static final int DESTINATIONS_ACTIVE_COUNT_FIELD_NUMBER = 8; + private int destinationsActiveCount_ = 0; + + /** + * + * + *
+   * Output only. The number of `Destination` resources in use with the
+   * `MulticloudDataTransferConfig` resource.
+   * 
+ * + * int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationsActiveCount. + */ + @java.lang.Override + public int getDestinationsActiveCount() { + return destinationsActiveCount_; + } + + public static final int SERVICES_FIELD_NUMBER = 9; + + private static final class ServicesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_ServicesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.networkconnectivity.v1beta.StateTimeline + .getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + services_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + internalGetServices() { + if (services_ == null) { + return com.google.protobuf.MapField.emptyMapField(ServicesDefaultEntryHolder.defaultEntry); + } + return services_; + } + + public int getServicesCount() { + return internalGetServices().getMap().size(); + } + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetServices().getMap().containsKey(key); + } + + /** Use {@link #getServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getServices() { + return getServicesMap(); + } + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getServicesMap() { + return internalGetServices().getMap(); + } + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.networkconnectivity.v1beta.StateTimeline + getServicesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetServices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline getServicesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetServices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int UID_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the
+   * `MulticloudDataTransferConfig` resource. This value is unique across all
+   * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+   * another with the same name is created, the new resource is assigned a
+   * different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the
+   * `MulticloudDataTransferConfig` resource. This value is unique across all
+   * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+   * another with the same name is created, the new resource is assigned a
+   * different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (destinationsCount_ != 0) { + output.writeInt32(7, destinationsCount_); + } + if (destinationsActiveCount_ != 0) { + output.writeInt32(8, destinationsActiveCount_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetServices(), ServicesDefaultEntryHolder.defaultEntry, 9); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, uid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, etag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (destinationsCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, destinationsCount_); + } + if (destinationsActiveCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, destinationsActiveCount_); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + entry : internalGetServices().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + services__ = + ServicesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, services__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, uid_); + } + 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.networkconnectivity.v1beta.MulticloudDataTransferConfig)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig other = + (com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) 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 (!getEtag().equals(other.getEtag())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getDestinationsCount() != other.getDestinationsCount()) return false; + if (getDestinationsActiveCount() != other.getDestinationsActiveCount()) return false; + if (!internalGetServices().equals(other.internalGetServices())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DESTINATIONS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationsCount(); + hash = (37 * hash) + DESTINATIONS_ACTIVE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDestinationsActiveCount(); + if (!internalGetServices().getMap().isEmpty()) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + internalGetServices().hashCode(); + } + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig 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.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig 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.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The `MulticloudDataTransferConfig` resource. It lists the services that you
+   * configure for Data Transfer Essentials billing and metering.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + case 9: + return internalGetServices(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + case 9: + return internalGetMutableServices(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.class, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + etag_ = ""; + description_ = ""; + destinationsCount_ = 0; + destinationsActiveCount_ = 0; + internalGetMutableServices().clear(); + uid_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig build() { + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig buildPartial() { + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig result = + new com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.destinationsCount_ = destinationsCount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.destinationsActiveCount_ = destinationsActiveCount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.services_ = internalGetServices().build(ServicesDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.uid_ = uid_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getDestinationsCount() != 0) { + setDestinationsCount(other.getDestinationsCount()); + } + if (other.getDestinationsActiveCount() != 0) { + setDestinationsActiveCount(other.getDestinationsActiveCount()); + } + internalGetMutableServices().mergeFrom(other.internalGetServices()); + bitField0_ |= 0x00000100; + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + destinationsCount_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + destinationsActiveCount_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + services__ = + input.readMessage( + ServicesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableServices() + .ensureBuilderMap() + .put(services__.getKey(), services__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+     * Format:
+     * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource was
+     * created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Time when the `MulticloudDataTransferConfig` resource was
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. User-defined labels.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The etag is computed by the server, and might be sent with update and
+     * delete requests so that the client has an up-to-date value before
+     * proceeding.
+     * 
+ * + * string etag = 5; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A description of this resource.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int destinationsCount_; + + /** + * + * + *
+     * Output only. The number of `Destination` resources configured for the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationsCount. + */ + @java.lang.Override + public int getDestinationsCount() { + return destinationsCount_; + } + + /** + * + * + *
+     * Output only. The number of `Destination` resources configured for the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The destinationsCount to set. + * @return This builder for chaining. + */ + public Builder setDestinationsCount(int value) { + + destinationsCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of `Destination` resources configured for the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationsCount() { + bitField0_ = (bitField0_ & ~0x00000040); + destinationsCount_ = 0; + onChanged(); + return this; + } + + private int destinationsActiveCount_; + + /** + * + * + *
+     * Output only. The number of `Destination` resources in use with the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The destinationsActiveCount. + */ + @java.lang.Override + public int getDestinationsActiveCount() { + return destinationsActiveCount_; + } + + /** + * + * + *
+     * Output only. The number of `Destination` resources in use with the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The destinationsActiveCount to set. + * @return This builder for chaining. + */ + public Builder setDestinationsActiveCount(int value) { + + destinationsActiveCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The number of `Destination` resources in use with the
+     * `MulticloudDataTransferConfig` resource.
+     * 
+ * + * int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDestinationsActiveCount() { + bitField0_ = (bitField0_ & ~0x00000080); + destinationsActiveCount_ = 0; + onChanged(); + return this; + } + + private static final class ServicesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline> { + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline build( + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder val) { + if (val instanceof com.google.cloud.networkconnectivity.v1beta.StateTimeline) { + return (com.google.cloud.networkconnectivity.v1beta.StateTimeline) val; + } + return ((com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + defaultEntry() { + return ServicesDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ServicesConverter servicesConverter = new ServicesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder> + services_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder> + internalGetServices() { + if (services_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(servicesConverter); + } + return services_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder> + internalGetMutableServices() { + if (services_ == null) { + services_ = new com.google.protobuf.MapFieldBuilder<>(servicesConverter); + } + bitField0_ |= 0x00000100; + onChanged(); + return services_; + } + + public int getServicesCount() { + return internalGetServices().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetServices().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + getServices() { + return getServicesMap(); + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + getServicesMap() { + return internalGetServices().getImmutableMap(); + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.networkconnectivity.v1beta.StateTimeline + getServicesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder> + map = internalGetMutableServices().ensureBuilderMap(); + return map.containsKey(key) ? servicesConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline getServicesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder> + map = internalGetMutableServices().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return servicesConverter.build(map.get(key)); + } + + public Builder clearServices() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableServices().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableServices().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + getMutableServices() { + bitField0_ |= 0x00000100; + return internalGetMutableServices().ensureMessageMap(); + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putServices( + java.lang.String key, com.google.cloud.networkconnectivity.v1beta.StateTimeline value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableServices().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllServices( + java.util.Map + values) { + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimeline> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableServices().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Optional. Maps services to their current or planned states. Service names
+     * are keys, and the associated values describe the state of the service. If a
+     * state change is expected, the value is either `ADDING` or `DELETING`,
+     * depending on the actions taken.
+     *
+     * Sample output:
+     * "services": {
+     * "big-query": {
+     * "states": [
+     * {
+     * "effectiveTime": "2024-12-12T08:00:00Z"
+     * "state": "ADDING",
+     * },
+     * ]
+     * },
+     * "cloud-storage": {
+     * "states": [
+     * {
+     * "state": "ACTIVE",
+     * }
+     * ]
+     * }
+     * }
+     * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder + putServicesBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder> + builderMap = internalGetMutableServices().ensureBuilderMap(); + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.networkconnectivity.v1beta.StateTimeline.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.networkconnectivity.v1beta.StateTimeline) { + entry = ((com.google.cloud.networkconnectivity.v1beta.StateTimeline) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder) entry; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the
+     * `MulticloudDataTransferConfig` resource. This value is unique across all
+     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+     * another with the same name is created, the new resource is assigned a
+     * different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the
+     * `MulticloudDataTransferConfig` resource. This value is unique across all
+     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+     * another with the same name is created, the new resource is assigned a
+     * different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the
+     * `MulticloudDataTransferConfig` resource. This value is unique across all
+     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+     * another with the same name is created, the new resource is assigned a
+     * different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the
+     * `MulticloudDataTransferConfig` resource. This value is unique across all
+     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+     * another with the same name is created, the new resource is assigned a
+     * different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated unique ID for the
+     * `MulticloudDataTransferConfig` resource. This value is unique across all
+     * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+     * another with the same name is created, the new resource is assigned a
+     * different and unique ID.
+     * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) + private static final com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig(); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MulticloudDataTransferConfig 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.networkconnectivity.v1beta.MulticloudDataTransferConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigName.java new file mode 100644 index 000000000000..eceee78cdcae --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigName.java @@ -0,0 +1,243 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 MulticloudDataTransferConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String multicloudDataTransferConfig; + + @Deprecated + protected MulticloudDataTransferConfigName() { + project = null; + location = null; + multicloudDataTransferConfig = null; + } + + private MulticloudDataTransferConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + multicloudDataTransferConfig = + Preconditions.checkNotNull(builder.getMulticloudDataTransferConfig()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MulticloudDataTransferConfigName of( + String project, String location, String multicloudDataTransferConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .build(); + } + + public static String format( + String project, String location, String multicloudDataTransferConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferConfig(multicloudDataTransferConfig) + .build() + .toString(); + } + + public static MulticloudDataTransferConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG.validatedMatch( + formattedString, + "MulticloudDataTransferConfigName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("multicloud_data_transfer_config")); + } + + 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 (MulticloudDataTransferConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG.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 (multicloudDataTransferConfig != null) { + fieldMapBuilder.put("multicloud_data_transfer_config", multicloudDataTransferConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_CONFIG.instantiate( + "project", + project, + "location", + location, + "multicloud_data_transfer_config", + multicloudDataTransferConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + MulticloudDataTransferConfigName that = ((MulticloudDataTransferConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.multicloudDataTransferConfig, that.multicloudDataTransferConfig); + } + 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(multicloudDataTransferConfig); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}. + */ + public static class Builder { + private String project; + private String location; + private String multicloudDataTransferConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setMulticloudDataTransferConfig(String multicloudDataTransferConfig) { + this.multicloudDataTransferConfig = multicloudDataTransferConfig; + return this; + } + + private Builder(MulticloudDataTransferConfigName multicloudDataTransferConfigName) { + this.project = multicloudDataTransferConfigName.project; + this.location = multicloudDataTransferConfigName.location; + this.multicloudDataTransferConfig = + multicloudDataTransferConfigName.multicloudDataTransferConfig; + } + + public MulticloudDataTransferConfigName build() { + return new MulticloudDataTransferConfigName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigOrBuilder.java new file mode 100644 index 000000000000..632b4368d01c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferConfigOrBuilder.java @@ -0,0 +1,515 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface MulticloudDataTransferConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the `MulticloudDataTransferConfig` resource.
+   * Format:
+   * `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource 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 `MulticloudDataTransferConfig` resource was
+   * created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the `MulticloudDataTransferConfig` resource was
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User-defined labels.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * The etag is computed by the server, and might be sent with update and
+   * delete requests so that the client has an up-to-date value before
+   * proceeding.
+   * 
+ * + * string etag = 5; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A description of this resource.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The number of `Destination` resources configured for the
+   * `MulticloudDataTransferConfig` resource.
+   * 
+ * + * int32 destinations_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationsCount. + */ + int getDestinationsCount(); + + /** + * + * + *
+   * Output only. The number of `Destination` resources in use with the
+   * `MulticloudDataTransferConfig` resource.
+   * 
+ * + * int32 destinations_active_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationsActiveCount. + */ + int getDestinationsActiveCount(); + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getServicesCount(); + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsServices(java.lang.String key); + + /** Use {@link #getServicesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getServices(); + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getServicesMap(); + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline getServicesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline defaultValue); + + /** + * + * + *
+   * Optional. Maps services to their current or planned states. Service names
+   * are keys, and the associated values describe the state of the service. If a
+   * state change is expected, the value is either `ADDING` or `DELETING`,
+   * depending on the actions taken.
+   *
+   * Sample output:
+   * "services": {
+   * "big-query": {
+   * "states": [
+   * {
+   * "effectiveTime": "2024-12-12T08:00:00Z"
+   * "state": "ADDING",
+   * },
+   * ]
+   * },
+   * "cloud-storage": {
+   * "states": [
+   * {
+   * "state": "ACTIVE",
+   * }
+   * ]
+   * }
+   * }
+   * 
+ * + * + * map<string, .google.cloud.networkconnectivity.v1beta.StateTimeline> services = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline getServicesOrThrow( + java.lang.String key); + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the
+   * `MulticloudDataTransferConfig` resource. This value is unique across all
+   * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+   * another with the same name is created, the new resource is assigned a
+   * different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The Google-generated unique ID for the
+   * `MulticloudDataTransferConfig` resource. This value is unique across all
+   * `MulticloudDataTransferConfig` resources. If a resource is deleted and
+   * another with the same name is created, the new resource is assigned a
+   * different and unique ID.
+   * 
+ * + * + * string uid = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... } + * + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedService.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedService.java new file mode 100644 index 000000000000..0b3a8638e47b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedService.java @@ -0,0 +1,1244 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A service in your project in a region that is eligible for Data Transfer
+ * Essentials configuration.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService} + */ +@com.google.protobuf.Generated +public final class MulticloudDataTransferSupportedService + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + MulticloudDataTransferSupportedServiceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MulticloudDataTransferSupportedService"); + } + + // Use MulticloudDataTransferSupportedService.newBuilder() to construct. + private MulticloudDataTransferSupportedService( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MulticloudDataTransferSupportedService() { + name_ = ""; + serviceConfigs_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .class, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the service.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the service.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_CONFIGS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List serviceConfigs_; + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServiceConfigsList() { + return serviceConfigs_; + } + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder> + getServiceConfigsOrBuilderList() { + return serviceConfigs_; + } + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getServiceConfigsCount() { + return serviceConfigs_.size(); + } + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig getServiceConfigs(int index) { + return serviceConfigs_.get(index); + } + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder + getServiceConfigsOrBuilder(int index) { + return serviceConfigs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + for (int i = 0; i < serviceConfigs_.size(); i++) { + output.writeMessage(2, serviceConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (int i = 0; i < serviceConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, serviceConfigs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService other = + (com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) obj; + + if (!getName().equals(other.getName())) return false; + if (!getServiceConfigsList().equals(other.getServiceConfigsList())) 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 (getServiceConfigsCount() > 0) { + hash = (37 * hash) + SERVICE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + 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.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + 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.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A service in your project in a region that is eligible for Data Transfer
+   * Essentials configuration.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .class, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + if (serviceConfigsBuilder_ == null) { + serviceConfigs_ = java.util.Collections.emptyList(); + } else { + serviceConfigs_ = null; + serviceConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_MulticloudDataTransferSupportedService_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + build() { + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService result = + new com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService result) { + if (serviceConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + serviceConfigs_ = java.util.Collections.unmodifiableList(serviceConfigs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.serviceConfigs_ = serviceConfigs_; + } else { + result.serviceConfigs_ = serviceConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (serviceConfigsBuilder_ == null) { + if (!other.serviceConfigs_.isEmpty()) { + if (serviceConfigs_.isEmpty()) { + serviceConfigs_ = other.serviceConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureServiceConfigsIsMutable(); + serviceConfigs_.addAll(other.serviceConfigs_); + } + onChanged(); + } + } else { + if (!other.serviceConfigs_.isEmpty()) { + if (serviceConfigsBuilder_.isEmpty()) { + serviceConfigsBuilder_.dispose(); + serviceConfigsBuilder_ = null; + serviceConfigs_ = other.serviceConfigs_; + bitField0_ = (bitField0_ & ~0x00000002); + serviceConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetServiceConfigsFieldBuilder() + : null; + } else { + serviceConfigsBuilder_.addAllMessages(other.serviceConfigs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.networkconnectivity.v1beta.ServiceConfig m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.parser(), + extensionRegistry); + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(m); + } else { + serviceConfigsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the service.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the service.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the service.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the service.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the service.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + serviceConfigs_ = java.util.Collections.emptyList(); + + private void ensureServiceConfigsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + serviceConfigs_ = + new java.util.ArrayList( + serviceConfigs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.ServiceConfig, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder> + serviceConfigsBuilder_; + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServiceConfigsList() { + if (serviceConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceConfigs_); + } else { + return serviceConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getServiceConfigsCount() { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.size(); + } else { + return serviceConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig getServiceConfigs(int index) { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.get(index); + } else { + return serviceConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceConfigs( + int index, com.google.cloud.networkconnectivity.v1beta.ServiceConfig value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.set(index, value); + onChanged(); + } else { + serviceConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServiceConfigs( + int index, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceConfigs( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(value); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceConfigs( + int index, com.google.cloud.networkconnectivity.v1beta.ServiceConfig value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(index, value); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceConfigs( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServiceConfigs( + int index, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllServiceConfigs( + java.lang.Iterable + values) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceConfigs_); + onChanged(); + } else { + serviceConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServiceConfigs() { + if (serviceConfigsBuilder_ == null) { + serviceConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + serviceConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeServiceConfigs(int index) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.remove(index); + onChanged(); + } else { + serviceConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder + getServiceConfigsBuilder(int index) { + return internalGetServiceConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder + getServiceConfigsOrBuilder(int index) { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.get(index); + } else { + return serviceConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder> + getServiceConfigsOrBuilderList() { + if (serviceConfigsBuilder_ != null) { + return serviceConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceConfigs_); + } + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder + addServiceConfigsBuilder() { + return internalGetServiceConfigsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder + addServiceConfigsBuilder(int index) { + return internalGetServiceConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The network service tier or regional endpoint supported for
+     * the service.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServiceConfigsBuilderList() { + return internalGetServiceConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.ServiceConfig, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder> + internalGetServiceConfigsFieldBuilder() { + if (serviceConfigsBuilder_ == null) { + serviceConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.ServiceConfig, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder>( + serviceConfigs_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + serviceConfigs_ = null; + } + return serviceConfigsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + private static final com.google.cloud.networkconnectivity.v1beta + .MulticloudDataTransferSupportedService + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService(); + } + + public static com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MulticloudDataTransferSupportedService 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.networkconnectivity.v1beta.MulticloudDataTransferSupportedService + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceName.java new file mode 100644 index 000000000000..c2ea47ec6e81 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceName.java @@ -0,0 +1,253 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 MulticloudDataTransferSupportedServiceName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/multicloudDataTransferSupportedServices/{multicloud_data_transfer_supported_service}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String multicloudDataTransferSupportedService; + + @Deprecated + protected MulticloudDataTransferSupportedServiceName() { + project = null; + location = null; + multicloudDataTransferSupportedService = null; + } + + private MulticloudDataTransferSupportedServiceName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + multicloudDataTransferSupportedService = + Preconditions.checkNotNull(builder.getMulticloudDataTransferSupportedService()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferSupportedService() { + return multicloudDataTransferSupportedService; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MulticloudDataTransferSupportedServiceName of( + String project, String location, String multicloudDataTransferSupportedService) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferSupportedService(multicloudDataTransferSupportedService) + .build(); + } + + public static String format( + String project, String location, String multicloudDataTransferSupportedService) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setMulticloudDataTransferSupportedService(multicloudDataTransferSupportedService) + .build() + .toString(); + } + + public static MulticloudDataTransferSupportedServiceName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE.validatedMatch( + formattedString, + "MulticloudDataTransferSupportedServiceName.parse: formattedString not in valid" + + " format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("multicloud_data_transfer_supported_service")); + } + + 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 (MulticloudDataTransferSupportedServiceName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE.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 (multicloudDataTransferSupportedService != null) { + fieldMapBuilder.put( + "multicloud_data_transfer_supported_service", + multicloudDataTransferSupportedService); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE.instantiate( + "project", + project, + "location", + location, + "multicloud_data_transfer_supported_service", + multicloudDataTransferSupportedService); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + MulticloudDataTransferSupportedServiceName that = + ((MulticloudDataTransferSupportedServiceName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals( + this.multicloudDataTransferSupportedService, + that.multicloudDataTransferSupportedService); + } + 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(multicloudDataTransferSupportedService); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/multicloudDataTransferSupportedServices/{multicloud_data_transfer_supported_service}. + */ + public static class Builder { + private String project; + private String location; + private String multicloudDataTransferSupportedService; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getMulticloudDataTransferSupportedService() { + return multicloudDataTransferSupportedService; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setMulticloudDataTransferSupportedService( + String multicloudDataTransferSupportedService) { + this.multicloudDataTransferSupportedService = multicloudDataTransferSupportedService; + return this; + } + + private Builder( + MulticloudDataTransferSupportedServiceName multicloudDataTransferSupportedServiceName) { + this.project = multicloudDataTransferSupportedServiceName.project; + this.location = multicloudDataTransferSupportedServiceName.location; + this.multicloudDataTransferSupportedService = + multicloudDataTransferSupportedServiceName.multicloudDataTransferSupportedService; + } + + public MulticloudDataTransferSupportedServiceName build() { + return new MulticloudDataTransferSupportedServiceName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceOrBuilder.java new file mode 100644 index 000000000000..c8568348b52d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/MulticloudDataTransferSupportedServiceOrBuilder.java @@ -0,0 +1,126 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface MulticloudDataTransferSupportedServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the service.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the service.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getServiceConfigsList(); + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.ServiceConfig getServiceConfigs(int index); + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getServiceConfigsCount(); + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServiceConfigsOrBuilderList(); + + /** + * + * + *
+   * Output only. The network service tier or regional endpoint supported for
+   * the service.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.ServiceConfig service_configs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder getServiceConfigsOrBuilder( + int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachment.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachment.java new file mode 100644 index 000000000000..255595c00d02 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachment.java @@ -0,0 +1,913 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A route next hop that leads to an interconnect attachment resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment} + */ +@com.google.protobuf.Generated +public final class NextHopInterconnectAttachment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) + NextHopInterconnectAttachmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NextHopInterconnectAttachment"); + } + + // Use NextHopInterconnectAttachment.newBuilder() to construct. + private NextHopInterconnectAttachment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NextHopInterconnectAttachment() { + uri_ = ""; + vpcNetwork_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.class, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the interconnect attachment resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the interconnect attachment resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * The VPC network where this interconnect attachment is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * The VPC network where this interconnect attachment is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 3; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this
+   * interconnect attachment resource. Data transfer is available only in
+   * [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(3, siteToSiteDataTransfer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, siteToSiteDataTransfer_); + } + 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.networkconnectivity.v1beta.NextHopInterconnectAttachment)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment other = + (com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment 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.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment 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.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A route next hop that leads to an interconnect attachment resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.class, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + vpcNetwork_ = ""; + siteToSiteDataTransfer_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopInterconnectAttachment_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment build() { + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment result = + new com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + siteToSiteDataTransfer_ = 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 uri_ = ""; + + /** + * + * + *
+     * The URI of the interconnect attachment resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the interconnect attachment resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the interconnect attachment resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the interconnect attachment resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the interconnect attachment resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * The VPC network where this interconnect attachment is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The VPC network where this interconnect attachment is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The VPC network where this interconnect attachment is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this interconnect attachment is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this interconnect attachment is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * interconnect attachment resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * interconnect attachment resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * interconnect attachment resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000004); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) + private static final com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment(); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopInterconnectAttachment 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.networkconnectivity.v1beta.NextHopInterconnectAttachment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachmentOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachmentOrBuilder.java new file mode 100644 index 000000000000..c401eda4df0d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopInterconnectAttachmentOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface NextHopInterconnectAttachmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the interconnect attachment resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the interconnect attachment resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The VPC network where this interconnect attachment is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * The VPC network where this interconnect attachment is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this
+   * interconnect attachment resource. Data transfer is available only in
+   * [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstance.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstance.java new file mode 100644 index 000000000000..5e89ca7774dd --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstance.java @@ -0,0 +1,914 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A route next hop that leads to a Router appliance instance.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance} + */ +@com.google.protobuf.Generated +public final class NextHopRouterApplianceInstance extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) + NextHopRouterApplianceInstanceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NextHopRouterApplianceInstance"); + } + + // Use NextHopRouterApplianceInstance.newBuilder() to construct. + private NextHopRouterApplianceInstance(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NextHopRouterApplianceInstance() { + uri_ = ""; + vpcNetwork_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.class, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder + .class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the Router appliance instance.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the Router appliance instance.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * The VPC network where this VM is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * The VPC network where this VM is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 3; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this Router
+   * appliance instance resource. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(3, siteToSiteDataTransfer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, siteToSiteDataTransfer_); + } + 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.networkconnectivity.v1beta.NextHopRouterApplianceInstance)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance other = + (com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + 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.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + 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.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A route next hop that leads to a Router appliance instance.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.class, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + vpcNetwork_ = ""; + siteToSiteDataTransfer_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopRouterApplianceInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance build() { + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance result = + new com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + siteToSiteDataTransfer_ = 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 uri_ = ""; + + /** + * + * + *
+     * The URI of the Router appliance instance.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the Router appliance instance.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the Router appliance instance.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the Router appliance instance.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the Router appliance instance.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * The VPC network where this VM is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The VPC network where this VM is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The VPC network where this VM is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this VM is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this VM is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this Router
+     * appliance instance resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this Router
+     * appliance instance resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this Router
+     * appliance instance resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000004); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) + private static final com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance(); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopRouterApplianceInstance 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.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstanceOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstanceOrBuilder.java new file mode 100644 index 000000000000..4f7ef2f4cd4c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopRouterApplianceInstanceOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface NextHopRouterApplianceInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the Router appliance instance.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the Router appliance instance.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The VPC network where this VM is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * The VPC network where this VM is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this Router
+   * appliance instance resource. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpoke.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpoke.java new file mode 100644 index 000000000000..a10bae7ceb9d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpoke.java @@ -0,0 +1,718 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A route next hop that leads to a spoke resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopSpoke} + */ +@com.google.protobuf.Generated +public final class NextHopSpoke extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.NextHopSpoke) + NextHopSpokeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NextHopSpoke"); + } + + // Use NextHopSpoke.newBuilder() to construct. + private NextHopSpoke(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NextHopSpoke() { + uri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.class, + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the spoke resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the spoke resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 2; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this
+   * spoke resource. Data transfer is available only in
+   * [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * Whether this route is accessible to other hybrid spokes with site-to-site
+   * data transfer enabled. If this is false, the route is only accessible to
+   * VPC spokes of the connected Hub.
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(2, siteToSiteDataTransfer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, siteToSiteDataTransfer_); + } + 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.networkconnectivity.v1beta.NextHopSpoke)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke other = + (com.google.cloud.networkconnectivity.v1beta.NextHopSpoke) obj; + + if (!getUri().equals(other.getUri())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke 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.networkconnectivity.v1beta.NextHopSpoke parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke 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.networkconnectivity.v1beta.NextHopSpoke parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A route next hop that leads to a spoke resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopSpoke} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.NextHopSpoke) + com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.class, + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + siteToSiteDataTransfer_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopSpoke_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke build() { + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke buildPartial() { + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke result = + new com.google.cloud.networkconnectivity.v1beta.NextHopSpoke(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.NextHopSpoke result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.NextHopSpoke) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.NextHopSpoke) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.NextHopSpoke other) { + if (other == com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + siteToSiteDataTransfer_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * The URI of the spoke resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the spoke resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the spoke resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the spoke resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the spoke resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * spoke resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * Whether this route is accessible to other hybrid spokes with site-to-site
+     * data transfer enabled. If this is false, the route is only accessible to
+     * VPC spokes of the connected Hub.
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * spoke resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * Whether this route is accessible to other hybrid spokes with site-to-site
+     * data transfer enabled. If this is false, the route is only accessible to
+     * VPC spokes of the connected Hub.
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this
+     * spoke resource. Data transfer is available only in
+     * [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * Whether this route is accessible to other hybrid spokes with site-to-site
+     * data transfer enabled. If this is false, the route is only accessible to
+     * VPC spokes of the connected Hub.
+     * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000002); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.NextHopSpoke) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.NextHopSpoke) + private static final com.google.cloud.networkconnectivity.v1beta.NextHopSpoke DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.NextHopSpoke(); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopSpoke getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopSpoke 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.networkconnectivity.v1beta.NextHopSpoke getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpokeOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpokeOrBuilder.java new file mode 100644 index 000000000000..e7c0ed3f0667 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopSpokeOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface NextHopSpokeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.NextHopSpoke) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the spoke resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the spoke resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this
+   * spoke resource. Data transfer is available only in
+   * [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * Whether this route is accessible to other hybrid spokes with site-to-site
+   * data transfer enabled. If this is false, the route is only accessible to
+   * VPC spokes of the connected Hub.
+   * 
+ * + * bool site_to_site_data_transfer = 2; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnel.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnel.java new file mode 100644 index 000000000000..61e4e70d2734 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnel.java @@ -0,0 +1,895 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A route next hop that leads to a VPN tunnel resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel} + */ +@com.google.protobuf.Generated +public final class NextHopVPNTunnel extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) + NextHopVPNTunnelOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NextHopVPNTunnel"); + } + + // Use NextHopVPNTunnel.newBuilder() to construct. + private NextHopVPNTunnel(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NextHopVPNTunnel() { + uri_ = ""; + vpcNetwork_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.class, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the VPN tunnel resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the VPN tunnel resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VPC_NETWORK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+   * The VPC network where this VPN tunnel is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + @java.lang.Override + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * The VPC network where this VPN tunnel is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER = 3; + private boolean siteToSiteDataTransfer_ = false; + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this VPN tunnel
+   * resource. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + output.writeBool(3, siteToSiteDataTransfer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vpcNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vpcNetwork_); + } + if (siteToSiteDataTransfer_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, siteToSiteDataTransfer_); + } + 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.networkconnectivity.v1beta.NextHopVPNTunnel)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel other = + (com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getVpcNetwork().equals(other.getVpcNetwork())) return false; + if (getSiteToSiteDataTransfer() != other.getSiteToSiteDataTransfer()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetwork().hashCode(); + hash = (37 * hash) + SITE_TO_SITE_DATA_TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSiteToSiteDataTransfer()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel 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.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel 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.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A route next hop that leads to a VPN tunnel resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.class, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + vpcNetwork_ = ""; + siteToSiteDataTransfer_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVPNTunnel_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel build() { + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel buildPartial() { + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel result = + new com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vpcNetwork_ = vpcNetwork_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.siteToSiteDataTransfer_ = siteToSiteDataTransfer_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVpcNetwork().isEmpty()) { + vpcNetwork_ = other.vpcNetwork_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSiteToSiteDataTransfer() != false) { + setSiteToSiteDataTransfer(other.getSiteToSiteDataTransfer()); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + vpcNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + siteToSiteDataTransfer_ = 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 uri_ = ""; + + /** + * + * + *
+     * The URI of the VPN tunnel resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the VPN tunnel resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the VPN tunnel resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPN tunnel resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPN tunnel resource.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vpcNetwork_ = ""; + + /** + * + * + *
+     * The VPC network where this VPN tunnel is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + public java.lang.String getVpcNetwork() { + java.lang.Object ref = vpcNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vpcNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The VPC network where this VPN tunnel is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + public com.google.protobuf.ByteString getVpcNetworkBytes() { + java.lang.Object ref = vpcNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + vpcNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The VPC network where this VPN tunnel is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this VPN tunnel is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVpcNetwork() { + vpcNetwork_ = getDefaultInstance().getVpcNetwork(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The VPC network where this VPN tunnel is located.
+     * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for vpcNetwork to set. + * @return This builder for chaining. + */ + public Builder setVpcNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + vpcNetwork_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean siteToSiteDataTransfer_; + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this VPN tunnel
+     * resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + @java.lang.Override + public boolean getSiteToSiteDataTransfer() { + return siteToSiteDataTransfer_; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this VPN tunnel
+     * resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @param value The siteToSiteDataTransfer to set. + * @return This builder for chaining. + */ + public Builder setSiteToSiteDataTransfer(boolean value) { + + siteToSiteDataTransfer_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Indicates whether site-to-site data transfer is allowed for this VPN tunnel
+     * resource. Data transfer is available only in [supported
+     * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+     * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return This builder for chaining. + */ + public Builder clearSiteToSiteDataTransfer() { + bitField0_ = (bitField0_ & ~0x00000004); + siteToSiteDataTransfer_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) + private static final com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel(); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopVPNTunnel 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.networkconnectivity.v1beta.NextHopVPNTunnel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnelOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnelOrBuilder.java new file mode 100644 index 000000000000..78f4db508111 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVPNTunnelOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface NextHopVPNTunnelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the VPN tunnel resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the VPN tunnel resource.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * The VPC network where this VPN tunnel is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The vpcNetwork. + */ + java.lang.String getVpcNetwork(); + + /** + * + * + *
+   * The VPC network where this VPN tunnel is located.
+   * 
+ * + * string vpc_network = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for vpcNetwork. + */ + com.google.protobuf.ByteString getVpcNetworkBytes(); + + /** + * + * + *
+   * Indicates whether site-to-site data transfer is allowed for this VPN tunnel
+   * resource. Data transfer is available only in [supported
+   * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
+   * 
+ * + * bool site_to_site_data_transfer = 3; + * + * @return The siteToSiteDataTransfer. + */ + boolean getSiteToSiteDataTransfer(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetwork.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetwork.java new file mode 100644 index 000000000000..db0a32692b1e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetwork.java @@ -0,0 +1,585 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork} */ +@com.google.protobuf.Generated +public final class NextHopVpcNetwork extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) + NextHopVpcNetworkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NextHopVpcNetwork"); + } + + // Use NextHopVpcNetwork.newBuilder() to construct. + private NextHopVpcNetwork(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NextHopVpcNetwork() { + uri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + 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.networkconnectivity.v1beta.NextHopVpcNetwork)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork other = + (com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) obj; + + if (!getUri().equals(other.getUri())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork 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.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork 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.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** Protobuf type {@code google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.class, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_NextHopVpcNetwork_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork build() { + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork buildPartial() { + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork result = + new com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + 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: + { + uri_ = 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 uri_ = ""; + + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPC network resource
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) + private static final com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork(); + } + + public static com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NextHopVpcNetwork 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.networkconnectivity.v1beta.NextHopVpcNetwork getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetworkOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetworkOrBuilder.java new file mode 100644 index 000000000000..02268260ae5b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/NextHopVpcNetworkOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface NextHopVpcNetworkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the VPC network resource
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadata.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadata.java new file mode 100644 index 000000000000..dbbc30f31435 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadata.java @@ -0,0 +1,1878 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Represents the metadata of the long-running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.OperationMetadata} + */ +@com.google.protobuf.Generated +public final class OperationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OperationMetadata"); + } + + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private OperationMetadata() { + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + apiVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.CommonProto + .internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.CommonProto + .internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.OperationMetadata.class, + com.google.cloud.networkconnectivity.v1beta.OperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TARGET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + @java.lang.Override + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object verb_ = ""; + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + @java.lang.Override + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_MESSAGE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + @java.lang.Override + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTED_CANCELLATION_FIELD_NUMBER = 6; + private boolean requestedCancellation_ = false; + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + public static final int API_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + @java.lang.Override + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, statusMessage_); + } + if (requestedCancellation_ != false) { + output.writeBool(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, apiVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(target_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, target_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(verb_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, verb_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(statusMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, statusMessage_); + } + if (requestedCancellation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requestedCancellation_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(apiVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, apiVersion_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.OperationMetadata other = + (com.google.cloud.networkconnectivity.v1beta.OperationMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getTarget().equals(other.getTarget())) return false; + if (!getVerb().equals(other.getVerb())) return false; + if (!getStatusMessage().equals(other.getStatusMessage())) return false; + if (getRequestedCancellation() != other.getRequestedCancellation()) return false; + if (!getApiVersion().equals(other.getApiVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + VERB_FIELD_NUMBER; + hash = (53 * hash) + getVerb().hashCode(); + hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getStatusMessage().hashCode(); + hash = (37 * hash) + REQUESTED_CANCELLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); + hash = (37 * hash) + API_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getApiVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.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.networkconnectivity.v1beta.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.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.networkconnectivity.v1beta.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.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.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Represents the metadata of the long-running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.OperationMetadata) + com.google.cloud.networkconnectivity.v1beta.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.CommonProto + .internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.CommonProto + .internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.OperationMetadata.class, + com.google.cloud.networkconnectivity.v1beta.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + target_ = ""; + verb_ = ""; + statusMessage_ = ""; + requestedCancellation_ = false; + apiVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.CommonProto + .internal_static_google_cloud_networkconnectivity_v1beta_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.OperationMetadata build() { + com.google.cloud.networkconnectivity.v1beta.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.OperationMetadata buildPartial() { + com.google.cloud.networkconnectivity.v1beta.OperationMetadata result = + new com.google.cloud.networkconnectivity.v1beta.OperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.OperationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.verb_ = verb_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.statusMessage_ = statusMessage_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.requestedCancellation_ = requestedCancellation_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.apiVersion_ = apiVersion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.OperationMetadata) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.OperationMetadata other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.OperationMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getVerb().isEmpty()) { + verb_ = other.verb_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getStatusMessage().isEmpty()) { + statusMessage_ = other.statusMessage_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getRequestedCancellation() != false) { + setRequestedCancellation(other.getRequestedCancellation()); + } + if (!other.getApiVersion().isEmpty()) { + apiVersion_ = other.apiVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + + /** + * + * + *
+     * Output only. The time the operation finished running.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.lang.Object target_ = ""; + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + public com.google.protobuf.ByteString getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTarget() { + target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined resource path for the target of the operation.
+     * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + target_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object verb_ = ""; + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + public java.lang.String getVerb() { + java.lang.Object ref = verb_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verb_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + public com.google.protobuf.ByteString getVerbBytes() { + java.lang.Object ref = verb_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + verb_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The verb to set. + * @return This builder for chaining. + */ + public Builder setVerb(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearVerb() { + verb_ = getDefaultInstance().getVerb(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the verb executed by the operation.
+     * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for verb to set. + * @return This builder for chaining. + */ + public Builder setVerbBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + verb_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object statusMessage_ = ""; + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + public java.lang.String getStatusMessage() { + java.lang.Object ref = statusMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + statusMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + public com.google.protobuf.ByteString getStatusMessageBytes() { + java.lang.Object ref = statusMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + statusMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStatusMessage() { + statusMessage_ = getDefaultInstance().getStatusMessage(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human-readable status of the operation, if any.
+     * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for statusMessage to set. + * @return This builder for chaining. + */ + public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + statusMessage_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean requestedCancellation_; + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + @java.lang.Override + public boolean getRequestedCancellation() { + return requestedCancellation_; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The requestedCancellation to set. + * @return This builder for chaining. + */ + public Builder setRequestedCancellation(boolean value) { + + requestedCancellation_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Identifies whether the user has requested cancellation
+     * of the operation. Operations that have been cancelled successfully
+     * have
+     * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+     * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+     * corresponding to `Code.CANCELLED`.
+     * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRequestedCancellation() { + bitField0_ = (bitField0_ & ~0x00000020); + requestedCancellation_ = false; + onChanged(); + return this; + } + + private java.lang.Object apiVersion_ = ""; + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + public java.lang.String getApiVersion() { + java.lang.Object ref = apiVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + public com.google.protobuf.ByteString getApiVersionBytes() { + java.lang.Object ref = apiVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearApiVersion() { + apiVersion_ = getDefaultInstance().getApiVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. API version used to start the operation.
+     * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for apiVersion to set. + * @return This builder for chaining. + */ + public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.OperationMetadata) + private static final com.google.cloud.networkconnectivity.v1beta.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.OperationMetadata(); + } + + public static com.google.cloud.networkconnectivity.v1beta.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.networkconnectivity.v1beta.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadataOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadataOrBuilder.java new file mode 100644 index 000000000000..c0ccbaae60cc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/OperationMetadataOrBuilder.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the operation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + + /** + * + * + *
+   * Output only. The time the operation finished running.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The target. + */ + java.lang.String getTarget(); + + /** + * + * + *
+   * Output only. Server-defined resource path for the target of the operation.
+   * 
+ * + * string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for target. + */ + com.google.protobuf.ByteString getTargetBytes(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The verb. + */ + java.lang.String getVerb(); + + /** + * + * + *
+   * Output only. Name of the verb executed by the operation.
+   * 
+ * + * string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for verb. + */ + com.google.protobuf.ByteString getVerbBytes(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The statusMessage. + */ + java.lang.String getStatusMessage(); + + /** + * + * + *
+   * Output only. Human-readable status of the operation, if any.
+   * 
+ * + * string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for statusMessage. + */ + com.google.protobuf.ByteString getStatusMessageBytes(); + + /** + * + * + *
+   * Output only. Identifies whether the user has requested cancellation
+   * of the operation. Operations that have been cancelled successfully
+   * have
+   * [google.longrunning.Operation.error][google.longrunning.Operation.error]
+   * value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
+   * corresponding to `Code.CANCELLED`.
+   * 
+ * + * bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The requestedCancellation. + */ + boolean getRequestedCancellation(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The apiVersion. + */ + java.lang.String getApiVersion(); + + /** + * + * + *
+   * Output only. API version used to start the operation.
+   * 
+ * + * string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for apiVersion. + */ + com.google.protobuf.ByteString getApiVersionBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoute.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoute.java new file mode 100644 index 000000000000..c3b88d0d7057 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoute.java @@ -0,0 +1,9432 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Policy-based routes route L4 network traffic based on not just destination IP
+ * address, but also source IP address, protocol, and more. If a policy-based
+ * route conflicts with other types of routes, the policy-based route always
+ * takes precedence.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute} + */ +@com.google.protobuf.Generated +public final class PolicyBasedRoute extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) + PolicyBasedRouteOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBasedRoute"); + } + + // Use PolicyBasedRoute.newBuilder() to construct. + private PolicyBasedRoute(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyBasedRoute() { + name_ = ""; + description_ = ""; + network_ = ""; + warnings_ = java.util.Collections.emptyList(); + selfLink_ = ""; + kind_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder.class); + } + + /** + * + * + *
+   * The other routing cases.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes} + */ + public enum OtherRoutes implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * OTHER_ROUTES_UNSPECIFIED = 0; + */ + OTHER_ROUTES_UNSPECIFIED(0), + /** + * + * + *
+     * Use the routes from the default routing tables (system-generated routes,
+     * custom routes, peering route) to determine the next hop. This effectively
+     * excludes matching packets being applied on other PBRs with a lower
+     * priority.
+     * 
+ * + * DEFAULT_ROUTING = 1; + */ + DEFAULT_ROUTING(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OtherRoutes"); + } + + /** + * + * + *
+     * Default value.
+     * 
+ * + * OTHER_ROUTES_UNSPECIFIED = 0; + */ + public static final int OTHER_ROUTES_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Use the routes from the default routing tables (system-generated routes,
+     * custom routes, peering route) to determine the next hop. This effectively
+     * excludes matching packets being applied on other PBRs with a lower
+     * priority.
+     * 
+ * + * DEFAULT_ROUTING = 1; + */ + public static final int DEFAULT_ROUTING_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OtherRoutes 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 OtherRoutes forNumber(int value) { + switch (value) { + case 0: + return OTHER_ROUTES_UNSPECIFIED; + case 1: + return DEFAULT_ROUTING; + 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 OtherRoutes findValueByNumber(int number) { + return OtherRoutes.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OtherRoutes[] VALUES = values(); + + public static OtherRoutes 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 OtherRoutes(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes) + } + + public interface VirtualMachineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + com.google.protobuf.ByteString getTagsBytes(int index); + } + + /** + * + * + *
+   * VM instances that this policy-based route applies to.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine} + */ + public static final class VirtualMachine extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + VirtualMachineOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VirtualMachine"); + } + + // Use VirtualMachine.newBuilder() to construct. + private VirtualMachine(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VirtualMachine() { + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder + .class); + } + + public static final int TAGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + + /** + * + * + *
+     * Optional. A list of VM instance tags that this policy-based route applies
+     * to. VM instances that have ANY of tags specified here installs this PBR.
+     * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.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 < tags_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tags_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().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.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine other = + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) obj; + + if (!getTagsList().equals(other.getTagsList())) 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 (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + 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.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + 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.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * VM instances that this policy-based route applies to.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine build() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine result = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + tags_.makeImmutable(); + result.tags_ = tags_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance()) return this; + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ |= 0x00000001; + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList tags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTagsIsMutable() { + if (!tags_.isModifiable()) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + tags_.makeImmutable(); + return tags_; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the tags at the given index. + */ + public com.google.protobuf.ByteString getTagsBytes(int index) { + return tags_.getByteString(index); + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The tags to set. + * @return This builder for chaining. + */ + public Builder setTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tags to add. + * @return This builder for chaining. + */ + public Builder addTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The tags to add. + * @return This builder for chaining. + */ + public Builder addAllTags(java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tags_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A list of VM instance tags that this policy-based route applies
+       * to. VM instances that have ANY of tags specified here installs this PBR.
+       * 
+ * + * repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the tags to add. + * @return This builder for chaining. + */ + public Builder addTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + private static final com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VirtualMachine 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.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InterconnectAttachmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Cloud region to install this policy-based route on interconnect
+     * attachment. Use `all` to install it on all interconnect attachments.
+     * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The region. + */ + java.lang.String getRegion(); + + /** + * + * + *
+     * Optional. Cloud region to install this policy-based route on interconnect
+     * attachment. Use `all` to install it on all interconnect attachments.
+     * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for region. + */ + com.google.protobuf.ByteString getRegionBytes(); + } + + /** + * + * + *
+   * InterconnectAttachment that this route applies to.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment} + */ + public static final class InterconnectAttachment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + InterconnectAttachmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InterconnectAttachment"); + } + + // Use InterconnectAttachment.newBuilder() to construct. + private InterconnectAttachment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InterconnectAttachment() { + region_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder.class); + } + + public static final int REGION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + + /** + * + * + *
+     * Optional. Cloud region to install this policy-based route on interconnect
+     * attachment. Use `all` to install it on all interconnect attachments.
+     * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. Cloud region to install this policy-based route on interconnect
+     * attachment. Use `all` to install it on all interconnect attachments.
+     * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, region_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, region_); + } + 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.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment other = + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) obj; + + if (!getRegion().equals(other.getRegion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + 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.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + 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.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * InterconnectAttachment that this route applies to.
+     * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + region_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + build() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment result = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.region_ = region_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance()) return this; + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + 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: + { + region_ = 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 region_ = ""; + + /** + * + * + *
+       * Optional. Cloud region to install this policy-based route on interconnect
+       * attachment. Use `all` to install it on all interconnect attachments.
+       * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. Cloud region to install this policy-based route on interconnect
+       * attachment. Use `all` to install it on all interconnect attachments.
+       * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for region. + */ + public com.google.protobuf.ByteString getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. Cloud region to install this policy-based route on interconnect
+       * attachment. Use `all` to install it on all interconnect attachments.
+       * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + region_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Cloud region to install this policy-based route on interconnect
+       * attachment. Use `all` to install it on all interconnect attachments.
+       * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Cloud region to install this policy-based route on interconnect
+       * attachment. Use `all` to install it on all interconnect attachments.
+       * 
+ * + * string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + private static final com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InterconnectAttachment 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.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The IP protocol that this policy-based route applies to. Valid
+     * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+     * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipProtocol. + */ + java.lang.String getIpProtocol(); + + /** + * + * + *
+     * Optional. The IP protocol that this policy-based route applies to. Valid
+     * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+     * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipProtocol. + */ + com.google.protobuf.ByteString getIpProtocolBytes(); + + /** + * + * + *
+     * Optional. The source IP range of outgoing packets that this policy-based
+     * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+     * "::/0" if protocol version is IPv6.
+     * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The srcRange. + */ + java.lang.String getSrcRange(); + + /** + * + * + *
+     * Optional. The source IP range of outgoing packets that this policy-based
+     * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+     * "::/0" if protocol version is IPv6.
+     * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for srcRange. + */ + com.google.protobuf.ByteString getSrcRangeBytes(); + + /** + * + * + *
+     * Optional. The destination IP range of outgoing packets that this
+     * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+     * is IPv4 and "::/0" if protocol version is IPv6.
+     * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destRange. + */ + java.lang.String getDestRange(); + + /** + * + * + *
+     * Optional. The destination IP range of outgoing packets that this
+     * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+     * is IPv4 and "::/0" if protocol version is IPv6.
+     * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destRange. + */ + com.google.protobuf.ByteString getDestRangeBytes(); + + /** + * + * + *
+     * Required. Internet protocol versions this policy-based route applies to.
+     * IPV4 and IPV6 is supported.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolVersion. + */ + int getProtocolVersionValue(); + + /** + * + * + *
+     * Required. Internet protocol versions this policy-based route applies to.
+     * IPV4 and IPV6 is supported.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolVersion. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + getProtocolVersion(); + } + + /** + * + * + *
+   * Filter matches L4 traffic.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter} + */ + public static final class Filter extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) + FilterOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Filter"); + } + + // Use Filter.newBuilder() to construct. + private Filter(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Filter() { + ipProtocol_ = ""; + srcRange_ = ""; + destRange_ = ""; + protocolVersion_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder.class); + } + + /** + * + * + *
+     * The internet protocol version.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion} + */ + public enum ProtocolVersion implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value.
+       * 
+ * + * PROTOCOL_VERSION_UNSPECIFIED = 0; + */ + PROTOCOL_VERSION_UNSPECIFIED(0), + /** + * + * + *
+       * The PBR is for IPv4 internet protocol traffic.
+       * 
+ * + * IPV4 = 1; + */ + IPV4(1), + /** + * + * + *
+       * The PBR is for IPv6 internet protocol traffic.
+       * 
+ * + * IPV6 = 2; + */ + IPV6(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProtocolVersion"); + } + + /** + * + * + *
+       * Default value.
+       * 
+ * + * PROTOCOL_VERSION_UNSPECIFIED = 0; + */ + public static final int PROTOCOL_VERSION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The PBR is for IPv4 internet protocol traffic.
+       * 
+ * + * IPV4 = 1; + */ + public static final int IPV4_VALUE = 1; + + /** + * + * + *
+       * The PBR is for IPv6 internet protocol traffic.
+       * 
+ * + * IPV6 = 2; + */ + public static final int IPV6_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 ProtocolVersion 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 ProtocolVersion forNumber(int value) { + switch (value) { + case 0: + return PROTOCOL_VERSION_UNSPECIFIED; + case 1: + return IPV4; + case 2: + return IPV6; + 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 ProtocolVersion findValueByNumber(int number) { + return ProtocolVersion.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ProtocolVersion[] VALUES = values(); + + public static ProtocolVersion 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 ProtocolVersion(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion) + } + + public static final int IP_PROTOCOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipProtocol_ = ""; + + /** + * + * + *
+     * Optional. The IP protocol that this policy-based route applies to. Valid
+     * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+     * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipProtocol. + */ + @java.lang.Override + public java.lang.String getIpProtocol() { + java.lang.Object ref = ipProtocol_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipProtocol_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The IP protocol that this policy-based route applies to. Valid
+     * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+     * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipProtocol. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpProtocolBytes() { + java.lang.Object ref = ipProtocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SRC_RANGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object srcRange_ = ""; + + /** + * + * + *
+     * Optional. The source IP range of outgoing packets that this policy-based
+     * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+     * "::/0" if protocol version is IPv6.
+     * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The srcRange. + */ + @java.lang.Override + public java.lang.String getSrcRange() { + java.lang.Object ref = srcRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcRange_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The source IP range of outgoing packets that this policy-based
+     * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+     * "::/0" if protocol version is IPv6.
+     * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for srcRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSrcRangeBytes() { + java.lang.Object ref = srcRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEST_RANGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object destRange_ = ""; + + /** + * + * + *
+     * Optional. The destination IP range of outgoing packets that this
+     * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+     * is IPv4 and "::/0" if protocol version is IPv6.
+     * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destRange. + */ + @java.lang.Override + public java.lang.String getDestRange() { + java.lang.Object ref = destRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destRange_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The destination IP range of outgoing packets that this
+     * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+     * is IPv4 and "::/0" if protocol version is IPv6.
+     * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestRangeBytes() { + java.lang.Object ref = destRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_VERSION_FIELD_NUMBER = 6; + private int protocolVersion_ = 0; + + /** + * + * + *
+     * Required. Internet protocol versions this policy-based route applies to.
+     * IPV4 and IPV6 is supported.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolVersion. + */ + @java.lang.Override + public int getProtocolVersionValue() { + return protocolVersion_; + } + + /** + * + * + *
+     * Required. Internet protocol versions this policy-based route applies to.
+     * IPV4 and IPV6 is supported.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolVersion. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + getProtocolVersion() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .forNumber(protocolVersion_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .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.GeneratedMessage.isStringEmpty(ipProtocol_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ipProtocol_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(srcRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, srcRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, destRange_); + } + if (protocolVersion_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .PROTOCOL_VERSION_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, protocolVersion_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipProtocol_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ipProtocol_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(srcRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, srcRange_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, destRange_); + } + if (protocolVersion_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .PROTOCOL_VERSION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, protocolVersion_); + } + 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.networkconnectivity.v1beta.PolicyBasedRoute.Filter)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter other = + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) obj; + + if (!getIpProtocol().equals(other.getIpProtocol())) return false; + if (!getSrcRange().equals(other.getSrcRange())) return false; + if (!getDestRange().equals(other.getDestRange())) return false; + if (protocolVersion_ != other.protocolVersion_) 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) + IP_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getIpProtocol().hashCode(); + hash = (37 * hash) + SRC_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getSrcRange().hashCode(); + hash = (37 * hash) + DEST_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDestRange().hashCode(); + hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + protocolVersion_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter 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.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter 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.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Filter matches L4 traffic.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ipProtocol_ = ""; + srcRange_ = ""; + destRange_ = ""; + protocolVersion_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter build() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter result = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ipProtocol_ = ipProtocol_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.srcRange_ = srcRange_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.destRange_ = destRange_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.protocolVersion_ = protocolVersion_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + .getDefaultInstance()) return this; + if (!other.getIpProtocol().isEmpty()) { + ipProtocol_ = other.ipProtocol_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSrcRange().isEmpty()) { + srcRange_ = other.srcRange_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDestRange().isEmpty()) { + destRange_ = other.destRange_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.protocolVersion_ != 0) { + setProtocolVersionValue(other.getProtocolVersionValue()); + } + 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: + { + ipProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + srcRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + destRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 48: + { + protocolVersion_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object ipProtocol_ = ""; + + /** + * + * + *
+       * Optional. The IP protocol that this policy-based route applies to. Valid
+       * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+       * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ipProtocol. + */ + public java.lang.String getIpProtocol() { + java.lang.Object ref = ipProtocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipProtocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The IP protocol that this policy-based route applies to. Valid
+       * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+       * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for ipProtocol. + */ + public com.google.protobuf.ByteString getIpProtocolBytes() { + java.lang.Object ref = ipProtocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The IP protocol that this policy-based route applies to. Valid
+       * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+       * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ipProtocol to set. + * @return This builder for chaining. + */ + public Builder setIpProtocol(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipProtocol_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The IP protocol that this policy-based route applies to. Valid
+       * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+       * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIpProtocol() { + ipProtocol_ = getDefaultInstance().getIpProtocol(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The IP protocol that this policy-based route applies to. Valid
+       * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
+       * 
+ * + * string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for ipProtocol to set. + * @return This builder for chaining. + */ + public Builder setIpProtocolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipProtocol_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object srcRange_ = ""; + + /** + * + * + *
+       * Optional. The source IP range of outgoing packets that this policy-based
+       * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+       * "::/0" if protocol version is IPv6.
+       * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The srcRange. + */ + public java.lang.String getSrcRange() { + java.lang.Object ref = srcRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + srcRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The source IP range of outgoing packets that this policy-based
+       * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+       * "::/0" if protocol version is IPv6.
+       * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for srcRange. + */ + public com.google.protobuf.ByteString getSrcRangeBytes() { + java.lang.Object ref = srcRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + srcRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The source IP range of outgoing packets that this policy-based
+       * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+       * "::/0" if protocol version is IPv6.
+       * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The srcRange to set. + * @return This builder for chaining. + */ + public Builder setSrcRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + srcRange_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The source IP range of outgoing packets that this policy-based
+       * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+       * "::/0" if protocol version is IPv6.
+       * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSrcRange() { + srcRange_ = getDefaultInstance().getSrcRange(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The source IP range of outgoing packets that this policy-based
+       * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and
+       * "::/0" if protocol version is IPv6.
+       * 
+ * + * string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for srcRange to set. + * @return This builder for chaining. + */ + public Builder setSrcRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + srcRange_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object destRange_ = ""; + + /** + * + * + *
+       * Optional. The destination IP range of outgoing packets that this
+       * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+       * is IPv4 and "::/0" if protocol version is IPv6.
+       * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destRange. + */ + public java.lang.String getDestRange() { + java.lang.Object ref = destRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The destination IP range of outgoing packets that this
+       * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+       * is IPv4 and "::/0" if protocol version is IPv6.
+       * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destRange. + */ + public com.google.protobuf.ByteString getDestRangeBytes() { + java.lang.Object ref = destRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The destination IP range of outgoing packets that this
+       * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+       * is IPv4 and "::/0" if protocol version is IPv6.
+       * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The destRange to set. + * @return This builder for chaining. + */ + public Builder setDestRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destRange_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The destination IP range of outgoing packets that this
+       * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+       * is IPv4 and "::/0" if protocol version is IPv6.
+       * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDestRange() { + destRange_ = getDefaultInstance().getDestRange(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The destination IP range of outgoing packets that this
+       * policy-based route applies to. Default is "0.0.0.0/0" if protocol version
+       * is IPv4 and "::/0" if protocol version is IPv6.
+       * 
+ * + * string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for destRange to set. + * @return This builder for chaining. + */ + public Builder setDestRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destRange_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int protocolVersion_ = 0; + + /** + * + * + *
+       * Required. Internet protocol versions this policy-based route applies to.
+       * IPV4 and IPV6 is supported.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for protocolVersion. + */ + @java.lang.Override + public int getProtocolVersionValue() { + return protocolVersion_; + } + + /** + * + * + *
+       * Required. Internet protocol versions this policy-based route applies to.
+       * IPV4 and IPV6 is supported.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersionValue(int value) { + protocolVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Internet protocol versions this policy-based route applies to.
+       * IPV4 and IPV6 is supported.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The protocolVersion. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + getProtocolVersion() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .forNumber(protocolVersion_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Required. Internet protocol versions this policy-based route applies to.
+       * IPV4 and IPV6 is supported.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersion( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + protocolVersion_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Required. Internet protocol versions this policy-based route applies to.
+       * IPV4 and IPV6 is supported.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearProtocolVersion() { + bitField0_ = (bitField0_ & ~0x00000008); + protocolVersion_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter) + private static final com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Filter 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.networkconnectivity.v1beta.PolicyBasedRoute.Filter + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WarningsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. A warning code, if applicable.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + + /** + * + * + *
+     * Output only. A warning code, if applicable.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The code. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code getCode(); + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getDataCount(); + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + boolean containsData(java.lang.String key); + + /** Use {@link #getDataMap()} instead. */ + @java.lang.Deprecated + java.util.Map getData(); + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.Map getDataMap(); + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + /* nullable */ + java.lang.String getDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.lang.String getDataOrThrow(java.lang.String key); + + /** + * + * + *
+     * Output only. A human-readable description of the warning code.
+     * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The warningMessage. + */ + java.lang.String getWarningMessage(); + + /** + * + * + *
+     * Output only. A human-readable description of the warning code.
+     * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for warningMessage. + */ + com.google.protobuf.ByteString getWarningMessageBytes(); + } + + /** + * + * + *
+   * Informational warning message.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings} + */ + public static final class Warnings extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) + WarningsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Warnings"); + } + + // Use Warnings.newBuilder() to construct. + private Warnings(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Warnings() { + code_ = 0; + warningMessage_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder.class); + } + + /** + * + * + *
+     * Warning code for policy-based routing. Expect to add values in the
+     * future.
+     * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code} + */ + public enum Code implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value.
+       * 
+ * + * WARNING_UNSPECIFIED = 0; + */ + WARNING_UNSPECIFIED(0), + /** + * + * + *
+       * The policy-based route is not active and functioning. Common causes are
+       * that the dependent network was deleted or the resource project was
+       * turned off.
+       * 
+ * + * RESOURCE_NOT_ACTIVE = 1; + */ + RESOURCE_NOT_ACTIVE(1), + /** + * + * + *
+       * The policy-based route is being modified (e.g. created/deleted) at this
+       * time.
+       * 
+ * + * RESOURCE_BEING_MODIFIED = 2; + */ + RESOURCE_BEING_MODIFIED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Code"); + } + + /** + * + * + *
+       * Default value.
+       * 
+ * + * WARNING_UNSPECIFIED = 0; + */ + public static final int WARNING_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The policy-based route is not active and functioning. Common causes are
+       * that the dependent network was deleted or the resource project was
+       * turned off.
+       * 
+ * + * RESOURCE_NOT_ACTIVE = 1; + */ + public static final int RESOURCE_NOT_ACTIVE_VALUE = 1; + + /** + * + * + *
+       * The policy-based route is being modified (e.g. created/deleted) at this
+       * time.
+       * 
+ * + * RESOURCE_BEING_MODIFIED = 2; + */ + public static final int RESOURCE_BEING_MODIFIED_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 Code 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 Code forNumber(int value) { + switch (value) { + case 0: + return WARNING_UNSPECIFIED; + case 1: + return RESOURCE_NOT_ACTIVE; + case 2: + return RESOURCE_BEING_MODIFIED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Code[] VALUES = values(); + + public static Code 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 Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code) + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + + /** + * + * + *
+     * Output only. A warning code, if applicable.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+     * Output only. A warning code, if applicable.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code.forNumber( + code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code.UNRECOGNIZED + : result; + } + + public static final int DATA_FIELD_NUMBER = 2; + + private static final class DataDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField data_; + + private com.google.protobuf.MapField internalGetData() { + if (data_ == null) { + return com.google.protobuf.MapField.emptyMapField(DataDefaultEntryHolder.defaultEntry); + } + return data_; + } + + public int getDataCount() { + return internalGetData().getMap().size(); + } + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public boolean containsData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetData().getMap().containsKey(key); + } + + /** Use {@link #getDataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getData() { + return getDataMap(); + } + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.Map getDataMap() { + return internalGetData().getMap(); + } + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Output only. Metadata about this warning in key: value format. The key
+     * should provides more detail on the warning being returned. For example,
+     * for warnings where there are no results in a list request for a
+     * particular zone, this key might be scope and the key value might be the
+     * zone name. Other examples might be a key indicating a deprecated resource
+     * and a suggested replacement.
+     * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.lang.String getDataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int WARNING_MESSAGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object warningMessage_ = ""; + + /** + * + * + *
+     * Output only. A human-readable description of the warning code.
+     * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The warningMessage. + */ + @java.lang.Override + public java.lang.String getWarningMessage() { + java.lang.Object ref = warningMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + warningMessage_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A human-readable description of the warning code.
+     * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for warningMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWarningMessageBytes() { + java.lang.Object ref = warningMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + warningMessage_ = 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 (code_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code + .WARNING_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, code_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetData(), DataDefaultEntryHolder.defaultEntry, 2); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(warningMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, warningMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code + .WARNING_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_); + } + for (java.util.Map.Entry entry : + internalGetData().getMap().entrySet()) { + com.google.protobuf.MapEntry data__ = + DataDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, data__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(warningMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, warningMessage_); + } + 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.networkconnectivity.v1beta.PolicyBasedRoute.Warnings)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings other = + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) obj; + + if (code_ != other.code_) return false; + if (!internalGetData().equals(other.internalGetData())) return false; + if (!getWarningMessage().equals(other.getWarningMessage())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + if (!internalGetData().getMap().isEmpty()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetData().hashCode(); + } + hash = (37 * hash) + WARNING_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getWarningMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings 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.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings 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.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Informational warning message.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 2: + return internalGetMutableData(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + internalGetMutableData().clear(); + warningMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings build() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings result = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = internalGetData(); + result.data_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.warningMessage_ = warningMessage_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + .getDefaultInstance()) return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + internalGetMutableData().mergeFrom(other.internalGetData()); + bitField0_ |= 0x00000002; + if (!other.getWarningMessage().isEmpty()) { + warningMessage_ = other.warningMessage_; + 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 8: + { + code_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.protobuf.MapEntry data__ = + input.readMessage( + DataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableData().getMutableMap().put(data__.getKey(), data__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + warningMessage_ = 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 int code_ = 0; + + /** + * + * + *
+       * Output only. A warning code, if applicable.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+       * Output only. A warning code, if applicable.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A warning code, if applicable.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code.forNumber( + code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. A warning code, if applicable.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + code_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A warning code, if applicable.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField data_; + + private com.google.protobuf.MapField internalGetData() { + if (data_ == null) { + return com.google.protobuf.MapField.emptyMapField(DataDefaultEntryHolder.defaultEntry); + } + return data_; + } + + private com.google.protobuf.MapField + internalGetMutableData() { + if (data_ == null) { + data_ = com.google.protobuf.MapField.newMapField(DataDefaultEntryHolder.defaultEntry); + } + if (!data_.isMutable()) { + data_ = data_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return data_; + } + + public int getDataCount() { + return internalGetData().getMap().size(); + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetData().getMap().containsKey(key); + } + + /** Use {@link #getDataMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getData() { + return getDataMap(); + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getDataMap() { + return internalGetData().getMap(); + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getDataOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getDataOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableData().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeData(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableData().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableData() { + bitField0_ |= 0x00000002; + return internalGetMutableData().getMutableMap(); + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putData(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableData().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + + /** + * + * + *
+       * Output only. Metadata about this warning in key: value format. The key
+       * should provides more detail on the warning being returned. For example,
+       * for warnings where there are no results in a list request for a
+       * particular zone, this key might be scope and the key value might be the
+       * zone name. Other examples might be a key indicating a deprecated resource
+       * and a suggested replacement.
+       * 
+ * + * map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllData(java.util.Map values) { + internalGetMutableData().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private java.lang.Object warningMessage_ = ""; + + /** + * + * + *
+       * Output only. A human-readable description of the warning code.
+       * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The warningMessage. + */ + public java.lang.String getWarningMessage() { + java.lang.Object ref = warningMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + warningMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A human-readable description of the warning code.
+       * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for warningMessage. + */ + public com.google.protobuf.ByteString getWarningMessageBytes() { + java.lang.Object ref = warningMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + warningMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A human-readable description of the warning code.
+       * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The warningMessage to set. + * @return This builder for chaining. + */ + public Builder setWarningMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + warningMessage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A human-readable description of the warning code.
+       * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearWarningMessage() { + warningMessage_ = getDefaultInstance().getWarningMessage(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A human-readable description of the warning code.
+       * 
+ * + * string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for warningMessage to set. + * @return This builder for chaining. + */ + public Builder setWarningMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + warningMessage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings) + private static final com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Warnings 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.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int targetCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object target_; + + public enum TargetCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VIRTUAL_MACHINE(18), + INTERCONNECT_ATTACHMENT(9), + TARGET_NOT_SET(0); + private final int value; + + private TargetCase(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 TargetCase valueOf(int value) { + return forNumber(value); + } + + public static TargetCase forNumber(int value) { + switch (value) { + case 18: + return VIRTUAL_MACHINE; + case 9: + return INTERCONNECT_ATTACHMENT; + case 0: + return TARGET_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + private int nextHopCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object nextHop_; + + public enum NextHopCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + NEXT_HOP_ILB_IP(12), + NEXT_HOP_OTHER_ROUTES(21), + NEXTHOP_NOT_SET(0); + private final int value; + + private NextHopCase(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 NextHopCase valueOf(int value) { + return forNumber(value); + } + + public static NextHopCase forNumber(int value) { + switch (value) { + case 12: + return NEXT_HOP_ILB_IP; + case 21: + return NEXT_HOP_OTHER_ROUTES; + case 0: + return NEXTHOP_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public NextHopCase getNextHopCase() { + return NextHopCase.forNumber(nextHopCase_); + } + + public static final int VIRTUAL_MACHINE_FIELD_NUMBER = 18; + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return targetCase_ == 18; + } + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + getVirtualMachine() { + if (targetCase_ == 18) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder + getVirtualMachineOrBuilder() { + if (targetCase_ == 18) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + + public static final int INTERCONNECT_ATTACHMENT_FIELD_NUMBER = 9; + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + @java.lang.Override + public boolean hasInterconnectAttachment() { + return targetCase_ == 9; + } + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectAttachment. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + getInterconnectAttachment() { + if (targetCase_ == 9) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder() { + if (targetCase_ == 9) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + + public static final int NEXT_HOP_ILB_IP_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nextHopIlbIp field is set. + */ + public boolean hasNextHopIlbIp() { + return nextHopCase_ == 12; + } + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextHopIlbIp. + */ + public java.lang.String getNextHopIlbIp() { + java.lang.Object ref = ""; + if (nextHopCase_ == 12) { + ref = nextHop_; + } + if (ref instanceof java.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 (nextHopCase_ == 12) { + nextHop_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextHopIlbIp. + */ + public com.google.protobuf.ByteString getNextHopIlbIpBytes() { + java.lang.Object ref = ""; + if (nextHopCase_ == 12) { + ref = nextHop_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (nextHopCase_ == 12) { + nextHop_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_HOP_OTHER_ROUTES_FIELD_NUMBER = 21; + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nextHopOtherRoutes field is set. + */ + public boolean hasNextHopOtherRoutes() { + return nextHopCase_ == 21; + } + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nextHopOtherRoutes. + */ + public int getNextHopOtherRoutesValue() { + if (nextHopCase_ == 21) { + return (java.lang.Integer) nextHop_; + } + return 0; + } + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nextHopOtherRoutes. + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes + getNextHopOtherRoutes() { + if (nextHopCase_ == 21) { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes.forNumber( + (java.lang.Integer) nextHop_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes.UNRECOGNIZED + : result; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes + .OTHER_ROUTES_UNSPECIFIED; + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. Identifier. A unique name of the resource in the form of
+   * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. Identifier. A unique name of the resource in the form of
+   * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Time when the policy-based route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Time when the policy-based route 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 policy-based route 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 policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Time when the policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Time when the policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_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 labels.
+   * 
+ * + * 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 labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * 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 labels.
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this field when
+   * you create the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this field when
+   * you create the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+   * Required. Fully-qualified URL of the network that this route applies to,
+   * for example: projects/my-project/global/networks/my-network.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Fully-qualified URL of the network that this route applies to,
+   * for example: projects/my-project/global/networks/my-network.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 10; + private com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter_; + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter getFilter() { + return filter_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.getDefaultInstance() + : filter_; + } + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder + getFilterOrBuilder() { + return filter_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.getDefaultInstance() + : filter_; + } + + public static final int PRIORITY_FIELD_NUMBER = 11; + private int priority_ = 0; + + /** + * + * + *
+   * Optional. The priority of this policy-based route. Priority is used to
+   * break ties in cases where there are more than one matching policy-based
+   * routes found. In cases where multiple policy-based routes are matched, the
+   * one with the lowest-numbered priority value wins. The default value is
+   * 1000. The priority value must be from 1 to 65535, inclusive.
+   * 
+ * + * int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + public static final int WARNINGS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List + warnings_; + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getWarningsList() { + return warnings_; + } + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder> + getWarningsOrBuilderList() { + return warnings_; + } + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getWarningsCount() { + return warnings_.size(); + } + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings getWarnings( + int index) { + return warnings_.get(index); + } + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder + getWarningsOrBuilder(int index) { + return warnings_.get(index); + } + + public static final int SELF_LINK_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object selfLink_ = ""; + + /** + * + * + *
+   * Output only. Server-defined fully-qualified URL for this resource.
+   * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The selfLink. + */ + @java.lang.Override + public java.lang.String getSelfLink() { + java.lang.Object ref = selfLink_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selfLink_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Server-defined fully-qualified URL for this resource.
+   * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for selfLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSelfLinkBytes() { + java.lang.Object ref = selfLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selfLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private volatile java.lang.Object kind_ = ""; + + /** + * + * + *
+   * Output only. Type of this resource. Always
+   * networkconnectivity#policyBasedRoute for policy-based Route resources.
+   * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + @java.lang.Override + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Type of this resource. Always
+   * networkconnectivity#policyBasedRoute for policy-based Route resources.
+   * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, network_); + } + if (targetCase_ == 9) { + output.writeMessage( + 9, + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + target_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getFilter()); + } + if (priority_ != 0) { + output.writeInt32(11, priority_); + } + if (nextHopCase_ == 12) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, nextHop_); + } + for (int i = 0; i < warnings_.size(); i++) { + output.writeMessage(14, warnings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(selfLink_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, selfLink_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, kind_); + } + if (targetCase_ == 18) { + output.writeMessage( + 18, + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) target_); + } + if (nextHopCase_ == 21) { + output.writeEnum(21, ((java.lang.Integer) nextHop_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, network_); + } + if (targetCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment) + target_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getFilter()); + } + if (priority_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, priority_); + } + if (nextHopCase_ == 12) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, nextHop_); + } + for (int i = 0; i < warnings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, warnings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(selfLink_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, selfLink_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kind_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(16, kind_); + } + if (targetCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + target_); + } + if (nextHopCase_ == 21) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(21, ((java.lang.Integer) nextHop_)); + } + 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.networkconnectivity.v1beta.PolicyBasedRoute)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute other = + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) return false; + } + if (getPriority() != other.getPriority()) return false; + if (!getWarningsList().equals(other.getWarningsList())) return false; + if (!getSelfLink().equals(other.getSelfLink())) return false; + if (!getKind().equals(other.getKind())) return false; + if (!getTargetCase().equals(other.getTargetCase())) return false; + switch (targetCase_) { + case 18: + if (!getVirtualMachine().equals(other.getVirtualMachine())) return false; + break; + case 9: + if (!getInterconnectAttachment().equals(other.getInterconnectAttachment())) return false; + break; + case 0: + default: + } + if (!getNextHopCase().equals(other.getNextHopCase())) return false; + switch (nextHopCase_) { + case 12: + if (!getNextHopIlbIp().equals(other.getNextHopIlbIp())) return false; + break; + case 21: + if (getNextHopOtherRoutesValue() != other.getNextHopOtherRoutesValue()) 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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority(); + if (getWarningsCount() > 0) { + hash = (37 * hash) + WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + getWarningsList().hashCode(); + } + hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; + hash = (53 * hash) + getSelfLink().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + getKind().hashCode(); + switch (targetCase_) { + case 18: + hash = (37 * hash) + VIRTUAL_MACHINE_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachine().hashCode(); + break; + case 9: + hash = (37 * hash) + INTERCONNECT_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getInterconnectAttachment().hashCode(); + break; + case 0: + default: + } + switch (nextHopCase_) { + case 12: + hash = (37 * hash) + NEXT_HOP_ILB_IP_FIELD_NUMBER; + hash = (53 * hash) + getNextHopIlbIp().hashCode(); + break; + case 21: + hash = (37 * hash) + NEXT_HOP_OTHER_ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getNextHopOtherRoutesValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute 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.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute 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.networkconnectivity.v1beta.PolicyBasedRoute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Policy-based routes route L4 network traffic based on not just destination IP
+   * address, but also source IP address, protocol, and more. If a policy-based
+   * route conflicts with other types of routes, the policy-based route always
+   * takes precedence.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PolicyBasedRoute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.class, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetFilterFieldBuilder(); + internalGetWarningsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (virtualMachineBuilder_ != null) { + virtualMachineBuilder_.clear(); + } + if (interconnectAttachmentBuilder_ != null) { + interconnectAttachmentBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + network_ = ""; + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + priority_ = 0; + if (warningsBuilder_ == null) { + warnings_ = java.util.Collections.emptyList(); + } else { + warnings_ = null; + warningsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + selfLink_ = ""; + kind_ = ""; + targetCase_ = 0; + target_ = null; + nextHopCase_ = 0; + nextHop_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingProto + .internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute build() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute result = + new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute result) { + if (warningsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + warnings_ = java.util.Collections.unmodifiableList(warnings_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.warnings_ = warnings_; + } else { + result.warnings_ = warningsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.selfLink_ = selfLink_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.kind_ = kind_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute result) { + result.targetCase_ = targetCase_; + result.target_ = this.target_; + if (targetCase_ == 18 && virtualMachineBuilder_ != null) { + result.target_ = virtualMachineBuilder_.build(); + } + if (targetCase_ == 9 && interconnectAttachmentBuilder_ != null) { + result.target_ = interconnectAttachmentBuilder_.build(); + } + result.nextHopCase_ = nextHopCase_; + result.nextHop_ = this.nextHop_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000080; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + if (other.getPriority() != 0) { + setPriority(other.getPriority()); + } + if (warningsBuilder_ == null) { + if (!other.warnings_.isEmpty()) { + if (warnings_.isEmpty()) { + warnings_ = other.warnings_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureWarningsIsMutable(); + warnings_.addAll(other.warnings_); + } + onChanged(); + } + } else { + if (!other.warnings_.isEmpty()) { + if (warningsBuilder_.isEmpty()) { + warningsBuilder_.dispose(); + warningsBuilder_ = null; + warnings_ = other.warnings_; + bitField0_ = (bitField0_ & ~0x00001000); + warningsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetWarningsFieldBuilder() + : null; + } else { + warningsBuilder_.addAllMessages(other.warnings_); + } + } + } + if (!other.getSelfLink().isEmpty()) { + selfLink_ = other.selfLink_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (!other.getKind().isEmpty()) { + kind_ = other.kind_; + bitField0_ |= 0x00004000; + onChanged(); + } + switch (other.getTargetCase()) { + case VIRTUAL_MACHINE: + { + mergeVirtualMachine(other.getVirtualMachine()); + break; + } + case INTERCONNECT_ATTACHMENT: + { + mergeInterconnectAttachment(other.getInterconnectAttachment()); + break; + } + case TARGET_NOT_SET: + { + break; + } + } + switch (other.getNextHopCase()) { + case NEXT_HOP_ILB_IP: + { + nextHopCase_ = 12; + nextHop_ = other.nextHop_; + onChanged(); + break; + } + case NEXT_HOP_OTHER_ROUTES: + { + setNextHopOtherRoutesValue(other.getNextHopOtherRoutesValue()); + break; + } + case NEXTHOP_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_ |= 0x00000010; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 42 + case 50: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 50 + case 74: + { + input.readMessage( + internalGetInterconnectAttachmentFieldBuilder().getBuilder(), + extensionRegistry); + targetCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(internalGetFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 82 + case 88: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 88 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + nextHopCase_ = 12; + nextHop_ = s; + break; + } // case 98 + case 114: + { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + .parser(), + extensionRegistry); + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(m); + } else { + warningsBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 130 + case 146: + { + input.readMessage( + internalGetVirtualMachineFieldBuilder().getBuilder(), extensionRegistry); + targetCase_ = 18; + break; + } // case 146 + case 168: + { + int rawValue = input.readEnum(); + nextHopCase_ = 21; + nextHop_ = rawValue; + break; + } // case 168 + 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 targetCase_ = 0; + private java.lang.Object target_; + + public TargetCase getTargetCase() { + return TargetCase.forNumber(targetCase_); + } + + public Builder clearTarget() { + targetCase_ = 0; + target_ = null; + onChanged(); + return this; + } + + private int nextHopCase_ = 0; + private java.lang.Object nextHop_; + + public NextHopCase getNextHopCase() { + return NextHopCase.forNumber(nextHopCase_); + } + + public Builder clearNextHop() { + nextHopCase_ = 0; + nextHop_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder> + virtualMachineBuilder_; + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the virtualMachine field is set. + */ + @java.lang.Override + public boolean hasVirtualMachine() { + return targetCase_ == 18; + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The virtualMachine. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + getVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (targetCase_ == 18) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } else { + if (targetCase_ == 18) { + return virtualMachineBuilder_.getMessage(); + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVirtualMachine( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + virtualMachineBuilder_.setMessage(value); + } + targetCase_ = 18; + return this; + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVirtualMachine( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder + builderForValue) { + if (virtualMachineBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + virtualMachineBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 18; + return this; + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVirtualMachine( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine value) { + if (virtualMachineBuilder_ == null) { + if (targetCase_ == 18 + && target_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance()) { + target_ = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .newBuilder( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 18) { + virtualMachineBuilder_.mergeFrom(value); + } else { + virtualMachineBuilder_.setMessage(value); + } + } + targetCase_ = 18; + return this; + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVirtualMachine() { + if (virtualMachineBuilder_ == null) { + if (targetCase_ == 18) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 18) { + targetCase_ = 0; + target_ = null; + } + virtualMachineBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder + getVirtualMachineBuilder() { + return internalGetVirtualMachineFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder + getVirtualMachineOrBuilder() { + if ((targetCase_ == 18) && (virtualMachineBuilder_ != null)) { + return virtualMachineBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 18) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. VM instances that this policy-based route applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder> + internalGetVirtualMachineFieldBuilder() { + if (virtualMachineBuilder_ == null) { + if (!(targetCase_ == 18)) { + target_ = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine + .getDefaultInstance(); + } + virtualMachineBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .VirtualMachineOrBuilder>( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine) + target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 18; + onChanged(); + return virtualMachineBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder> + interconnectAttachmentBuilder_; + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + @java.lang.Override + public boolean hasInterconnectAttachment() { + return targetCase_ == 9; + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectAttachment. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + getInterconnectAttachment() { + if (interconnectAttachmentBuilder_ == null) { + if (targetCase_ == 9) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } else { + if (targetCase_ == 9) { + return interconnectAttachmentBuilder_.getMessage(); + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment value) { + if (interconnectAttachmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + target_ = value; + onChanged(); + } else { + interconnectAttachmentBuilder_.setMessage(value); + } + targetCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment.Builder + builderForValue) { + if (interconnectAttachmentBuilder_ == null) { + target_ = builderForValue.build(); + onChanged(); + } else { + interconnectAttachmentBuilder_.setMessage(builderForValue.build()); + } + targetCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment value) { + if (interconnectAttachmentBuilder_ == null) { + if (targetCase_ == 9 + && target_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment.getDefaultInstance()) { + target_ = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .newBuilder( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment) + target_) + .mergeFrom(value) + .buildPartial(); + } else { + target_ = value; + } + onChanged(); + } else { + if (targetCase_ == 9) { + interconnectAttachmentBuilder_.mergeFrom(value); + } else { + interconnectAttachmentBuilder_.setMessage(value); + } + } + targetCase_ = 9; + return this; + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInterconnectAttachment() { + if (interconnectAttachmentBuilder_ == null) { + if (targetCase_ == 9) { + targetCase_ = 0; + target_ = null; + onChanged(); + } + } else { + if (targetCase_ == 9) { + targetCase_ = 0; + target_ = null; + } + interconnectAttachmentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder + getInterconnectAttachmentBuilder() { + return internalGetInterconnectAttachmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder() { + if ((targetCase_ == 9) && (interconnectAttachmentBuilder_ != null)) { + return interconnectAttachmentBuilder_.getMessageOrBuilder(); + } else { + if (targetCase_ == 9) { + return (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment) + target_; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. The interconnect attachments that this policy-based route
+     * applies to.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder> + internalGetInterconnectAttachmentFieldBuilder() { + if (interconnectAttachmentBuilder_ == null) { + if (!(targetCase_ == 9)) { + target_ = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .getDefaultInstance(); + } + interconnectAttachmentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + .Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachmentOrBuilder>( + (com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + .InterconnectAttachment) + target_, + getParentForChildren(), + isClean()); + target_ = null; + } + targetCase_ = 9; + onChanged(); + return interconnectAttachmentBuilder_; + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nextHopIlbIp field is set. + */ + @java.lang.Override + public boolean hasNextHopIlbIp() { + return nextHopCase_ == 12; + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextHopIlbIp. + */ + @java.lang.Override + public java.lang.String getNextHopIlbIp() { + java.lang.Object ref = ""; + if (nextHopCase_ == 12) { + ref = nextHop_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (nextHopCase_ == 12) { + nextHop_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextHopIlbIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextHopIlbIpBytes() { + java.lang.Object ref = ""; + if (nextHopCase_ == 12) { + ref = nextHop_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (nextHopCase_ == 12) { + nextHop_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nextHopIlbIp to set. + * @return This builder for chaining. + */ + public Builder setNextHopIlbIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextHopCase_ = 12; + nextHop_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNextHopIlbIp() { + if (nextHopCase_ == 12) { + nextHopCase_ = 0; + nextHop_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The IP address of a global-access-enabled L4 ILB that is the
+     * next hop for matching packets. For this version, only nextHopIlbIp is
+     * supported.
+     * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nextHopIlbIp to set. + * @return This builder for chaining. + */ + public Builder setNextHopIlbIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextHopCase_ = 12; + nextHop_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nextHopOtherRoutes field is set. + */ + @java.lang.Override + public boolean hasNextHopOtherRoutes() { + return nextHopCase_ == 21; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nextHopOtherRoutes. + */ + @java.lang.Override + public int getNextHopOtherRoutesValue() { + if (nextHopCase_ == 21) { + return ((java.lang.Integer) nextHop_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for nextHopOtherRoutes to set. + * @return This builder for chaining. + */ + public Builder setNextHopOtherRoutesValue(int value) { + nextHopCase_ = 21; + nextHop_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nextHopOtherRoutes. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes + getNextHopOtherRoutes() { + if (nextHopCase_ == 21) { + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes result = + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes.forNumber( + (java.lang.Integer) nextHop_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes.UNRECOGNIZED + : result; + } + return com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes + .OTHER_ROUTES_UNSPECIFIED; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The nextHopOtherRoutes to set. + * @return This builder for chaining. + */ + public Builder setNextHopOtherRoutes( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes value) { + if (value == null) { + throw new NullPointerException(); + } + nextHopCase_ = 21; + nextHop_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Other routes that will be referenced to determine the next hop
+     * of the packet.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearNextHopOtherRoutes() { + if (nextHopCase_ == 21) { + nextHopCase_ = 0; + nextHop_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. Identifier. A unique name of the resource in the form of
+     * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. Identifier. A unique name of the resource in the form of
+     * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. Identifier. A unique name of the resource in the form of
+     * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Identifier. A unique name of the resource in the form of
+     * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Identifier. A unique name of the resource in the form of
+     * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the policy-based route 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_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. Time when the policy-based route 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 policy-based route 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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route 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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route 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_ & 0x00000020) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the policy-based route 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 policy-based route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Time when the policy-based route was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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_ |= 0x00000080; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * User-defined labels.
+     * 
+ * + * 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 labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * User-defined labels.
+     * 
+ * + * 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 labels.
+     * 
+ * + * 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_ & ~0x00000080); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * User-defined labels.
+     * 
+ * + * 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_ |= 0x00000080; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * User-defined labels.
+     * 
+ * + * 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_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * User-defined labels.
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this field when
+     * you create the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this field when
+     * you create the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this field when
+     * you create the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this field when
+     * you create the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of this resource. Provide this field when
+     * you create the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + + /** + * + * + *
+     * Required. Fully-qualified URL of the network that this route applies to,
+     * for example: projects/my-project/global/networks/my-network.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Fully-qualified URL of the network that this route applies to,
+     * for example: projects/my-project/global/networks/my-network.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Fully-qualified URL of the network that this route applies to,
+     * for example: projects/my-project/global/networks/my-network.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Fully-qualified URL of the network that this route applies to,
+     * for example: projects/my-project/global/networks/my-network.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Fully-qualified URL of the network that this route applies to,
+     * for example: projects/my-project/global/networks/my-network.
+     * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder> + filterBuilder_; + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + .getDefaultInstance() + : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilter( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFilter( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder + builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFilter( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && filter_ != null + && filter_ + != com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + .getDefaultInstance()) { + getFilterBuilder().mergeFrom(value); + } else { + filter_ = value; + } + } else { + filterBuilder_.mergeFrom(value); + } + if (filter_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000400); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder + getFilterBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetFilterFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder + getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null + ? com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter + .getDefaultInstance() + : filter_; + } + } + + /** + * + * + *
+     * Required. The filter to match L4 traffic.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder> + internalGetFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder>( + getFilter(), getParentForChildren(), isClean()); + filter_ = null; + } + return filterBuilder_; + } + + private int priority_; + + /** + * + * + *
+     * Optional. The priority of this policy-based route. Priority is used to
+     * break ties in cases where there are more than one matching policy-based
+     * routes found. In cases where multiple policy-based routes are matched, the
+     * one with the lowest-numbered priority value wins. The default value is
+     * 1000. The priority value must be from 1 to 65535, inclusive.
+     * 
+ * + * int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + @java.lang.Override + public int getPriority() { + return priority_; + } + + /** + * + * + *
+     * Optional. The priority of this policy-based route. Priority is used to
+     * break ties in cases where there are more than one matching policy-based
+     * routes found. In cases where multiple policy-based routes are matched, the
+     * one with the lowest-numbered priority value wins. The default value is
+     * 1000. The priority value must be from 1 to 65535, inclusive.
+     * 
+ * + * int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(int value) { + + priority_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The priority of this policy-based route. Priority is used to
+     * break ties in cases where there are more than one matching policy-based
+     * routes found. In cases where multiple policy-based routes are matched, the
+     * one with the lowest-numbered priority value wins. The default value is
+     * 1000. The priority value must be from 1 to 65535, inclusive.
+     * 
+ * + * int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000800); + priority_ = 0; + onChanged(); + return this; + } + + private java.util.List + warnings_ = java.util.Collections.emptyList(); + + private void ensureWarningsIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + warnings_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings>(warnings_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder> + warningsBuilder_; + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getWarningsList() { + if (warningsBuilder_ == null) { + return java.util.Collections.unmodifiableList(warnings_); + } else { + return warningsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getWarningsCount() { + if (warningsBuilder_ == null) { + return warnings_.size(); + } else { + return warningsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings getWarnings( + int index) { + if (warningsBuilder_ == null) { + return warnings_.get(index); + } else { + return warningsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWarnings( + int index, com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.set(index, value); + onChanged(); + } else { + warningsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWarnings( + int index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.set(index, builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addWarnings( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.add(value); + onChanged(); + } else { + warningsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addWarnings( + int index, com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings value) { + if (warningsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWarningsIsMutable(); + warnings_.add(index, value); + onChanged(); + } else { + warningsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addWarnings( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addWarnings( + int index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + builderForValue) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(index, builderForValue.build()); + onChanged(); + } else { + warningsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllWarnings( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings> + values) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, warnings_); + onChanged(); + } else { + warningsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWarnings() { + if (warningsBuilder_ == null) { + warnings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + warningsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeWarnings(int index) { + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.remove(index); + onChanged(); + } else { + warningsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + getWarningsBuilder(int index) { + return internalGetWarningsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder + getWarningsOrBuilder(int index) { + if (warningsBuilder_ == null) { + return warnings_.get(index); + } else { + return warningsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder> + getWarningsOrBuilderList() { + if (warningsBuilder_ != null) { + return warningsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(warnings_); + } + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + addWarningsBuilder() { + return internalGetWarningsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder + addWarningsBuilder(int index) { + return internalGetWarningsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. If potential misconfigurations are detected for this route,
+     * this field will be populated with warning messages.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder> + getWarningsBuilderList() { + return internalGetWarningsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder> + internalGetWarningsFieldBuilder() { + if (warningsBuilder_ == null) { + warningsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.Builder, + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder>( + warnings_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); + warnings_ = null; + } + return warningsBuilder_; + } + + private java.lang.Object selfLink_ = ""; + + /** + * + * + *
+     * Output only. Server-defined fully-qualified URL for this resource.
+     * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The selfLink. + */ + public java.lang.String getSelfLink() { + java.lang.Object ref = selfLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + selfLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined fully-qualified URL for this resource.
+     * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for selfLink. + */ + public com.google.protobuf.ByteString getSelfLinkBytes() { + java.lang.Object ref = selfLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + selfLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Server-defined fully-qualified URL for this resource.
+     * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The selfLink to set. + * @return This builder for chaining. + */ + public Builder setSelfLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + selfLink_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined fully-qualified URL for this resource.
+     * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSelfLink() { + selfLink_ = getDefaultInstance().getSelfLink(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Server-defined fully-qualified URL for this resource.
+     * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for selfLink to set. + * @return This builder for chaining. + */ + public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + selfLink_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private java.lang.Object kind_ = ""; + + /** + * + * + *
+     * Output only. Type of this resource. Always
+     * networkconnectivity#policyBasedRoute for policy-based Route resources.
+     * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + public java.lang.String getKind() { + java.lang.Object ref = kind_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kind_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Type of this resource. Always
+     * networkconnectivity#policyBasedRoute for policy-based Route resources.
+     * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + public com.google.protobuf.ByteString getKindBytes() { + java.lang.Object ref = kind_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kind_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Type of this resource. Always
+     * networkconnectivity#policyBasedRoute for policy-based Route resources.
+     * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of this resource. Always
+     * networkconnectivity#policyBasedRoute for policy-based Route resources.
+     * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + kind_ = getDefaultInstance().getKind(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of this resource. Always
+     * networkconnectivity#policyBasedRoute for policy-based Route resources.
+     * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for kind to set. + * @return This builder for chaining. + */ + public Builder setKindBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kind_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) + private static final com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyBasedRoute 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.networkconnectivity.v1beta.PolicyBasedRoute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteName.java new file mode 100644 index 000000000000..c201d0971ee6 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteName.java @@ -0,0 +1,198 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 PolicyBasedRouteName implements ResourceName { + private static final PathTemplate PROJECT_POLICY_BASED_ROUTE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}"); + private volatile Map fieldValuesMap; + private final String project; + private final String policyBasedRoute; + + @Deprecated + protected PolicyBasedRouteName() { + project = null; + policyBasedRoute = null; + } + + private PolicyBasedRouteName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + policyBasedRoute = Preconditions.checkNotNull(builder.getPolicyBasedRoute()); + } + + public String getProject() { + return project; + } + + public String getPolicyBasedRoute() { + return policyBasedRoute; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyBasedRouteName of(String project, String policyBasedRoute) { + return newBuilder().setProject(project).setPolicyBasedRoute(policyBasedRoute).build(); + } + + public static String format(String project, String policyBasedRoute) { + return newBuilder() + .setProject(project) + .setPolicyBasedRoute(policyBasedRoute) + .build() + .toString(); + } + + public static PolicyBasedRouteName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_POLICY_BASED_ROUTE.validatedMatch( + formattedString, "PolicyBasedRouteName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("policy_based_route")); + } + + 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 (PolicyBasedRouteName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_POLICY_BASED_ROUTE.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 (policyBasedRoute != null) { + fieldMapBuilder.put("policy_based_route", policyBasedRoute); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_POLICY_BASED_ROUTE.instantiate( + "project", project, "policy_based_route", policyBasedRoute); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PolicyBasedRouteName that = ((PolicyBasedRouteName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.policyBasedRoute, that.policyBasedRoute); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(policyBasedRoute); + return h; + } + + /** Builder for projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}. */ + public static class Builder { + private String project; + private String policyBasedRoute; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getPolicyBasedRoute() { + return policyBasedRoute; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setPolicyBasedRoute(String policyBasedRoute) { + this.policyBasedRoute = policyBasedRoute; + return this; + } + + private Builder(PolicyBasedRouteName policyBasedRouteName) { + this.project = policyBasedRouteName.project; + this.policyBasedRoute = policyBasedRouteName.policyBasedRoute; + } + + public PolicyBasedRouteName build() { + return new PolicyBasedRouteName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteOrBuilder.java new file mode 100644 index 000000000000..24fadda4ed46 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRouteOrBuilder.java @@ -0,0 +1,640 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface PolicyBasedRouteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PolicyBasedRoute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the virtualMachine field is set. + */ + boolean hasVirtualMachine(); + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The virtualMachine. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine getVirtualMachine(); + + /** + * + * + *
+   * Optional. VM instances that this policy-based route applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineOrBuilder + getVirtualMachineOrBuilder(); + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interconnectAttachment field is set. + */ + boolean hasInterconnectAttachment(); + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interconnectAttachment. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment + getInterconnectAttachment(); + + /** + * + * + *
+   * Optional. The interconnect attachments that this policy-based route
+   * applies to.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.InterconnectAttachmentOrBuilder + getInterconnectAttachmentOrBuilder(); + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the nextHopIlbIp field is set. + */ + boolean hasNextHopIlbIp(); + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nextHopIlbIp. + */ + java.lang.String getNextHopIlbIp(); + + /** + * + * + *
+   * Optional. The IP address of a global-access-enabled L4 ILB that is the
+   * next hop for matching packets. For this version, only nextHopIlbIp is
+   * supported.
+   * 
+ * + * string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nextHopIlbIp. + */ + com.google.protobuf.ByteString getNextHopIlbIpBytes(); + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the nextHopOtherRoutes field is set. + */ + boolean hasNextHopOtherRoutes(); + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for nextHopOtherRoutes. + */ + int getNextHopOtherRoutesValue(); + + /** + * + * + *
+   * Optional. Other routes that will be referenced to determine the next hop
+   * of the packet.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The nextHopOtherRoutes. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.OtherRoutes getNextHopOtherRoutes(); + + /** + * + * + *
+   * Immutable. Identifier. A unique name of the resource in the form of
+   * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. Identifier. A unique name of the resource in the form of
+   * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time when the policy-based route 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 policy-based route 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 policy-based route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Time when the policy-based route was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * User-defined labels.
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this field when
+   * you create the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. An optional description of this resource. Provide this field when
+   * you create the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. Fully-qualified URL of the network that this route applies to,
+   * for example: projects/my-project/global/networks/my-network.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+   * Required. Fully-qualified URL of the network that this route applies to,
+   * for example: projects/my-project/global/networks/my-network.
+   * 
+ * + * + * string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The filter. + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter getFilter(); + + /** + * + * + *
+   * Required. The filter to match L4 traffic.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterOrBuilder getFilterOrBuilder(); + + /** + * + * + *
+   * Optional. The priority of this policy-based route. Priority is used to
+   * break ties in cases where there are more than one matching policy-based
+   * routes found. In cases where multiple policy-based routes are matched, the
+   * one with the lowest-numbered priority value wins. The default value is
+   * 1000. The priority value must be from 1 to 65535, inclusive.
+   * 
+ * + * int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The priority. + */ + int getPriority(); + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getWarningsList(); + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings getWarnings(int index); + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getWarningsCount(); + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder> + getWarningsOrBuilderList(); + + /** + * + * + *
+   * Output only. If potential misconfigurations are detected for this route,
+   * this field will be populated with warning messages.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsOrBuilder + getWarningsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Server-defined fully-qualified URL for this resource.
+   * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The selfLink. + */ + java.lang.String getSelfLink(); + + /** + * + * + *
+   * Output only. Server-defined fully-qualified URL for this resource.
+   * 
+ * + * string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for selfLink. + */ + com.google.protobuf.ByteString getSelfLinkBytes(); + + /** + * + * + *
+   * Output only. Type of this resource. Always
+   * networkconnectivity#policyBasedRoute for policy-based Route resources.
+   * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The kind. + */ + java.lang.String getKind(); + + /** + * + * + *
+   * Output only. Type of this resource. Always
+   * networkconnectivity#policyBasedRoute for policy-based Route resources.
+   * 
+ * + * string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for kind. + */ + com.google.protobuf.ByteString getKindBytes(); + + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.TargetCase getTargetCase(); + + com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.NextHopCase getNextHopCase(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingProto.java new file mode 100644 index 000000000000..4b0399b18b84 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyBasedRoutingProto.java @@ -0,0 +1,379 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/policy_based_routing.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public final class PolicyBasedRoutingProto extends com.google.protobuf.GeneratedFile { + private PolicyBasedRoutingProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyBasedRoutingProto"); + } + + 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_networkconnectivity_v1beta_PolicyBasedRoute_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_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" + + "Bgoogle/cloud/networkconnectivity/v1beta/policy_based_routing.proto\022\'google.clo" + + "ud.networkconnectivity.v1beta\032\034google/ap" + + "i/annotations.proto\032\027google/api/client.p" + + "roto\032\037google/api/field_behavior.proto\032\031g" + + "oogle/api/resource.proto\0324google/cloud/networkconnectivity/v1beta/common.proto\032#" + + "google/longrunning/operations.proto\032\033goo" + + "gle/protobuf/empty.proto\032\037google/protobuf/timestamp.proto\"\202\017\n" + + "\020PolicyBasedRoute\022h\n" + + "\017virtual_machine\030\022 \001(\0132H.google.cloud.n" + + "etworkconnectivity.v1beta.PolicyBasedRoute.VirtualMachineB\003\340A\001H\000\022x\n" + + "\027interconnect_attachment\030\t \001(\0132P.google.cloud.network" + + "connectivity.v1beta.PolicyBasedRoute.InterconnectAttachmentB\003\340A\001H\000\022\036\n" + + "\017next_hop_ilb_ip\030\014 \001(\tB\003\340A\001H\001\022k\n" + + "\025next_hop_other_routes\030\025 \001(\0162E.google.cloud.networkconnecti" + + "vity.v1beta.PolicyBasedRoute.OtherRoutesB\003\340A\001H\001\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\005\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022U\n" + + "\006labels\030\004 \003(\0132E.goog" + + "le.cloud.networkconnectivity.v1beta.PolicyBasedRoute.LabelsEntry\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\0227\n" + + "\007network\030\006 \001(\tB&\340A\002\372A \n" + + "\036compute.googleapis.com/Network\022U\n" + + "\006filter\030\n" + + " \001(\0132@.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute.FilterB\003\340A\002\022\025\n" + + "\010priority\030\013 \001(\005B\003\340A\001\022Y\n" + + "\010warnings\030\016 \003(\0132B.go" + + "ogle.cloud.networkconnectivity.v1beta.PolicyBasedRoute.WarningsB\003\340A\003\022\026\n" + + "\tself_link\030\017 \001(\tB\003\340A\003\022\021\n" + + "\004kind\030\020 \001(\tB\003\340A\003\032#\n" + + "\016VirtualMachine\022\021\n" + + "\004tags\030\001 \003(\tB\003\340A\001\032-\n" + + "\026InterconnectAttachment\022\023\n" + + "\006region\030\001 \001(\tB\003\340A\001\032\215\002\n" + + "\006Filter\022\030\n" + + "\013ip_protocol\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tsrc_range\030\002 \001(\tB\003\340A\001\022\027\n\n" + + "dest_range\030\003 \001(\tB\003\340A\001\022o\n" + + "\020protocol_version\030\006 \001(\0162P.google.clo" + + "ud.networkconnectivity.v1beta.PolicyBasedRoute.Filter.ProtocolVersionB\003\340A\002\"G\n" + + "\017ProtocolVersion\022 \n" + + "\034PROTOCOL_VERSION_UNSPECIFIED\020\000\022\010\n" + + "\004IPV4\020\001\022\010\n" + + "\004IPV6\020\002\032\351\002\n" + + "\010Warnings\022Z\n" + + "\004code\030\001 \001(\0162G.google.cloud.networkcon" + + "nectivity.v1beta.PolicyBasedRoute.Warnings.CodeB\003\340A\003\022_\n" + + "\004data\030\002 \003(\0132L.google.clou" + + "d.networkconnectivity.v1beta.PolicyBasedRoute.Warnings.DataEntryB\003\340A\003\022\034\n" + + "\017warning_message\030\003 \001(\tB\003\340A\003\032+\n" + + "\tDataEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"U\n" + + "\004Code\022\027\n" + + "\023WARNING_UNSPECIFIED\020\000\022\027\n" + + "\023RESOURCE_NOT_ACTIVE\020\001\022\033\n" + + "\027RESOURCE_BEING_MODIFIED\020\002\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"@\n" + + "\013OtherRoutes\022\034\n" + + "\030OTHER_ROUTES_UNSPECIFIED\020\000\022\023\n" + + "\017DEFAULT_ROUTING\020\001:\205\001\352A\201\001\n" + + "3networkconnectivity.googleapis.com/PolicyBasedR" + + "oute\022Jprojects/{project}/locations/globa" + + "l/PolicyBasedRoutes/{policy_based_route}B\010\n" + + "\006targetB\n\n" + + "\010next_hop\"\242\001\n" + + "\034ListPolicyBasedRoutesRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\016\n" + + "\006filter\030\004 \001(\t\022\020\n" + + "\010order_by\030\005 \001(\t\"\245\001\n" + + "\035ListPolicyBasedRoutesResponse\022V\n" + + "\023policy_based_routes\030\001" + + " \003(\01329.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"g\n" + + "\032GetPolicyBasedRouteRequest\022I\n" + + "\004name\030\001 \001(\tB;\340A\002\372A5\n" + + "3networkconnectivity.googleapis.com/PolicyBasedRoute\"\363\001\n" + + "\035CreatePolicyBasedRouteRequest\0229\n" + + "\006parent\030\001 \001(\tB)\340A\002\372A#\n" + + "!locations.googleapis.com/Location\022\"\n" + + "\025policy_based_route_id\030\002 \001(\tB\003\340A\002\022Z\n" + + "\022policy_based_route\030\003 \001(\01329.google.cloud.network" + + "connectivity.v1beta.PolicyBasedRouteB\003\340A\002\022\027\n\n" + + "request_id\030\004 \001(\tB\003\340A\001\"\203\001\n" + + "\035DeletePolicyBasedRouteRequest\022I\n" + + "\004name\030\001 \001(\tB;\340A\002\372A5\n" + + "3networkconnectivity.googleapis.com/PolicyBasedRoute\022\027\n\n" + + "request_id\030\002 \001(\tB\003\340A\0012\213\t\n" + + "\031PolicyBasedRoutingService\022\367\001\n" + + "\025ListPolicyBasedRoutes\022E.google.cloud.networkc" + + "onnectivity.v1beta.ListPolicyBasedRoutesRequest\032F.google.cloud.networkconnectivi" + + "ty.v1beta.ListPolicyBasedRoutesResponse\"" + + "O\332A\006parent\202\323\344\223\002@\022>/v1beta/{parent=projec" + + "ts/*/locations/global}/policyBasedRoutes\022\344\001\n" + + "\023GetPolicyBasedRoute\022C.google.cloud.networkconnectivity.v1beta.GetPolicyBase" + + "dRouteRequest\0329.google.cloud.networkconn" + + "ectivity.v1beta.PolicyBasedRoute\"M\332A\004nam" + + "e\202\323\344\223\002@\022>/v1beta/{name=projects/*/locations/global/policyBasedRoutes/*}\022\266\002\n" + + "\026CreatePolicyBasedRoute\022F.google.cloud.networ" + + "kconnectivity.v1beta.CreatePolicyBasedRo" + + "uteRequest\032\035.google.longrunning.Operation\"\264\001\312A%\n" + + "\020PolicyBasedRoute\022\021OperationMetadata\332A/parent,policy_based_route,policy_" + + "based_route_id\202\323\344\223\002T\">/v1beta/{parent=pr" + + "ojects/*/locations/global}/policyBasedRoutes:\022policy_based_route\022\373\001\n" + + "\026DeletePolicyBasedRoute\022F.google.cloud.networkconnec" + + "tivity.v1beta.DeletePolicyBasedRouteRequest\032\035.google.longrunning.Operation\"z\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadat" + + "a\332A\004name\202\323\344\223\002@*>/v1beta/{name=projects/*" + + "/locations/global/policyBasedRoutes/*}\032V" + + "\312A\"networkconnectivity.googleapis.com\322A." + + "https://www.googleapis.com/auth/cloud-platformB\250\002\n" + + "+com.google.cloud.networkconnectivity.v1betaB\027PolicyBasedRoutingProtoP" + + "\001Z]cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;netwo" + + "rkconnectivitypb\252\002\'Google.Cloud.NetworkC" + + "onnectivity.V1Beta\312\002\'Google\\Cloud\\Networ" + + "kConnectivity\\V1beta\352\002*Google::Cloud::NetworkConnectivity::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.networkconnectivity.v1beta.CommonProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor, + new java.lang.String[] { + "VirtualMachine", + "InterconnectAttachment", + "NextHopIlbIp", + "NextHopOtherRoutes", + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Network", + "Filter", + "Priority", + "Warnings", + "SelfLink", + "Kind", + "Target", + "NextHop", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor + .getNestedType(0); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_VirtualMachine_descriptor, + new java.lang.String[] { + "Tags", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor + .getNestedType(1); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_InterconnectAttachment_descriptor, + new java.lang.String[] { + "Region", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor + .getNestedType(2); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Filter_descriptor, + new java.lang.String[] { + "IpProtocol", "SrcRange", "DestRange", "ProtocolVersion", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor + .getNestedType(3); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor, + new java.lang.String[] { + "Code", "Data", "WarningMessage", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_descriptor + .getNestedType(0); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_Warnings_DataEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_LabelsEntry_descriptor = + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_descriptor + .getNestedType(4); + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_PolicyBasedRoute_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_ListPolicyBasedRoutesResponse_descriptor, + new java.lang.String[] { + "PolicyBasedRoutes", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_GetPolicyBasedRouteRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_CreatePolicyBasedRouteRequest_descriptor, + new java.lang.String[] { + "Parent", "PolicyBasedRouteId", "PolicyBasedRoute", "RequestId", + }); + internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkconnectivity_v1beta_DeletePolicyBasedRouteRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.networkconnectivity.v1beta.CommonProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyMode.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyMode.java new file mode 100644 index 000000000000..4ebae8ad01da --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PolicyMode.java @@ -0,0 +1,172 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * This enum controls the policy mode used in a hub.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.PolicyMode} + */ +@com.google.protobuf.Generated +public enum PolicyMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Policy mode is unspecified. It defaults to PRESET
+   * with preset_topology = MESH.
+   * 
+ * + * POLICY_MODE_UNSPECIFIED = 0; + */ + POLICY_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * Hub uses one of the preset topologies.
+   * 
+ * + * PRESET = 1; + */ + PRESET(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyMode"); + } + + /** + * + * + *
+   * Policy mode is unspecified. It defaults to PRESET
+   * with preset_topology = MESH.
+   * 
+ * + * POLICY_MODE_UNSPECIFIED = 0; + */ + public static final int POLICY_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Hub uses one of the preset topologies.
+   * 
+ * + * PRESET = 1; + */ + public static final int PRESET_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PolicyMode 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 PolicyMode forNumber(int value) { + switch (value) { + case 0: + return POLICY_MODE_UNSPECIFIED; + case 1: + return PRESET; + 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 PolicyMode findValueByNumber(int number) { + return PolicyMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor() + .getEnumTypes() + .get(3); + } + + private static final PolicyMode[] VALUES = values(); + + public static PolicyMode 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 PolicyMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PolicyMode) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PresetTopology.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PresetTopology.java new file mode 100644 index 000000000000..dc40b9810a03 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PresetTopology.java @@ -0,0 +1,226 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The list of available preset topologies.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.PresetTopology} + */ +@com.google.protobuf.Generated +public enum PresetTopology implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Preset topology is unspecified. When policy_mode = PRESET,
+   * it defaults to MESH.
+   * 
+ * + * PRESET_TOPOLOGY_UNSPECIFIED = 0; + */ + PRESET_TOPOLOGY_UNSPECIFIED(0), + /** + * + * + *
+   * Mesh topology is implemented. Group `default` is automatically created.
+   * All spokes in the hub are added to group `default`.
+   * 
+ * + * MESH = 2; + */ + MESH(2), + /** + * + * + *
+   * Star topology is implemented. Two groups, `center` and `edge`, are
+   * automatically created along with hub creation. Spokes have to join one of
+   * the groups during creation.
+   * 
+ * + * STAR = 3; + */ + STAR(3), + /** + * + * + *
+   * Hybrid inspection has 4 groups ('non-prod', 'prod', 'services', and
+   * 'untrusted') that are automatically created along with hub creation.
+   * 
+ * + * HYBRID_INSPECTION = 4; + */ + HYBRID_INSPECTION(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PresetTopology"); + } + + /** + * + * + *
+   * Preset topology is unspecified. When policy_mode = PRESET,
+   * it defaults to MESH.
+   * 
+ * + * PRESET_TOPOLOGY_UNSPECIFIED = 0; + */ + public static final int PRESET_TOPOLOGY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Mesh topology is implemented. Group `default` is automatically created.
+   * All spokes in the hub are added to group `default`.
+   * 
+ * + * MESH = 2; + */ + public static final int MESH_VALUE = 2; + + /** + * + * + *
+   * Star topology is implemented. Two groups, `center` and `edge`, are
+   * automatically created along with hub creation. Spokes have to join one of
+   * the groups during creation.
+   * 
+ * + * STAR = 3; + */ + public static final int STAR_VALUE = 3; + + /** + * + * + *
+   * Hybrid inspection has 4 groups ('non-prod', 'prod', 'services', and
+   * 'untrusted') that are automatically created along with hub creation.
+   * 
+ * + * HYBRID_INSPECTION = 4; + */ + public static final int HYBRID_INSPECTION_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 PresetTopology 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 PresetTopology forNumber(int value) { + switch (value) { + case 0: + return PRESET_TOPOLOGY_UNSPECIFIED; + case 2: + return MESH; + case 3: + return STAR; + case 4: + return HYBRID_INSPECTION; + 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 PresetTopology findValueByNumber(int number) { + return PresetTopology.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor() + .getEnumTypes() + .get(4); + } + + private static final PresetTopology[] VALUES = values(); + + public static PresetTopology 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 PresetTopology(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PresetTopology) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatus.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatus.java new file mode 100644 index 000000000000..274c90de465b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatus.java @@ -0,0 +1,2006 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The status of one or more propagated Private Service Connect connections in a
+ * hub.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PscPropagationStatus} + */ +@com.google.protobuf.Generated +public final class PscPropagationStatus extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.PscPropagationStatus) + PscPropagationStatusOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PscPropagationStatus"); + } + + // Use PscPropagationStatus.newBuilder() to construct. + private PscPropagationStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PscPropagationStatus() { + sourceSpoke_ = ""; + sourceGroup_ = ""; + sourceForwardingRule_ = ""; + targetSpoke_ = ""; + targetGroup_ = ""; + code_ = 0; + message_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.class, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder.class); + } + + /** + * + * + *
+   * The Code enum represents the state of the Private Service Connect
+   * propagation.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code} + */ + public enum Code implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The code is unspecified.
+     * 
+ * + * CODE_UNSPECIFIED = 0; + */ + CODE_UNSPECIFIED(0), + /** + * + * + *
+     * The propagated Private Service Connect connection is ready.
+     * 
+ * + * READY = 1; + */ + READY(1), + /** + * + * + *
+     * The Private Service Connect connection is propagating. This is a
+     * transient state.
+     * 
+ * + * PROPAGATING = 2; + */ + PROPAGATING(2), + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the VPC
+     * network or the project of the target spoke has exceeded the connection
+     * limit set by the producer.
+     * 
+ * + * ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; + */ + ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED(3), + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the NAT
+     * IP subnet space has been exhausted. It is equivalent to the `Needs
+     * attention` status of the Private Service Connect connection. See
+     * https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses.
+     * 
+ * + * ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; + */ + ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED(4), + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the
+     * `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the
+     * producer VPC network has been exceeded.
+     * 
+ * + * ERROR_PRODUCER_QUOTA_EXCEEDED = 5; + */ + ERROR_PRODUCER_QUOTA_EXCEEDED(5), + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the
+     * `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer
+     * VPC network has been exceeded.
+     * 
+ * + * ERROR_CONSUMER_QUOTA_EXCEEDED = 6; + */ + ERROR_CONSUMER_QUOTA_EXCEEDED(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Code"); + } + + /** + * + * + *
+     * The code is unspecified.
+     * 
+ * + * CODE_UNSPECIFIED = 0; + */ + public static final int CODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The propagated Private Service Connect connection is ready.
+     * 
+ * + * READY = 1; + */ + public static final int READY_VALUE = 1; + + /** + * + * + *
+     * The Private Service Connect connection is propagating. This is a
+     * transient state.
+     * 
+ * + * PROPAGATING = 2; + */ + public static final int PROPAGATING_VALUE = 2; + + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the VPC
+     * network or the project of the target spoke has exceeded the connection
+     * limit set by the producer.
+     * 
+ * + * ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; + */ + public static final int ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED_VALUE = 3; + + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the NAT
+     * IP subnet space has been exhausted. It is equivalent to the `Needs
+     * attention` status of the Private Service Connect connection. See
+     * https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses.
+     * 
+ * + * ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; + */ + public static final int ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED_VALUE = 4; + + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the
+     * `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the
+     * producer VPC network has been exceeded.
+     * 
+ * + * ERROR_PRODUCER_QUOTA_EXCEEDED = 5; + */ + public static final int ERROR_PRODUCER_QUOTA_EXCEEDED_VALUE = 5; + + /** + * + * + *
+     * The Private Service Connect connection propagation failed because the
+     * `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer
+     * VPC network has been exceeded.
+     * 
+ * + * ERROR_CONSUMER_QUOTA_EXCEEDED = 6; + */ + public static final int ERROR_CONSUMER_QUOTA_EXCEEDED_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 Code 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 Code forNumber(int value) { + switch (value) { + case 0: + return CODE_UNSPECIFIED; + case 1: + return READY; + case 2: + return PROPAGATING; + case 3: + return ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED; + case 4: + return ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED; + case 5: + return ERROR_PRODUCER_QUOTA_EXCEEDED; + case 6: + return ERROR_CONSUMER_QUOTA_EXCEEDED; + 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 Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Code[] VALUES = values(); + + public static Code 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 Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code) + } + + public static final int SOURCE_SPOKE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceSpoke_ = ""; + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule belongs to.
+   * 
+ * + * string source_spoke = 1; + * + * @return The sourceSpoke. + */ + @java.lang.Override + public java.lang.String getSourceSpoke() { + java.lang.Object ref = sourceSpoke_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceSpoke_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule belongs to.
+   * 
+ * + * string source_spoke = 1; + * + * @return The bytes for sourceSpoke. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceSpokeBytes() { + java.lang.Object ref = sourceSpoke_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_GROUP_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceGroup_ = ""; + + /** + * + * + *
+   * The name of the group that the source spoke belongs to.
+   * 
+ * + * string source_group = 2; + * + * @return The sourceGroup. + */ + @java.lang.Override + public java.lang.String getSourceGroup() { + java.lang.Object ref = sourceGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGroup_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the group that the source spoke belongs to.
+   * 
+ * + * string source_group = 2; + * + * @return The bytes for sourceGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceGroupBytes() { + java.lang.Object ref = sourceGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FORWARDING_RULE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceForwardingRule_ = ""; + + /** + * + * + *
+   * The name of the forwarding rule exported to the hub.
+   * 
+ * + * string source_forwarding_rule = 3; + * + * @return The sourceForwardingRule. + */ + @java.lang.Override + public java.lang.String getSourceForwardingRule() { + java.lang.Object ref = sourceForwardingRule_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceForwardingRule_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the forwarding rule exported to the hub.
+   * 
+ * + * string source_forwarding_rule = 3; + * + * @return The bytes for sourceForwardingRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceForwardingRuleBytes() { + java.lang.Object ref = sourceForwardingRule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceForwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_SPOKE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetSpoke_ = ""; + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule propagates to.
+   * 
+ * + * string target_spoke = 4; + * + * @return The targetSpoke. + */ + @java.lang.Override + public java.lang.String getTargetSpoke() { + java.lang.Object ref = targetSpoke_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSpoke_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule propagates to.
+   * 
+ * + * string target_spoke = 4; + * + * @return The bytes for targetSpoke. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetSpokeBytes() { + java.lang.Object ref = targetSpoke_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_GROUP_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetGroup_ = ""; + + /** + * + * + *
+   * The name of the group that the target spoke belongs to.
+   * 
+ * + * string target_group = 5; + * + * @return The targetGroup. + */ + @java.lang.Override + public java.lang.String getTargetGroup() { + java.lang.Object ref = targetGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetGroup_ = s; + return s; + } + } + + /** + * + * + *
+   * The name of the group that the target spoke belongs to.
+   * 
+ * + * string target_group = 5; + * + * @return The bytes for targetGroup. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetGroupBytes() { + java.lang.Object ref = targetGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_FIELD_NUMBER = 6; + private int code_ = 0; + + /** + * + * + *
+   * The propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+   * The propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code result = + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + + /** + * + * + *
+   * The human-readable summary of the Private Service Connect connection
+   * propagation status.
+   * 
+ * + * string message = 7; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + + /** + * + * + *
+   * The human-readable summary of the Private Service Connect connection
+   * propagation status.
+   * 
+ * + * string message = 7; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSpoke_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, sourceSpoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceGroup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, sourceGroup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceForwardingRule_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sourceForwardingRule_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetSpoke_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, targetSpoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetGroup_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, targetGroup_); + } + if (code_ + != com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceSpoke_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sourceSpoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceGroup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sourceGroup_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sourceForwardingRule_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sourceForwardingRule_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetSpoke_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, targetSpoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetGroup_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, targetGroup_); + } + if (code_ + != com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, message_); + } + 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.networkconnectivity.v1beta.PscPropagationStatus)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus other = + (com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus) obj; + + if (!getSourceSpoke().equals(other.getSourceSpoke())) return false; + if (!getSourceGroup().equals(other.getSourceGroup())) return false; + if (!getSourceForwardingRule().equals(other.getSourceForwardingRule())) return false; + if (!getTargetSpoke().equals(other.getTargetSpoke())) return false; + if (!getTargetGroup().equals(other.getTargetGroup())) return false; + if (code_ != other.code_) return false; + if (!getMessage().equals(other.getMessage())) 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) + SOURCE_SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSourceSpoke().hashCode(); + hash = (37 * hash) + SOURCE_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getSourceGroup().hashCode(); + hash = (37 * hash) + SOURCE_FORWARDING_RULE_FIELD_NUMBER; + hash = (53 * hash) + getSourceForwardingRule().hashCode(); + hash = (37 * hash) + TARGET_SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getTargetSpoke().hashCode(); + hash = (37 * hash) + TARGET_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getTargetGroup().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus 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.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus 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.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The status of one or more propagated Private Service Connect connections in a
+   * hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.PscPropagationStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.PscPropagationStatus) + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.class, + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourceSpoke_ = ""; + sourceGroup_ = ""; + sourceForwardingRule_ = ""; + targetSpoke_ = ""; + targetGroup_ = ""; + code_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_PscPropagationStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus build() { + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus buildPartial() { + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus result = + new com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sourceSpoke_ = sourceSpoke_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sourceGroup_ = sourceGroup_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sourceForwardingRule_ = sourceForwardingRule_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.targetSpoke_ = targetSpoke_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.targetGroup_ = targetGroup_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.message_ = message_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.getDefaultInstance()) + return this; + if (!other.getSourceSpoke().isEmpty()) { + sourceSpoke_ = other.sourceSpoke_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSourceGroup().isEmpty()) { + sourceGroup_ = other.sourceGroup_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSourceForwardingRule().isEmpty()) { + sourceForwardingRule_ = other.sourceForwardingRule_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTargetSpoke().isEmpty()) { + targetSpoke_ = other.targetSpoke_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getTargetGroup().isEmpty()) { + targetGroup_ = other.targetGroup_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sourceSpoke_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + sourceGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + sourceForwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + targetSpoke_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + targetGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + code_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sourceSpoke_ = ""; + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule belongs to.
+     * 
+ * + * string source_spoke = 1; + * + * @return The sourceSpoke. + */ + public java.lang.String getSourceSpoke() { + java.lang.Object ref = sourceSpoke_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceSpoke_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule belongs to.
+     * 
+ * + * string source_spoke = 1; + * + * @return The bytes for sourceSpoke. + */ + public com.google.protobuf.ByteString getSourceSpokeBytes() { + java.lang.Object ref = sourceSpoke_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule belongs to.
+     * 
+ * + * string source_spoke = 1; + * + * @param value The sourceSpoke to set. + * @return This builder for chaining. + */ + public Builder setSourceSpoke(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceSpoke_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule belongs to.
+     * 
+ * + * string source_spoke = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceSpoke() { + sourceSpoke_ = getDefaultInstance().getSourceSpoke(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule belongs to.
+     * 
+ * + * string source_spoke = 1; + * + * @param value The bytes for sourceSpoke to set. + * @return This builder for chaining. + */ + public Builder setSourceSpokeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceSpoke_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object sourceGroup_ = ""; + + /** + * + * + *
+     * The name of the group that the source spoke belongs to.
+     * 
+ * + * string source_group = 2; + * + * @return The sourceGroup. + */ + public java.lang.String getSourceGroup() { + java.lang.Object ref = sourceGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the group that the source spoke belongs to.
+     * 
+ * + * string source_group = 2; + * + * @return The bytes for sourceGroup. + */ + public com.google.protobuf.ByteString getSourceGroupBytes() { + java.lang.Object ref = sourceGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the group that the source spoke belongs to.
+     * 
+ * + * string source_group = 2; + * + * @param value The sourceGroup to set. + * @return This builder for chaining. + */ + public Builder setSourceGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceGroup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the group that the source spoke belongs to.
+     * 
+ * + * string source_group = 2; + * + * @return This builder for chaining. + */ + public Builder clearSourceGroup() { + sourceGroup_ = getDefaultInstance().getSourceGroup(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the group that the source spoke belongs to.
+     * 
+ * + * string source_group = 2; + * + * @param value The bytes for sourceGroup to set. + * @return This builder for chaining. + */ + public Builder setSourceGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceGroup_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object sourceForwardingRule_ = ""; + + /** + * + * + *
+     * The name of the forwarding rule exported to the hub.
+     * 
+ * + * string source_forwarding_rule = 3; + * + * @return The sourceForwardingRule. + */ + public java.lang.String getSourceForwardingRule() { + java.lang.Object ref = sourceForwardingRule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceForwardingRule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the forwarding rule exported to the hub.
+     * 
+ * + * string source_forwarding_rule = 3; + * + * @return The bytes for sourceForwardingRule. + */ + public com.google.protobuf.ByteString getSourceForwardingRuleBytes() { + java.lang.Object ref = sourceForwardingRule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceForwardingRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the forwarding rule exported to the hub.
+     * 
+ * + * string source_forwarding_rule = 3; + * + * @param value The sourceForwardingRule to set. + * @return This builder for chaining. + */ + public Builder setSourceForwardingRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceForwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the forwarding rule exported to the hub.
+     * 
+ * + * string source_forwarding_rule = 3; + * + * @return This builder for chaining. + */ + public Builder clearSourceForwardingRule() { + sourceForwardingRule_ = getDefaultInstance().getSourceForwardingRule(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the forwarding rule exported to the hub.
+     * 
+ * + * string source_forwarding_rule = 3; + * + * @param value The bytes for sourceForwardingRule to set. + * @return This builder for chaining. + */ + public Builder setSourceForwardingRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceForwardingRule_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object targetSpoke_ = ""; + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule propagates to.
+     * 
+ * + * string target_spoke = 4; + * + * @return The targetSpoke. + */ + public java.lang.String getTargetSpoke() { + java.lang.Object ref = targetSpoke_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetSpoke_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule propagates to.
+     * 
+ * + * string target_spoke = 4; + * + * @return The bytes for targetSpoke. + */ + public com.google.protobuf.ByteString getTargetSpokeBytes() { + java.lang.Object ref = targetSpoke_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetSpoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule propagates to.
+     * 
+ * + * string target_spoke = 4; + * + * @param value The targetSpoke to set. + * @return This builder for chaining. + */ + public Builder setTargetSpoke(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetSpoke_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule propagates to.
+     * 
+ * + * string target_spoke = 4; + * + * @return This builder for chaining. + */ + public Builder clearTargetSpoke() { + targetSpoke_ = getDefaultInstance().getTargetSpoke(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the spoke that the source forwarding rule propagates to.
+     * 
+ * + * string target_spoke = 4; + * + * @param value The bytes for targetSpoke to set. + * @return This builder for chaining. + */ + public Builder setTargetSpokeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetSpoke_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object targetGroup_ = ""; + + /** + * + * + *
+     * The name of the group that the target spoke belongs to.
+     * 
+ * + * string target_group = 5; + * + * @return The targetGroup. + */ + public java.lang.String getTargetGroup() { + java.lang.Object ref = targetGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The name of the group that the target spoke belongs to.
+     * 
+ * + * string target_group = 5; + * + * @return The bytes for targetGroup. + */ + public com.google.protobuf.ByteString getTargetGroupBytes() { + java.lang.Object ref = targetGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The name of the group that the target spoke belongs to.
+     * 
+ * + * string target_group = 5; + * + * @param value The targetGroup to set. + * @return This builder for chaining. + */ + public Builder setTargetGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetGroup_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the group that the target spoke belongs to.
+     * 
+ * + * string target_group = 5; + * + * @return This builder for chaining. + */ + public Builder clearTargetGroup() { + targetGroup_ = getDefaultInstance().getTargetGroup(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * The name of the group that the target spoke belongs to.
+     * 
+ * + * string target_group = 5; + * + * @param value The bytes for targetGroup to set. + * @return This builder for chaining. + */ + public Builder setTargetGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetGroup_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int code_ = 0; + + /** + * + * + *
+     * The propagation status.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+     * The propagation status.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + code_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The propagation status.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code result = + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * The propagation status.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode( + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + code_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * The propagation status.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000020); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + + /** + * + * + *
+     * The human-readable summary of the Private Service Connect connection
+     * propagation status.
+     * 
+ * + * string message = 7; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The human-readable summary of the Private Service Connect connection
+     * propagation status.
+     * 
+ * + * string message = 7; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The human-readable summary of the Private Service Connect connection
+     * propagation status.
+     * 
+ * + * string message = 7; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * The human-readable summary of the Private Service Connect connection
+     * propagation status.
+     * 
+ * + * string message = 7; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * The human-readable summary of the Private Service Connect connection
+     * propagation status.
+     * 
+ * + * string message = 7; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.PscPropagationStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.PscPropagationStatus) + private static final com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus(); + } + + public static com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PscPropagationStatus 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.networkconnectivity.v1beta.PscPropagationStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatusOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatusOrBuilder.java new file mode 100644 index 000000000000..5443c3fb5274 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/PscPropagationStatusOrBuilder.java @@ -0,0 +1,212 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface PscPropagationStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.PscPropagationStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule belongs to.
+   * 
+ * + * string source_spoke = 1; + * + * @return The sourceSpoke. + */ + java.lang.String getSourceSpoke(); + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule belongs to.
+   * 
+ * + * string source_spoke = 1; + * + * @return The bytes for sourceSpoke. + */ + com.google.protobuf.ByteString getSourceSpokeBytes(); + + /** + * + * + *
+   * The name of the group that the source spoke belongs to.
+   * 
+ * + * string source_group = 2; + * + * @return The sourceGroup. + */ + java.lang.String getSourceGroup(); + + /** + * + * + *
+   * The name of the group that the source spoke belongs to.
+   * 
+ * + * string source_group = 2; + * + * @return The bytes for sourceGroup. + */ + com.google.protobuf.ByteString getSourceGroupBytes(); + + /** + * + * + *
+   * The name of the forwarding rule exported to the hub.
+   * 
+ * + * string source_forwarding_rule = 3; + * + * @return The sourceForwardingRule. + */ + java.lang.String getSourceForwardingRule(); + + /** + * + * + *
+   * The name of the forwarding rule exported to the hub.
+   * 
+ * + * string source_forwarding_rule = 3; + * + * @return The bytes for sourceForwardingRule. + */ + com.google.protobuf.ByteString getSourceForwardingRuleBytes(); + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule propagates to.
+   * 
+ * + * string target_spoke = 4; + * + * @return The targetSpoke. + */ + java.lang.String getTargetSpoke(); + + /** + * + * + *
+   * The name of the spoke that the source forwarding rule propagates to.
+   * 
+ * + * string target_spoke = 4; + * + * @return The bytes for targetSpoke. + */ + com.google.protobuf.ByteString getTargetSpokeBytes(); + + /** + * + * + *
+   * The name of the group that the target spoke belongs to.
+   * 
+ * + * string target_group = 5; + * + * @return The targetGroup. + */ + java.lang.String getTargetGroup(); + + /** + * + * + *
+   * The name of the group that the target spoke belongs to.
+   * 
+ * + * string target_group = 5; + * + * @return The bytes for targetGroup. + */ + com.google.protobuf.ByteString getTargetGroupBytes(); + + /** + * + * + *
+   * The propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + + /** + * + * + *
+   * The propagation status.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code code = 6; + * + * @return The code. + */ + com.google.cloud.networkconnectivity.v1beta.PscPropagationStatus.Code getCode(); + + /** + * + * + *
+   * The human-readable summary of the Private Service Connect connection
+   * propagation status.
+   * 
+ * + * string message = 7; + * + * @return The message. + */ + java.lang.String getMessage(); + + /** + * + * + *
+   * The human-readable summary of the Private Service Connect connection
+   * propagation status.
+   * 
+ * + * string message = 7; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequest.java new file mode 100644 index 000000000000..7f26e89f5ae3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequest.java @@ -0,0 +1,1643 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest} + */ +@com.google.protobuf.Generated +public final class QueryHubStatusRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) + QueryHubStatusRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryHubStatusRequest"); + } + + // Use QueryHubStatusRequest.newBuilder() to construct. + private QueryHubStatusRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryHubStatusRequest() { + name_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + groupBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.class, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * 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 hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. An expression that filters the list of results.
+   * The filter can be used to filter the results by the following fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * * `psc_propagation_status.message`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An expression that filters the list of results.
+   * The filter can be used to filter the results by the following fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * * `psc_propagation_status.message`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Sort the results in ascending order by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * If `group_by` is set, the value of the `order_by` field must be the
+   * same as or a subset of the `group_by` field.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Sort the results in ascending order by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * If `group_by` is set, the value of the `order_by` field must be the
+   * same as or a subset of the `group_by` field.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_BY_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object groupBy_ = ""; + + /** + * + * + *
+   * Optional. Aggregate the results by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The groupBy. + */ + @java.lang.Override + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Aggregate the results by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for groupBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, groupBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(groupBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, groupBy_); + } + 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.networkconnectivity.v1beta.QueryHubStatusRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest other = + (com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getGroupBy().equals(other.getGroupBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + GROUP_BY_FIELD_NUMBER; + hash = (53 * hash) + getGroupBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest 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.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest 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.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.class, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + groupBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest build() { + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest result = + new com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.groupBy_ = groupBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getGroupBy().isEmpty()) { + groupBy_ = other.groupBy_; + bitField0_ |= 0x00000020; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = 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 + case 50: + { + groupBy_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * 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 hub.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of results to return per page.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. An expression that filters the list of results.
+     * The filter can be used to filter the results by the following fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * * `psc_propagation_status.message`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the list of results.
+     * The filter can be used to filter the results by the following fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * * `psc_propagation_status.message`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An expression that filters the list of results.
+     * The filter can be used to filter the results by the following fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * * `psc_propagation_status.message`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the list of results.
+     * The filter can be used to filter the results by the following fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * * `psc_propagation_status.message`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An expression that filters the list of results.
+     * The filter can be used to filter the results by the following fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * * `psc_propagation_status.message`
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Sort the results in ascending order by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * If `group_by` is set, the value of the `order_by` field must be the
+     * same as or a subset of the `group_by` field.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Sort the results in ascending order by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * If `group_by` is set, the value of the `order_by` field must be the
+     * same as or a subset of the `group_by` field.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Sort the results in ascending order by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * If `group_by` is set, the value of the `order_by` field must be the
+     * same as or a subset of the `group_by` field.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sort the results in ascending order by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * If `group_by` is set, the value of the `order_by` field must be the
+     * same as or a subset of the `group_by` field.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Sort the results in ascending order by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * If `group_by` is set, the value of the `order_by` field must be the
+     * same as or a subset of the `group_by` field.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object groupBy_ = ""; + + /** + * + * + *
+     * Optional. Aggregate the results by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The groupBy. + */ + public java.lang.String getGroupBy() { + java.lang.Object ref = groupBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + groupBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Aggregate the results by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for groupBy. + */ + public com.google.protobuf.ByteString getGroupByBytes() { + java.lang.Object ref = groupBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + groupBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Aggregate the results by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + groupBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Aggregate the results by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGroupBy() { + groupBy_ = getDefaultInstance().getGroupBy(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Aggregate the results by the specified fields.
+     * A comma-separated list of any of these fields:
+     * * `psc_propagation_status.source_spoke`
+     * * `psc_propagation_status.source_group`
+     * * `psc_propagation_status.source_forwarding_rule`
+     * * `psc_propagation_status.target_spoke`
+     * * `psc_propagation_status.target_group`
+     * * `psc_propagation_status.code`
+     * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for groupBy to set. + * @return This builder for chaining. + */ + public Builder setGroupByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + groupBy_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) + private static final com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryHubStatusRequest 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.networkconnectivity.v1beta.QueryHubStatusRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequestOrBuilder.java new file mode 100644 index 000000000000..18257812dda9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusRequestOrBuilder.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface QueryHubStatusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The maximum number of results to return per page.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. The page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression that filters the list of results.
+   * The filter can be used to filter the results by the following fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * * `psc_propagation_status.message`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. An expression that filters the list of results.
+   * The filter can be used to filter the results by the following fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * * `psc_propagation_status.message`
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Sort the results in ascending order by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * If `group_by` is set, the value of the `order_by` field must be the
+   * same as or a subset of the `group_by` field.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Sort the results in ascending order by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * If `group_by` is set, the value of the `order_by` field must be the
+   * same as or a subset of the `group_by` field.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
+   * Optional. Aggregate the results by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The groupBy. + */ + java.lang.String getGroupBy(); + + /** + * + * + *
+   * Optional. Aggregate the results by the specified fields.
+   * A comma-separated list of any of these fields:
+   * * `psc_propagation_status.source_spoke`
+   * * `psc_propagation_status.source_group`
+   * * `psc_propagation_status.source_forwarding_rule`
+   * * `psc_propagation_status.target_spoke`
+   * * `psc_propagation_status.target_group`
+   * * `psc_propagation_status.code`
+   * 
+ * + * string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for groupBy. + */ + com.google.protobuf.ByteString getGroupByBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponse.java new file mode 100644 index 000000000000..0ab5b45c8576 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponse.java @@ -0,0 +1,1207 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse} + */ +@com.google.protobuf.Generated +public final class QueryHubStatusResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) + QueryHubStatusResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryHubStatusResponse"); + } + + // Use QueryHubStatusResponse.newBuilder() to construct. + private QueryHubStatusResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryHubStatusResponse() { + hubStatusEntries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.class, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.Builder.class); + } + + public static final int HUB_STATUS_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + hubStatusEntries_; + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getHubStatusEntriesList() { + return hubStatusEntries_; + } + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder> + getHubStatusEntriesOrBuilderList() { + return hubStatusEntries_; + } + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + @java.lang.Override + public int getHubStatusEntriesCount() { + return hubStatusEntries_.size(); + } + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry getHubStatusEntries(int index) { + return hubStatusEntries_.get(index); + } + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder + getHubStatusEntriesOrBuilder(int index) { + return hubStatusEntries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more 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; + } + } + + 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 < hubStatusEntries_.size(); i++) { + output.writeMessage(1, hubStatusEntries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < hubStatusEntries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hubStatusEntries_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse other = + (com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) obj; + + if (!getHubStatusEntriesList().equals(other.getHubStatusEntriesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHubStatusEntriesCount() > 0) { + hash = (37 * hash) + HUB_STATUS_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getHubStatusEntriesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse 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.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse 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.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.class, + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (hubStatusEntriesBuilder_ == null) { + hubStatusEntries_ = java.util.Collections.emptyList(); + } else { + hubStatusEntries_ = null; + hubStatusEntriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_QueryHubStatusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse build() { + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse result = + new com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse result) { + if (hubStatusEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + hubStatusEntries_ = java.util.Collections.unmodifiableList(hubStatusEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.hubStatusEntries_ = hubStatusEntries_; + } else { + result.hubStatusEntries_ = hubStatusEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + .getDefaultInstance()) return this; + if (hubStatusEntriesBuilder_ == null) { + if (!other.hubStatusEntries_.isEmpty()) { + if (hubStatusEntries_.isEmpty()) { + hubStatusEntries_ = other.hubStatusEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.addAll(other.hubStatusEntries_); + } + onChanged(); + } + } else { + if (!other.hubStatusEntries_.isEmpty()) { + if (hubStatusEntriesBuilder_.isEmpty()) { + hubStatusEntriesBuilder_.dispose(); + hubStatusEntriesBuilder_ = null; + hubStatusEntries_ = other.hubStatusEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + hubStatusEntriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetHubStatusEntriesFieldBuilder() + : null; + } else { + hubStatusEntriesBuilder_.addAllMessages(other.hubStatusEntries_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.parser(), + extensionRegistry); + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.add(m); + } else { + hubStatusEntriesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + hubStatusEntries_ = java.util.Collections.emptyList(); + + private void ensureHubStatusEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + hubStatusEntries_ = + new java.util.ArrayList( + hubStatusEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder> + hubStatusEntriesBuilder_; + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public java.util.List + getHubStatusEntriesList() { + if (hubStatusEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(hubStatusEntries_); + } else { + return hubStatusEntriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public int getHubStatusEntriesCount() { + if (hubStatusEntriesBuilder_ == null) { + return hubStatusEntries_.size(); + } else { + return hubStatusEntriesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry getHubStatusEntries( + int index) { + if (hubStatusEntriesBuilder_ == null) { + return hubStatusEntries_.get(index); + } else { + return hubStatusEntriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder setHubStatusEntries( + int index, com.google.cloud.networkconnectivity.v1beta.HubStatusEntry value) { + if (hubStatusEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.set(index, value); + onChanged(); + } else { + hubStatusEntriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder setHubStatusEntries( + int index, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder builderForValue) { + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + hubStatusEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder addHubStatusEntries( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry value) { + if (hubStatusEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.add(value); + onChanged(); + } else { + hubStatusEntriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder addHubStatusEntries( + int index, com.google.cloud.networkconnectivity.v1beta.HubStatusEntry value) { + if (hubStatusEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.add(index, value); + onChanged(); + } else { + hubStatusEntriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder addHubStatusEntries( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder builderForValue) { + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.add(builderForValue.build()); + onChanged(); + } else { + hubStatusEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder addHubStatusEntries( + int index, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder builderForValue) { + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + hubStatusEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder addAllHubStatusEntries( + java.lang.Iterable + values) { + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hubStatusEntries_); + onChanged(); + } else { + hubStatusEntriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder clearHubStatusEntries() { + if (hubStatusEntriesBuilder_ == null) { + hubStatusEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + hubStatusEntriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public Builder removeHubStatusEntries(int index) { + if (hubStatusEntriesBuilder_ == null) { + ensureHubStatusEntriesIsMutable(); + hubStatusEntries_.remove(index); + onChanged(); + } else { + hubStatusEntriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder + getHubStatusEntriesBuilder(int index) { + return internalGetHubStatusEntriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder + getHubStatusEntriesOrBuilder(int index) { + if (hubStatusEntriesBuilder_ == null) { + return hubStatusEntries_.get(index); + } else { + return hubStatusEntriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder> + getHubStatusEntriesOrBuilderList() { + if (hubStatusEntriesBuilder_ != null) { + return hubStatusEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(hubStatusEntries_); + } + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder + addHubStatusEntriesBuilder() { + return internalGetHubStatusEntriesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder + addHubStatusEntriesBuilder(int index) { + return internalGetHubStatusEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of hub status.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + public java.util.List + getHubStatusEntriesBuilderList() { + return internalGetHubStatusEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder> + internalGetHubStatusEntriesFieldBuilder() { + if (hubStatusEntriesBuilder_ == null) { + hubStatusEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry.Builder, + com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder>( + hubStatusEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + hubStatusEntries_ = null; + } + return hubStatusEntriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token for the next page of the response. To see more results,
+     * use this value as the page_token for your next request. If this value
+     * is empty, there are no more 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) + private static final com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryHubStatusResponse 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.networkconnectivity.v1beta.QueryHubStatusResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponseOrBuilder.java new file mode 100644 index 000000000000..a58c4a171b36 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/QueryHubStatusResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface QueryHubStatusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + java.util.List + getHubStatusEntriesList(); + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.HubStatusEntry getHubStatusEntries(int index); + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + int getHubStatusEntriesCount(); + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + java.util.List + getHubStatusEntriesOrBuilderList(); + + /** + * + * + *
+   * The list of hub status.
+   * 
+ * + * repeated .google.cloud.networkconnectivity.v1beta.HubStatusEntry hub_status_entries = 1; + * + */ + com.google.cloud.networkconnectivity.v1beta.HubStatusEntryOrBuilder getHubStatusEntriesOrBuilder( + int index); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * The token for the next page of the response. To see more results,
+   * use this value as the page_token for your next request. If this value
+   * is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequest.java new file mode 100644 index 000000000000..4dc68f81ccd0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequest.java @@ -0,0 +1,1294 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest} + */ +@com.google.protobuf.Generated +public final class RejectHubSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) + RejectHubSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RejectHubSpokeRequest"); + } + + // Use RejectHubSpokeRequest.newBuilder() to construct. + private RejectHubSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RejectHubSpokeRequest() { + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + details_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * 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 hub from which to reject the spoke.
+   * 
+ * + * + * 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 SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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; + } + } + + public static final int DETAILS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, details_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, requestId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, details_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getDetails().equals(other.getDetails())) 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) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest 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.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest 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.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + requestId_ = ""; + details_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.details_ = details_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub from which to reject the spoke.
+     * 
+ * + * + * 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 hub from which to reject the spoke.
+     * 
+ * + * + * 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 hub from which to reject the spoke.
+     * 
+ * + * + * 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 hub from which to reject the spoke.
+     * 
+ * + * + * 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 hub from which to reject the spoke.
+     * 
+ * + * + * 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 spokeUri_ = ""; + + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject from the hub.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + private java.lang.Object details_ = ""; + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectHubSpokeRequest 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.networkconnectivity.v1beta.RejectHubSpokeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..d47ef6230216 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeRequestOrBuilder.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RejectHubSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub from which to reject the spoke.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + + /** + * + * + *
+   * Required. The URI of the spoke to reject from the hub.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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(); + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + java.lang.String getDetails(); + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponse.java new file mode 100644 index 000000000000..a3effb192822 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponse.java @@ -0,0 +1,712 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse} + */ +@com.google.protobuf.Generated +public final class RejectHubSpokeResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) + RejectHubSpokeResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RejectHubSpokeResponse"); + } + + // Use RejectHubSpokeResponse.newBuilder() to construct. + private RejectHubSpokeResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RejectHubSpokeResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse.Builder.class); + } + + private int bitField0_; + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + 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.networkconnectivity.v1beta.RejectHubSpokeResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse other = + (com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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 (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse 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.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse 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.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse.class, + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectHubSpokeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse build() { + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse result = + new com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + .getDefaultInstance()) return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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(internalGetSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) + private static final com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectHubSpokeResponse 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.networkconnectivity.v1beta.RejectHubSpokeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponseOrBuilder.java new file mode 100644 index 000000000000..bf0d4f3578bc --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectHubSpokeResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RejectHubSpokeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequest.java new file mode 100644 index 000000000000..21b863b2d117 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequest.java @@ -0,0 +1,1499 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest} + */ +@com.google.protobuf.Generated +public final class RejectSpokeUpdateRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) + RejectSpokeUpdateRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RejectSpokeUpdateRequest"); + } + + // Use RejectSpokeUpdateRequest.newBuilder() to construct. + private RejectSpokeUpdateRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RejectSpokeUpdateRequest() { + name_ = ""; + spokeUri_ = ""; + spokeEtag_ = ""; + details_ = ""; + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.class, + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the hub to reject spoke update.
+   * 
+ * + * + * 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 hub to reject spoke update.
+   * 
+ * + * + * 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 SPOKE_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeUri_ = ""; + + /** + * + * + *
+   * Required. The URI of the spoke to reject update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + @java.lang.Override + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the spoke to reject update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPOKE_ETAG_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object spokeEtag_ = ""; + + /** + * + * + *
+   * Required. The etag of the spoke to reject update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + @java.lang.Override + public java.lang.String getSpokeEtag() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeEtag_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The etag of the spoke to reject update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeEtagBytes() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeEtag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAILS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object details_ = ""; + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + @java.lang.Override + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeEtag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, spokeEtag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(details_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, details_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, spokeUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spokeEtag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, spokeEtag_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(details_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, details_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, 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.networkconnectivity.v1beta.RejectSpokeUpdateRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest other = + (com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getSpokeUri().equals(other.getSpokeUri())) return false; + if (!getSpokeEtag().equals(other.getSpokeEtag())) return false; + if (!getDetails().equals(other.getDetails())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + SPOKE_URI_FIELD_NUMBER; + hash = (53 * hash) + getSpokeUri().hashCode(); + hash = (37 * hash) + SPOKE_ETAG_FIELD_NUMBER; + hash = (53 * hash) + getSpokeEtag().hashCode(); + hash = (37 * hash) + DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getDetails().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.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest 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.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest 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.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.class, + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + spokeUri_ = ""; + spokeEtag_ = ""; + details_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest build() { + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest result = + new com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spokeUri_ = spokeUri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.spokeEtag_ = spokeEtag_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.details_ = details_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSpokeUri().isEmpty()) { + spokeUri_ = other.spokeUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSpokeEtag().isEmpty()) { + spokeEtag_ = other.spokeEtag_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDetails().isEmpty()) { + details_ = other.details_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + spokeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + spokeEtag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + details_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The name of the hub to reject spoke update.
+     * 
+ * + * + * 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 hub to reject spoke update.
+     * 
+ * + * + * 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 hub to reject spoke update.
+     * 
+ * + * + * 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 hub to reject spoke update.
+     * 
+ * + * + * 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 hub to reject spoke update.
+     * 
+ * + * + * 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 spokeUri_ = ""; + + /** + * + * + *
+     * Required. The URI of the spoke to reject update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + public java.lang.String getSpokeUri() { + java.lang.Object ref = spokeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + public com.google.protobuf.ByteString getSpokeUriBytes() { + java.lang.Object ref = spokeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeUri() { + spokeUri_ = getDefaultInstance().getSpokeUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the spoke to reject update.
+     * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spokeUri to set. + * @return This builder for chaining. + */ + public Builder setSpokeUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object spokeEtag_ = ""; + + /** + * + * + *
+     * Required. The etag of the spoke to reject update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + public java.lang.String getSpokeEtag() { + java.lang.Object ref = spokeEtag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spokeEtag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The etag of the spoke to reject update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + public com.google.protobuf.ByteString getSpokeEtagBytes() { + java.lang.Object ref = spokeEtag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spokeEtag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The etag of the spoke to reject update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The spokeEtag to set. + * @return This builder for chaining. + */ + public Builder setSpokeEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spokeEtag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The etag of the spoke to reject update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSpokeEtag() { + spokeEtag_ = getDefaultInstance().getSpokeEtag(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The etag of the spoke to reject update.
+     * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for spokeEtag to set. + * @return This builder for chaining. + */ + public Builder setSpokeEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spokeEtag_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object details_ = ""; + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + public java.lang.String getDetails() { + java.lang.Object ref = details_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + details_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + public com.google.protobuf.ByteString getDetailsBytes() { + java.lang.Object ref = details_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + details_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The details to set. + * @return This builder for chaining. + */ + public Builder setDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDetails() { + details_ = getDefaultInstance().getDetails(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Additional information provided by the hub administrator.
+     * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for details to set. + * @return This builder for chaining. + */ + public Builder setDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + details_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) + private static final com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectSpokeUpdateRequest 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.networkconnectivity.v1beta.RejectSpokeUpdateRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequestOrBuilder.java new file mode 100644 index 000000000000..3a975f88a558 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateRequestOrBuilder.java @@ -0,0 +1,196 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RejectSpokeUpdateRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the hub to reject spoke update.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the hub to reject spoke update.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The URI of the spoke to reject update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The spokeUri. + */ + java.lang.String getSpokeUri(); + + /** + * + * + *
+   * Required. The URI of the spoke to reject update.
+   * 
+ * + * + * string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spokeUri. + */ + com.google.protobuf.ByteString getSpokeUriBytes(); + + /** + * + * + *
+   * Required. The etag of the spoke to reject update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The spokeEtag. + */ + java.lang.String getSpokeEtag(); + + /** + * + * + *
+   * Required. The etag of the spoke to reject update.
+   * 
+ * + * string spoke_etag = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for spokeEtag. + */ + com.google.protobuf.ByteString getSpokeEtagBytes(); + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The details. + */ + java.lang.String getDetails(); + + /** + * + * + *
+   * Optional. Additional information provided by the hub administrator.
+   * 
+ * + * string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for details. + */ + com.google.protobuf.ByteString getDetailsBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponse.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponse.java new file mode 100644 index 000000000000..eb09099356af --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponse.java @@ -0,0 +1,712 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The response for
+ * [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse} + */ +@com.google.protobuf.Generated +public final class RejectSpokeUpdateResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) + RejectSpokeUpdateResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RejectSpokeUpdateResponse"); + } + + // Use RejectSpokeUpdateResponse.newBuilder() to construct. + private RejectSpokeUpdateResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RejectSpokeUpdateResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse.class, + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse.Builder.class); + } + + private int bitField0_; + public static final int SPOKE_FIELD_NUMBER = 1; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSpoke()); + } + 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.networkconnectivity.v1beta.RejectSpokeUpdateResponse)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse other = + (com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) obj; + + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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 (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse 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.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse 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.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The response for
+   * [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate].
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse.class, + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RejectSpokeUpdateResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse build() { + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse result = + new com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + .getDefaultInstance()) return this; + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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(internalGetSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000001); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * The spoke that was operated on.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) + private static final com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RejectSpokeUpdateResponse 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.networkconnectivity.v1beta.RejectSpokeUpdateResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponseOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponseOrBuilder.java new file mode 100644 index 000000000000..289fa6678728 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RejectSpokeUpdateResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RejectSpokeUpdateResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * The spoke that was operated on.
+   * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 1; + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfile.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfile.java new file mode 100644 index 000000000000..dc6c7b70e0e4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfile.java @@ -0,0 +1,3771 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message describing RemoteTransportProfile object.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RemoteTransportProfile} + */ +@com.google.protobuf.Generated +public final class RemoteTransportProfile extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) + RemoteTransportProfileOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RemoteTransportProfile"); + } + + // Use RemoteTransportProfile.newBuilder() to construct. + private RemoteTransportProfile(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RemoteTransportProfile() { + name_ = ""; + description_ = ""; + provider_ = ""; + providerSite_ = ""; + supportedBandwidths_ = emptyIntList(); + sla_ = 0; + flow_ = 0; + orderState_ = 0; + displayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.class, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder.class); + } + + /** + * + * + *
+   * Bandwidth values that may be supported for a specific profile.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth} + */ + public enum Bandwidth implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified bandwidth.
+     * 
+ * + * BANDWIDTH_UNSPECIFIED = 0; + */ + BANDWIDTH_UNSPECIFIED(0), + /** + * + * + *
+     * 50 Megabits per second.
+     * 
+ * + * BPS_50M = 1; + */ + BPS_50M(1), + /** + * + * + *
+     * 100 Megabits per second.
+     * 
+ * + * BPS_100M = 2; + */ + BPS_100M(2), + /** + * + * + *
+     * 200 Megabits per second.
+     * 
+ * + * BPS_200M = 3; + */ + BPS_200M(3), + /** + * + * + *
+     * 300 Megabits per second.
+     * 
+ * + * BPS_300M = 4; + */ + BPS_300M(4), + /** + * + * + *
+     * 400 Megabits per second.
+     * 
+ * + * BPS_400M = 5; + */ + BPS_400M(5), + /** + * + * + *
+     * 500 Megabits per second.
+     * 
+ * + * BPS_500M = 6; + */ + BPS_500M(6), + /** + * + * + *
+     * 1 Gigabit per second.
+     * 
+ * + * BPS_1G = 7; + */ + BPS_1G(7), + /** + * + * + *
+     * 2 Gigabits per second.
+     * 
+ * + * BPS_2G = 8; + */ + BPS_2G(8), + /** + * + * + *
+     * 5 Gigabits per second.
+     * 
+ * + * BPS_5G = 9; + */ + BPS_5G(9), + /** + * + * + *
+     * 10 Gigabits per second.
+     * 
+ * + * BPS_10G = 10; + */ + BPS_10G(10), + /** + * + * + *
+     * 20 Gigabits per second.
+     * 
+ * + * BPS_20G = 11; + */ + BPS_20G(11), + /** + * + * + *
+     * 50 Gigabits per second.
+     * 
+ * + * BPS_50G = 12; + */ + BPS_50G(12), + /** + * + * + *
+     * 100 Gigabits per second.
+     * 
+ * + * BPS_100G = 13; + */ + BPS_100G(13), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bandwidth"); + } + + /** + * + * + *
+     * Unspecified bandwidth.
+     * 
+ * + * BANDWIDTH_UNSPECIFIED = 0; + */ + public static final int BANDWIDTH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * 50 Megabits per second.
+     * 
+ * + * BPS_50M = 1; + */ + public static final int BPS_50M_VALUE = 1; + + /** + * + * + *
+     * 100 Megabits per second.
+     * 
+ * + * BPS_100M = 2; + */ + public static final int BPS_100M_VALUE = 2; + + /** + * + * + *
+     * 200 Megabits per second.
+     * 
+ * + * BPS_200M = 3; + */ + public static final int BPS_200M_VALUE = 3; + + /** + * + * + *
+     * 300 Megabits per second.
+     * 
+ * + * BPS_300M = 4; + */ + public static final int BPS_300M_VALUE = 4; + + /** + * + * + *
+     * 400 Megabits per second.
+     * 
+ * + * BPS_400M = 5; + */ + public static final int BPS_400M_VALUE = 5; + + /** + * + * + *
+     * 500 Megabits per second.
+     * 
+ * + * BPS_500M = 6; + */ + public static final int BPS_500M_VALUE = 6; + + /** + * + * + *
+     * 1 Gigabit per second.
+     * 
+ * + * BPS_1G = 7; + */ + public static final int BPS_1G_VALUE = 7; + + /** + * + * + *
+     * 2 Gigabits per second.
+     * 
+ * + * BPS_2G = 8; + */ + public static final int BPS_2G_VALUE = 8; + + /** + * + * + *
+     * 5 Gigabits per second.
+     * 
+ * + * BPS_5G = 9; + */ + public static final int BPS_5G_VALUE = 9; + + /** + * + * + *
+     * 10 Gigabits per second.
+     * 
+ * + * BPS_10G = 10; + */ + public static final int BPS_10G_VALUE = 10; + + /** + * + * + *
+     * 20 Gigabits per second.
+     * 
+ * + * BPS_20G = 11; + */ + public static final int BPS_20G_VALUE = 11; + + /** + * + * + *
+     * 50 Gigabits per second.
+     * 
+ * + * BPS_50G = 12; + */ + public static final int BPS_50G_VALUE = 12; + + /** + * + * + *
+     * 100 Gigabits per second.
+     * 
+ * + * BPS_100G = 13; + */ + public static final int BPS_100G_VALUE = 13; + + 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 Bandwidth 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 Bandwidth forNumber(int value) { + switch (value) { + case 0: + return BANDWIDTH_UNSPECIFIED; + case 1: + return BPS_50M; + case 2: + return BPS_100M; + case 3: + return BPS_200M; + case 4: + return BPS_300M; + case 5: + return BPS_400M; + case 6: + return BPS_500M; + case 7: + return BPS_1G; + case 8: + return BPS_2G; + case 9: + return BPS_5G; + case 10: + return BPS_10G; + case 11: + return BPS_20G; + case 12: + return BPS_50G; + case 13: + return BPS_100G; + 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 Bandwidth findValueByNumber(int number) { + return Bandwidth.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Bandwidth[] VALUES = values(); + + public static Bandwidth 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 Bandwidth(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth) + } + + /** + * + * + *
+   * Availability class options.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability} + */ + public enum ServiceLevelAvailability implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified service level availability.
+     * 
+ * + * SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED = 0; + */ + SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED(0), + /** + * + * + *
+     * This represents a 99.9% service level on the availability of the
+     * configured connectivity.
+     * 
+ * + * HIGH = 1; + */ + HIGH(1), + /** + * + * + *
+     * This represents a 99.99% service level on the availability of the
+     * configured connectivity.
+     * 
+ * + * MAXIMUM = 2; + */ + MAXIMUM(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ServiceLevelAvailability"); + } + + /** + * + * + *
+     * Unspecified service level availability.
+     * 
+ * + * SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED = 0; + */ + public static final int SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * This represents a 99.9% service level on the availability of the
+     * configured connectivity.
+     * 
+ * + * HIGH = 1; + */ + public static final int HIGH_VALUE = 1; + + /** + * + * + *
+     * This represents a 99.99% service level on the availability of the
+     * configured connectivity.
+     * 
+ * + * MAXIMUM = 2; + */ + public static final int MAXIMUM_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 ServiceLevelAvailability 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 ServiceLevelAvailability forNumber(int value) { + switch (value) { + case 0: + return SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED; + case 1: + return HIGH; + case 2: + return MAXIMUM; + 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 ServiceLevelAvailability findValueByNumber(int number) { + return ServiceLevelAvailability.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ServiceLevelAvailability[] VALUES = values(); + + public static ServiceLevelAvailability 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 ServiceLevelAvailability(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability) + } + + /** + * + * + *
+   * Type of provisioning flows supported.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow} + */ + public enum KeyProvisioningFlow implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified key provisioning flow.
+     * 
+ * + * KEY_PROVISIONING_FLOW_UNSPECIFIED = 0; + */ + KEY_PROVISIONING_FLOW_UNSPECIFIED(0), + /** + * + * + *
+     * The activationKey field on the Transport must be included in a create or
+     * patch request to establish connectivity.
+     * 
+ * + * INPUT_ONLY = 1; + */ + INPUT_ONLY(1), + /** + * + * + *
+     * The generatedActivationKey field is populated and must be read from the
+     * resource and passed into the other provider.
+     * 
+ * + * OUTPUT_ONLY = 2; + */ + OUTPUT_ONLY(2), + /** + * + * + *
+     * Both activation key fields are allowed for establishing connectivity. If
+     * a key is input, the generated key is still present after provisioning is
+     * finished.
+     * 
+ * + * INPUT_OR_OUTPUT = 3; + */ + INPUT_OR_OUTPUT(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KeyProvisioningFlow"); + } + + /** + * + * + *
+     * Unspecified key provisioning flow.
+     * 
+ * + * KEY_PROVISIONING_FLOW_UNSPECIFIED = 0; + */ + public static final int KEY_PROVISIONING_FLOW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The activationKey field on the Transport must be included in a create or
+     * patch request to establish connectivity.
+     * 
+ * + * INPUT_ONLY = 1; + */ + public static final int INPUT_ONLY_VALUE = 1; + + /** + * + * + *
+     * The generatedActivationKey field is populated and must be read from the
+     * resource and passed into the other provider.
+     * 
+ * + * OUTPUT_ONLY = 2; + */ + public static final int OUTPUT_ONLY_VALUE = 2; + + /** + * + * + *
+     * Both activation key fields are allowed for establishing connectivity. If
+     * a key is input, the generated key is still present after provisioning is
+     * finished.
+     * 
+ * + * INPUT_OR_OUTPUT = 3; + */ + public static final int INPUT_OR_OUTPUT_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 KeyProvisioningFlow 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 KeyProvisioningFlow forNumber(int value) { + switch (value) { + case 0: + return KEY_PROVISIONING_FLOW_UNSPECIFIED; + case 1: + return INPUT_ONLY; + case 2: + return OUTPUT_ONLY; + case 3: + return INPUT_OR_OUTPUT; + 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 KeyProvisioningFlow findValueByNumber(int number) { + return KeyProvisioningFlow.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final KeyProvisioningFlow[] VALUES = values(); + + public static KeyProvisioningFlow 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 KeyProvisioningFlow(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow) + } + + /** + * + * + *
+   * State of the RemoteTransportProfile.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Not enough capacity for customers to order.
+     * 
+ * + * CLOSED = 1; + */ + CLOSED(1), + /** + * + * + *
+     * Enough capacity to fulfill an order.
+     * 
+ * + * OPEN = 2; + */ + OPEN(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Not enough capacity for customers to order.
+     * 
+ * + * CLOSED = 1; + */ + public static final int CLOSED_VALUE = 1; + + /** + * + * + *
+     * Enough capacity to fulfill an order.
+     * 
+ * + * OPEN = 2; + */ + public static final int OPEN_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 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 CLOSED; + case 2: + return OPEN; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.getDescriptor() + .getEnumTypes() + .get(3); + } + + 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.networkconnectivity.v1beta.RemoteTransportProfile.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the resource in the format of $provider-$site.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the resource in the format of $provider-$site.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_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(); + } + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @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(); + } + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @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; + } + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @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 DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Output only. Description of the profile.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Description of the profile.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object provider_ = ""; + + /** + * + * + *
+   * Output only. Name of the provider on the other end of this profile. E.g.
+   * “Amazon Web Services” or “Microsoft Azure”.
+   * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provider. + */ + @java.lang.Override + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Name of the provider on the other end of this profile. E.g.
+   * “Amazon Web Services” or “Microsoft Azure”.
+   * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provider. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDER_SITE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object providerSite_ = ""; + + /** + * + * + *
+   * Output only. If the profile is a Cloud Service Provider with compute
+   * resources, this is populated with the region where connectivity is being
+   * established. If the profile provides facility-level selection, this is an
+   * identity of the facility any connections on this profile are going through.
+   * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The providerSite. + */ + @java.lang.Override + public java.lang.String getProviderSite() { + java.lang.Object ref = providerSite_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerSite_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. If the profile is a Cloud Service Provider with compute
+   * resources, this is populated with the region where connectivity is being
+   * established. If the profile provides facility-level selection, this is an
+   * identity of the facility any connections on this profile are going through.
+   * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for providerSite. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProviderSiteBytes() { + java.lang.Object ref = providerSite_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerSite_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPPORTED_BANDWIDTHS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList supportedBandwidths_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth> + supportedBandwidths_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth>() { + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + convert(int from) { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + .forNumber(from); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + .UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedBandwidths. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth> + getSupportedBandwidthsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth>( + supportedBandwidths_, supportedBandwidths_converter_); + } + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedBandwidths. + */ + @java.lang.Override + public int getSupportedBandwidthsCount() { + return supportedBandwidths_.size(); + } + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedBandwidths at the given index. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + getSupportedBandwidths(int index) { + return supportedBandwidths_converter_.convert(supportedBandwidths_.getInt(index)); + } + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedBandwidths. + */ + @java.lang.Override + public java.util.List getSupportedBandwidthsValueList() { + return supportedBandwidths_; + } + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBandwidths at the given index. + */ + @java.lang.Override + public int getSupportedBandwidthsValue(int index) { + return supportedBandwidths_.getInt(index); + } + + private int supportedBandwidthsMemoizedSerializedSize; + + public static final int SLA_FIELD_NUMBER = 10; + private int sla_ = 0; + + /** + * + * + *
+   * Output only. Availability class that will be configured for this
+   * particular RemoteTransportProfile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for sla. + */ + @java.lang.Override + public int getSlaValue() { + return sla_; + } + + /** + * + * + *
+   * Output only. Availability class that will be configured for this
+   * particular RemoteTransportProfile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sla. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability + getSla() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability + result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.forNumber(sla_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.UNRECOGNIZED + : result; + } + + public static final int FLOW_FIELD_NUMBER = 11; + private int flow_ = 0; + + /** + * + * + *
+   * Output only. Type of provisioning flows supported by this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override + public int getFlowValue() { + return flow_; + } + + /** + * + * + *
+   * Output only. Type of provisioning flows supported by this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + getFlow() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .forNumber(flow_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .UNRECOGNIZED + : result; + } + + public static final int ORDER_STATE_FIELD_NUMBER = 12; + private int orderState_ = 0; + + /** + * + * + *
+   * Output only. Order state for this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for orderState. + */ + @java.lang.Override + public int getOrderStateValue() { + return orderState_; + } + + /** + * + * + *
+   * Output only. Order state for this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The orderState. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State getOrderState() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State.forNumber( + orderState_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State.UNRECOGNIZED + : result; + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
+   * Output only. Human readable name of this profile, used to identify this
+   * profile in the UI.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Human readable name of this profile, used to identify this
+   * profile in the UI.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, provider_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerSite_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, providerSite_); + } + if (getSupportedBandwidthsList().size() > 0) { + output.writeUInt32NoTag(74); + output.writeUInt32NoTag(supportedBandwidthsMemoizedSerializedSize); + } + for (int i = 0; i < supportedBandwidths_.size(); i++) { + output.writeEnumNoTag(supportedBandwidths_.getInt(i)); + } + if (sla_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, sla_); + } + if (flow_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .KEY_PROVISIONING_FLOW_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, flow_); + } + if (orderState_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, orderState_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, provider_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providerSite_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, providerSite_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedBandwidths_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + supportedBandwidths_.getInt(i)); + } + size += dataSize; + if (!getSupportedBandwidthsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + supportedBandwidthsMemoizedSerializedSize = dataSize; + } + if (sla_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, sla_); + } + if (flow_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .KEY_PROVISIONING_FLOW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, flow_); + } + if (orderState_ + != com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, orderState_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile other = + (com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) obj; + + if (!getName().equals(other.getName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getProvider().equals(other.getProvider())) return false; + if (!getProviderSite().equals(other.getProviderSite())) return false; + if (!supportedBandwidths_.equals(other.supportedBandwidths_)) return false; + if (sla_ != other.sla_) return false; + if (flow_ != other.flow_) return false; + if (orderState_ != other.orderState_) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getProvider().hashCode(); + hash = (37 * hash) + PROVIDER_SITE_FIELD_NUMBER; + hash = (53 * hash) + getProviderSite().hashCode(); + if (getSupportedBandwidthsCount() > 0) { + hash = (37 * hash) + SUPPORTED_BANDWIDTHS_FIELD_NUMBER; + hash = (53 * hash) + supportedBandwidths_.hashCode(); + } + hash = (37 * hash) + SLA_FIELD_NUMBER; + hash = (53 * hash) + sla_; + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + flow_; + hash = (37 * hash) + ORDER_STATE_FIELD_NUMBER; + hash = (53 * hash) + orderState_; + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile 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.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile 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.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing RemoteTransportProfile object.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RemoteTransportProfile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.class, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + internalGetMutableLabels().clear(); + description_ = ""; + provider_ = ""; + providerSite_ = ""; + supportedBandwidths_ = emptyIntList(); + sla_ = 0; + flow_ = 0; + orderState_ = 0; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile build() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile result = + new com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.provider_ = provider_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.providerSite_ = providerSite_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + supportedBandwidths_.makeImmutable(); + result.supportedBandwidths_ = supportedBandwidths_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sla_ = sla_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.orderState_ = orderState_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000002; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getProvider().isEmpty()) { + provider_ = other.provider_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getProviderSite().isEmpty()) { + providerSite_ = other.providerSite_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.supportedBandwidths_.isEmpty()) { + if (supportedBandwidths_.isEmpty()) { + supportedBandwidths_ = other.supportedBandwidths_; + supportedBandwidths_.makeImmutable(); + bitField0_ |= 0x00000020; + } else { + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.addAll(other.supportedBandwidths_); + } + onChanged(); + } + if (other.sla_ != 0) { + setSlaValue(other.getSlaValue()); + } + if (other.flow_ != 0) { + setFlowValue(other.getFlowValue()); + } + if (other.orderState_ != 0) { + setOrderStateValue(other.getOrderStateValue()); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 58: + { + provider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 66: + { + providerSite_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 66 + case 72: + { + int tmpRaw = input.readEnum(); + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.addInt(tmpRaw); + break; + } // case 72 + case 74: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSupportedBandwidthsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + supportedBandwidths_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 74 + case 80: + { + sla_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 80 + case 88: + { + flow_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 88 + case 96: + { + orderState_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 96 + case 106: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the resource in the format of $provider-$site.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource in the format of $provider-$site.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource in the format of $provider-$site.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource in the format of $provider-$site.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource in the format of $provider-$site.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @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(); + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @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; + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000002; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + + /** + * + * + *
+     * Output only. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. Description of the profile.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Description of the profile.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Description of the profile.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Description of the profile.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Description of the profile.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object provider_ = ""; + + /** + * + * + *
+     * Output only. Name of the provider on the other end of this profile. E.g.
+     * “Amazon Web Services” or “Microsoft Azure”.
+     * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provider. + */ + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the provider on the other end of this profile. E.g.
+     * “Amazon Web Services” or “Microsoft Azure”.
+     * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provider. + */ + public com.google.protobuf.ByteString getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Name of the provider on the other end of this profile. E.g.
+     * “Amazon Web Services” or “Microsoft Azure”.
+     * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The provider to set. + * @return This builder for chaining. + */ + public Builder setProvider(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + provider_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the provider on the other end of this profile. E.g.
+     * “Amazon Web Services” or “Microsoft Azure”.
+     * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProvider() { + provider_ = getDefaultInstance().getProvider(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Name of the provider on the other end of this profile. E.g.
+     * “Amazon Web Services” or “Microsoft Azure”.
+     * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for provider to set. + * @return This builder for chaining. + */ + public Builder setProviderBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + provider_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object providerSite_ = ""; + + /** + * + * + *
+     * Output only. If the profile is a Cloud Service Provider with compute
+     * resources, this is populated with the region where connectivity is being
+     * established. If the profile provides facility-level selection, this is an
+     * identity of the facility any connections on this profile are going through.
+     * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The providerSite. + */ + public java.lang.String getProviderSite() { + java.lang.Object ref = providerSite_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providerSite_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. If the profile is a Cloud Service Provider with compute
+     * resources, this is populated with the region where connectivity is being
+     * established. If the profile provides facility-level selection, this is an
+     * identity of the facility any connections on this profile are going through.
+     * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for providerSite. + */ + public com.google.protobuf.ByteString getProviderSiteBytes() { + java.lang.Object ref = providerSite_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providerSite_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. If the profile is a Cloud Service Provider with compute
+     * resources, this is populated with the region where connectivity is being
+     * established. If the profile provides facility-level selection, this is an
+     * identity of the facility any connections on this profile are going through.
+     * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The providerSite to set. + * @return This builder for chaining. + */ + public Builder setProviderSite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + providerSite_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the profile is a Cloud Service Provider with compute
+     * resources, this is populated with the region where connectivity is being
+     * established. If the profile provides facility-level selection, this is an
+     * identity of the facility any connections on this profile are going through.
+     * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProviderSite() { + providerSite_ = getDefaultInstance().getProviderSite(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If the profile is a Cloud Service Provider with compute
+     * resources, this is populated with the region where connectivity is being
+     * established. If the profile provides facility-level selection, this is an
+     * identity of the facility any connections on this profile are going through.
+     * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for providerSite to set. + * @return This builder for chaining. + */ + public Builder setProviderSiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + providerSite_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList supportedBandwidths_ = emptyIntList(); + + private void ensureSupportedBandwidthsIsMutable() { + if (!supportedBandwidths_.isModifiable()) { + supportedBandwidths_ = makeMutableCopy(supportedBandwidths_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedBandwidths. + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth> + getSupportedBandwidthsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth>( + supportedBandwidths_, supportedBandwidths_converter_); + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedBandwidths. + */ + public int getSupportedBandwidthsCount() { + return supportedBandwidths_.size(); + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedBandwidths at the given index. + */ + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + getSupportedBandwidths(int index) { + return supportedBandwidths_converter_.convert(supportedBandwidths_.getInt(index)); + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The supportedBandwidths to set. + * @return This builder for chaining. + */ + public Builder setSupportedBandwidths( + int index, + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The supportedBandwidths to add. + * @return This builder for chaining. + */ + public Builder addSupportedBandwidths( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The supportedBandwidths to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedBandwidths( + java.lang.Iterable< + ? extends + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth> + values) { + ensureSupportedBandwidthsIsMutable(); + for (com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth value : + values) { + supportedBandwidths_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSupportedBandwidths() { + supportedBandwidths_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedBandwidths. + */ + public java.util.List getSupportedBandwidthsValueList() { + supportedBandwidths_.makeImmutable(); + return supportedBandwidths_; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBandwidths at the given index. + */ + public int getSupportedBandwidthsValue(int index) { + return supportedBandwidths_.getInt(index); + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for supportedBandwidths to set. + * @return This builder for chaining. + */ + public Builder setSupportedBandwidthsValue(int index, int value) { + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for supportedBandwidths to add. + * @return This builder for chaining. + */ + public Builder addSupportedBandwidthsValue(int value) { + ensureSupportedBandwidthsIsMutable(); + supportedBandwidths_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. List of bandwidth enum values that are supported by this
+     * profile.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for supportedBandwidths to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedBandwidthsValue(java.lang.Iterable values) { + ensureSupportedBandwidthsIsMutable(); + for (int value : values) { + supportedBandwidths_.addInt(value); + } + onChanged(); + return this; + } + + private int sla_ = 0; + + /** + * + * + *
+     * Output only. Availability class that will be configured for this
+     * particular RemoteTransportProfile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for sla. + */ + @java.lang.Override + public int getSlaValue() { + return sla_; + } + + /** + * + * + *
+     * Output only. Availability class that will be configured for this
+     * particular RemoteTransportProfile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for sla to set. + * @return This builder for chaining. + */ + public Builder setSlaValue(int value) { + sla_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Availability class that will be configured for this
+     * particular RemoteTransportProfile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sla. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability + getSla() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability + result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.forNumber(sla_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + .ServiceLevelAvailability.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Availability class that will be configured for this
+     * particular RemoteTransportProfile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The sla to set. + * @return This builder for chaining. + */ + public Builder setSla( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + sla_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Availability class that will be configured for this
+     * particular RemoteTransportProfile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSla() { + bitField0_ = (bitField0_ & ~0x00000040); + sla_ = 0; + onChanged(); + return this; + } + + private int flow_ = 0; + + /** + * + * + *
+     * Output only. Type of provisioning flows supported by this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for flow. + */ + @java.lang.Override + public int getFlowValue() { + return flow_; + } + + /** + * + * + *
+     * Output only. Type of provisioning flows supported by this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowValue(int value) { + flow_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of provisioning flows supported by this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The flow. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + getFlow() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .forNumber(flow_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Type of provisioning flows supported by this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + flow_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Type of provisioning flows supported by this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + bitField0_ = (bitField0_ & ~0x00000080); + flow_ = 0; + onChanged(); + return this; + } + + private int orderState_ = 0; + + /** + * + * + *
+     * Output only. Order state for this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for orderState. + */ + @java.lang.Override + public int getOrderStateValue() { + return orderState_; + } + + /** + * + * + *
+     * Output only. Order state for this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for orderState to set. + * @return This builder for chaining. + */ + public Builder setOrderStateValue(int value) { + orderState_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Order state for this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The orderState. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State + getOrderState() { + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State result = + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State.forNumber( + orderState_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. Order state for this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The orderState to set. + * @return This builder for chaining. + */ + public Builder setOrderState( + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + orderState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Order state for this profile.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearOrderState() { + bitField0_ = (bitField0_ & ~0x00000100); + orderState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
+     * Output only. Human readable name of this profile, used to identify this
+     * profile in the UI.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Human readable name of this profile, used to identify this
+     * profile in the UI.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Human readable name of this profile, used to identify this
+     * profile in the UI.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human readable name of this profile, used to identify this
+     * profile in the UI.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Human readable name of this profile, used to identify this
+     * profile in the UI.
+     * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) + private static final com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoteTransportProfile 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.networkconnectivity.v1beta.RemoteTransportProfile + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileName.java new file mode 100644 index 000000000000..40438104c74f --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileName.java @@ -0,0 +1,240 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 RemoteTransportProfileName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_REMOTE_TRANSPORT_PROFILE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/remoteTransportProfiles/{remote_transport_profile}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String remoteTransportProfile; + + @Deprecated + protected RemoteTransportProfileName() { + project = null; + location = null; + remoteTransportProfile = null; + } + + private RemoteTransportProfileName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + remoteTransportProfile = Preconditions.checkNotNull(builder.getRemoteTransportProfile()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRemoteTransportProfile() { + return remoteTransportProfile; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RemoteTransportProfileName of( + String project, String location, String remoteTransportProfile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRemoteTransportProfile(remoteTransportProfile) + .build(); + } + + public static String format(String project, String location, String remoteTransportProfile) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setRemoteTransportProfile(remoteTransportProfile) + .build() + .toString(); + } + + public static RemoteTransportProfileName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_REMOTE_TRANSPORT_PROFILE.validatedMatch( + formattedString, + "RemoteTransportProfileName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("remote_transport_profile")); + } + + 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 (RemoteTransportProfileName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_REMOTE_TRANSPORT_PROFILE.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 (remoteTransportProfile != null) { + fieldMapBuilder.put("remote_transport_profile", remoteTransportProfile); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_REMOTE_TRANSPORT_PROFILE.instantiate( + "project", + project, + "location", + location, + "remote_transport_profile", + remoteTransportProfile); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RemoteTransportProfileName that = ((RemoteTransportProfileName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.remoteTransportProfile, that.remoteTransportProfile); + } + 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(remoteTransportProfile); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/remoteTransportProfiles/{remote_transport_profile}. + */ + public static class Builder { + private String project; + private String location; + private String remoteTransportProfile; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getRemoteTransportProfile() { + return remoteTransportProfile; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setRemoteTransportProfile(String remoteTransportProfile) { + this.remoteTransportProfile = remoteTransportProfile; + return this; + } + + private Builder(RemoteTransportProfileName remoteTransportProfileName) { + this.project = remoteTransportProfileName.project; + this.location = remoteTransportProfileName.location; + this.remoteTransportProfile = remoteTransportProfileName.remoteTransportProfile; + } + + public RemoteTransportProfileName build() { + return new RemoteTransportProfileName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileOrBuilder.java new file mode 100644 index 000000000000..1967432ded9b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RemoteTransportProfileOrBuilder.java @@ -0,0 +1,408 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RemoteTransportProfileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RemoteTransportProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the resource in the format of $provider-$site.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the resource in the format of $provider-$site.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Output only. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Description of the profile.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Output only. Description of the profile.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Name of the provider on the other end of this profile. E.g.
+   * “Amazon Web Services” or “Microsoft Azure”.
+   * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provider. + */ + java.lang.String getProvider(); + + /** + * + * + *
+   * Output only. Name of the provider on the other end of this profile. E.g.
+   * “Amazon Web Services” or “Microsoft Azure”.
+   * 
+ * + * string provider = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provider. + */ + com.google.protobuf.ByteString getProviderBytes(); + + /** + * + * + *
+   * Output only. If the profile is a Cloud Service Provider with compute
+   * resources, this is populated with the region where connectivity is being
+   * established. If the profile provides facility-level selection, this is an
+   * identity of the facility any connections on this profile are going through.
+   * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The providerSite. + */ + java.lang.String getProviderSite(); + + /** + * + * + *
+   * Output only. If the profile is a Cloud Service Provider with compute
+   * resources, this is populated with the region where connectivity is being
+   * established. If the profile provides facility-level selection, this is an
+   * identity of the facility any connections on this profile are going through.
+   * 
+ * + * string provider_site = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for providerSite. + */ + com.google.protobuf.ByteString getProviderSiteBytes(); + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the supportedBandwidths. + */ + java.util.List + getSupportedBandwidthsList(); + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of supportedBandwidths. + */ + int getSupportedBandwidthsCount(); + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The supportedBandwidths at the given index. + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth + getSupportedBandwidths(int index); + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for supportedBandwidths. + */ + java.util.List getSupportedBandwidthsValueList(); + + /** + * + * + *
+   * Output only. List of bandwidth enum values that are supported by this
+   * profile.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.Bandwidth supported_bandwidths = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of supportedBandwidths at the given index. + */ + int getSupportedBandwidthsValue(int index); + + /** + * + * + *
+   * Output only. Availability class that will be configured for this
+   * particular RemoteTransportProfile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for sla. + */ + int getSlaValue(); + + /** + * + * + *
+   * Output only. Availability class that will be configured for this
+   * particular RemoteTransportProfile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability sla = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The sla. + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailability + getSla(); + + /** + * + * + *
+   * Output only. Type of provisioning flows supported by this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for flow. + */ + int getFlowValue(); + + /** + * + * + *
+   * Output only. Type of provisioning flows supported by this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow flow = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The flow. + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.KeyProvisioningFlow getFlow(); + + /** + * + * + *
+   * Output only. Order state for this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for orderState. + */ + int getOrderStateValue(); + + /** + * + * + *
+   * Output only. Order state for this profile.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State order_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The orderState. + */ + com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.State getOrderState(); + + /** + * + * + *
+   * Output only. Human readable name of this profile, used to identify this
+   * profile in the UI.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. Human readable name of this profile, used to identify this
+   * profile in the UI.
+   * 
+ * + * string display_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Route.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Route.java new file mode 100644 index 000000000000..a0f6281d395e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Route.java @@ -0,0 +1,4666 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A route defines a path from VM instances within a spoke to a specific
+ * destination resource. Only VPC spokes have routes.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Route} + */ +@com.google.protobuf.Generated +public final class Route extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Route) + RouteOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Route"); + } + + // Use Route.newBuilder() to construct. + private Route(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Route() { + name_ = ""; + ipCidrRange_ = ""; + type_ = 0; + description_ = ""; + uid_ = ""; + state_ = 0; + spoke_ = ""; + location_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Route.class, + com.google.cloud.networkconnectivity.v1beta.Route.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 = 4; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.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 = 5; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.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. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.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 IP_CIDR_RANGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipCidrRange_ = ""; + + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + @java.lang.Override + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipCidrRange_ = s; + return s; + } + } + + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 10; + private int type_ = 0; + + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteType getType() { + com.google.cloud.networkconnectivity.v1beta.RouteType result = + com.google.cloud.networkconnectivity.v1beta.RouteType.forNumber(type_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RouteType.UNRECOGNIZED + : result; + } + + public static final int NEXT_HOP_VPC_NETWORK_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork nextHopVpcNetwork_; + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + @java.lang.Override + public boolean hasNextHopVpcNetwork() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork getNextHopVpcNetwork() { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder() { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + + public static final int LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + @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 DESCRIPTION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 9; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED : result; + } + + public static final int SPOKE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object spoke_ = ""; + + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + @java.lang.Override + public java.lang.String getSpoke() { + java.lang.Object ref = spoke_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spoke_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpokeBytes() { + java.lang.Object ref = spoke_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
+   * Output only. The origin location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The origin location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRIORITY_FIELD_NUMBER = 13; + private long priority_ = 0L; + + /** + * + * + *
+   * Output only. The priority of this route. Priority is used to break ties in
+   * cases where a destination matches more than one route. In these cases the
+   * route with the lowest-numbered priority value wins.
+   * 
+ * + * int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + + public static final int NEXT_HOP_VPN_TUNNEL_FIELD_NUMBER = 14; + private com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel nextHopVpnTunnel_; + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpnTunnel field is set. + */ + @java.lang.Override + public boolean hasNextHopVpnTunnel() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpnTunnel. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel getNextHopVpnTunnel() { + return nextHopVpnTunnel_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance() + : nextHopVpnTunnel_; + } + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder + getNextHopVpnTunnelOrBuilder() { + return nextHopVpnTunnel_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance() + : nextHopVpnTunnel_; + } + + public static final int NEXT_HOP_ROUTER_APPLIANCE_INSTANCE_FIELD_NUMBER = 15; + private com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + nextHopRouterApplianceInstance_; + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopRouterApplianceInstance field is set. + */ + @java.lang.Override + public boolean hasNextHopRouterApplianceInstance() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopRouterApplianceInstance. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getNextHopRouterApplianceInstance() { + return nextHopRouterApplianceInstance_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance() + : nextHopRouterApplianceInstance_; + } + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder + getNextHopRouterApplianceInstanceOrBuilder() { + return nextHopRouterApplianceInstance_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance() + : nextHopRouterApplianceInstance_; + } + + public static final int NEXT_HOP_INTERCONNECT_ATTACHMENT_FIELD_NUMBER = 16; + private com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + nextHopInterconnectAttachment_; + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopInterconnectAttachment field is set. + */ + @java.lang.Override + public boolean hasNextHopInterconnectAttachment() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopInterconnectAttachment. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + getNextHopInterconnectAttachment() { + return nextHopInterconnectAttachment_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance() + : nextHopInterconnectAttachment_; + } + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder + getNextHopInterconnectAttachmentOrBuilder() { + return nextHopInterconnectAttachment_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance() + : nextHopInterconnectAttachment_; + } + + public static final int NEXT_HOP_SPOKE_FIELD_NUMBER = 18; + private com.google.cloud.networkconnectivity.v1beta.NextHopSpoke nextHopSpoke_; + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopSpoke field is set. + */ + @java.lang.Override + public boolean hasNextHopSpoke() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopSpoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke getNextHopSpoke() { + return nextHopSpoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance() + : nextHopSpoke_; + } + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder + getNextHopSpokeOrBuilder() { + return nextHopSpoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance() + : nextHopSpoke_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipCidrRange_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, ipCidrRange_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(2, getNextHopVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(9, state_); + } + if (type_ + != com.google.cloud.networkconnectivity.v1beta.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spoke_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, spoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, location_); + } + if (priority_ != 0L) { + output.writeInt64(13, priority_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(14, getNextHopVpnTunnel()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(15, getNextHopRouterApplianceInstance()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(16, getNextHopInterconnectAttachment()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(18, getNextHopSpoke()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipCidrRange_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, ipCidrRange_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNextHopVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, 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(6, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_); + } + if (type_ + != com.google.cloud.networkconnectivity.v1beta.RouteType.ROUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(spoke_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, spoke_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, location_); + } + if (priority_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, priority_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getNextHopVpnTunnel()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, getNextHopRouterApplianceInstance()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 16, getNextHopInterconnectAttachment()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getNextHopSpoke()); + } + 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.networkconnectivity.v1beta.Route)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Route other = + (com.google.cloud.networkconnectivity.v1beta.Route) 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 (!getIpCidrRange().equals(other.getIpCidrRange())) return false; + if (type_ != other.type_) return false; + if (hasNextHopVpcNetwork() != other.hasNextHopVpcNetwork()) return false; + if (hasNextHopVpcNetwork()) { + if (!getNextHopVpcNetwork().equals(other.getNextHopVpcNetwork())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) return false; + if (state_ != other.state_) return false; + if (!getSpoke().equals(other.getSpoke())) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (getPriority() != other.getPriority()) return false; + if (hasNextHopVpnTunnel() != other.hasNextHopVpnTunnel()) return false; + if (hasNextHopVpnTunnel()) { + if (!getNextHopVpnTunnel().equals(other.getNextHopVpnTunnel())) return false; + } + if (hasNextHopRouterApplianceInstance() != other.hasNextHopRouterApplianceInstance()) + return false; + if (hasNextHopRouterApplianceInstance()) { + if (!getNextHopRouterApplianceInstance().equals(other.getNextHopRouterApplianceInstance())) + return false; + } + if (hasNextHopInterconnectAttachment() != other.hasNextHopInterconnectAttachment()) + return false; + if (hasNextHopInterconnectAttachment()) { + if (!getNextHopInterconnectAttachment().equals(other.getNextHopInterconnectAttachment())) + return false; + } + if (hasNextHopSpoke() != other.hasNextHopSpoke()) return false; + if (hasNextHopSpoke()) { + if (!getNextHopSpoke().equals(other.getNextHopSpoke())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getIpCidrRange().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasNextHopVpcNetwork()) { + hash = (37 * hash) + NEXT_HOP_VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNextHopVpcNetwork().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPriority()); + if (hasNextHopVpnTunnel()) { + hash = (37 * hash) + NEXT_HOP_VPN_TUNNEL_FIELD_NUMBER; + hash = (53 * hash) + getNextHopVpnTunnel().hashCode(); + } + if (hasNextHopRouterApplianceInstance()) { + hash = (37 * hash) + NEXT_HOP_ROUTER_APPLIANCE_INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getNextHopRouterApplianceInstance().hashCode(); + } + if (hasNextHopInterconnectAttachment()) { + hash = (37 * hash) + NEXT_HOP_INTERCONNECT_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getNextHopInterconnectAttachment().hashCode(); + } + if (hasNextHopSpoke()) { + hash = (37 * hash) + NEXT_HOP_SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getNextHopSpoke().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route 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.networkconnectivity.v1beta.Route parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route 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.networkconnectivity.v1beta.Route parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1beta.Route prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A route defines a path from VM instances within a spoke to a specific
+   * destination resource. Only VPC spokes have routes.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Route} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Route) + com.google.cloud.networkconnectivity.v1beta.RouteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Route.class, + com.google.cloud.networkconnectivity.v1beta.Route.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Route.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetNextHopVpcNetworkFieldBuilder(); + internalGetNextHopVpnTunnelFieldBuilder(); + internalGetNextHopRouterApplianceInstanceFieldBuilder(); + internalGetNextHopInterconnectAttachmentFieldBuilder(); + internalGetNextHopSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + ipCidrRange_ = ""; + type_ = 0; + nextHopVpcNetwork_ = null; + if (nextHopVpcNetworkBuilder_ != null) { + nextHopVpcNetworkBuilder_.dispose(); + nextHopVpcNetworkBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + spoke_ = ""; + location_ = ""; + priority_ = 0L; + nextHopVpnTunnel_ = null; + if (nextHopVpnTunnelBuilder_ != null) { + nextHopVpnTunnelBuilder_.dispose(); + nextHopVpnTunnelBuilder_ = null; + } + nextHopRouterApplianceInstance_ = null; + if (nextHopRouterApplianceInstanceBuilder_ != null) { + nextHopRouterApplianceInstanceBuilder_.dispose(); + nextHopRouterApplianceInstanceBuilder_ = null; + } + nextHopInterconnectAttachment_ = null; + if (nextHopInterconnectAttachmentBuilder_ != null) { + nextHopInterconnectAttachmentBuilder_.dispose(); + nextHopInterconnectAttachmentBuilder_ = null; + } + nextHopSpoke_ = null; + if (nextHopSpokeBuilder_ != null) { + nextHopSpokeBuilder_.dispose(); + nextHopSpokeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Route_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Route getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Route.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Route build() { + com.google.cloud.networkconnectivity.v1beta.Route result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Route buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Route result = + new com.google.cloud.networkconnectivity.v1beta.Route(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Route result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ipCidrRange_ = ipCidrRange_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.nextHopVpcNetwork_ = + nextHopVpcNetworkBuilder_ == null + ? nextHopVpcNetwork_ + : nextHopVpcNetworkBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.spoke_ = spoke_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.nextHopVpnTunnel_ = + nextHopVpnTunnelBuilder_ == null ? nextHopVpnTunnel_ : nextHopVpnTunnelBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.nextHopRouterApplianceInstance_ = + nextHopRouterApplianceInstanceBuilder_ == null + ? nextHopRouterApplianceInstance_ + : nextHopRouterApplianceInstanceBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.nextHopInterconnectAttachment_ = + nextHopInterconnectAttachmentBuilder_ == null + ? nextHopInterconnectAttachment_ + : nextHopInterconnectAttachmentBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.nextHopSpoke_ = + nextHopSpokeBuilder_ == null ? nextHopSpoke_ : nextHopSpokeBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Route) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Route) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Route other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Route.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getIpCidrRange().isEmpty()) { + ipCidrRange_ = other.ipCidrRange_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasNextHopVpcNetwork()) { + mergeNextHopVpcNetwork(other.getNextHopVpcNetwork()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getSpoke().isEmpty()) { + spoke_ = other.spoke_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.getPriority() != 0L) { + setPriority(other.getPriority()); + } + if (other.hasNextHopVpnTunnel()) { + mergeNextHopVpnTunnel(other.getNextHopVpnTunnel()); + } + if (other.hasNextHopRouterApplianceInstance()) { + mergeNextHopRouterApplianceInstance(other.getNextHopRouterApplianceInstance()); + } + if (other.hasNextHopInterconnectAttachment()) { + mergeNextHopInterconnectAttachment(other.getNextHopInterconnectAttachment()); + } + if (other.hasNextHopSpoke()) { + mergeNextHopSpoke(other.getNextHopSpoke()); + } + 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: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetNextHopVpcNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 72: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 80 + case 90: + { + spoke_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 104: + { + priority_ = input.readInt64(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: + { + input.readMessage( + internalGetNextHopVpnTunnelFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetNextHopRouterApplianceInstanceFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + input.readMessage( + internalGetNextHopInterconnectAttachmentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 146: + { + input.readMessage( + internalGetNextHopSpokeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 146 + 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_ = ""; + + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the route. Route names must be unique. Route names
+     * use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+     * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.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. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. The time the route was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.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. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.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. The time the route was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object ipCidrRange_ = ""; + + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + public java.lang.String getIpCidrRange() { + java.lang.Object ref = ipCidrRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipCidrRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + public com.google.protobuf.ByteString getIpCidrRangeBytes() { + java.lang.Object ref = ipCidrRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipCidrRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @param value The ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipCidrRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @return This builder for chaining. + */ + public Builder clearIpCidrRange() { + ipCidrRange_ = getDefaultInstance().getIpCidrRange(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * The destination IP address range.
+     * 
+ * + * string ip_cidr_range = 1; + * + * @param value The bytes for ipCidrRange to set. + * @return This builder for chaining. + */ + public Builder setIpCidrRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipCidrRange_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int type_ = 0; + + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteType getType() { + com.google.cloud.networkconnectivity.v1beta.RouteType result = + com.google.cloud.networkconnectivity.v1beta.RouteType.forNumber(type_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.RouteType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.networkconnectivity.v1beta.RouteType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The route's type. Its type is determined by the properties of
+     * its IP address range.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000010); + type_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork nextHopVpcNetwork_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder> + nextHopVpcNetworkBuilder_; + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + public boolean hasNextHopVpcNetwork() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork getNextHopVpcNetwork() { + if (nextHopVpcNetworkBuilder_ == null) { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } else { + return nextHopVpcNetworkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork value) { + if (nextHopVpcNetworkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopVpcNetwork_ = value; + } else { + nextHopVpcNetworkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder builderForValue) { + if (nextHopVpcNetworkBuilder_ == null) { + nextHopVpcNetwork_ = builderForValue.build(); + } else { + nextHopVpcNetworkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork value) { + if (nextHopVpcNetworkBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && nextHopVpcNetwork_ != null + && nextHopVpcNetwork_ + != com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork + .getDefaultInstance()) { + getNextHopVpcNetworkBuilder().mergeFrom(value); + } else { + nextHopVpcNetwork_ = value; + } + } else { + nextHopVpcNetworkBuilder_.mergeFrom(value); + } + if (nextHopVpcNetwork_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopVpcNetwork() { + bitField0_ = (bitField0_ & ~0x00000020); + nextHopVpcNetwork_ = null; + if (nextHopVpcNetworkBuilder_ != null) { + nextHopVpcNetworkBuilder_.dispose(); + nextHopVpcNetworkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder + getNextHopVpcNetworkBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetNextHopVpcNetworkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder() { + if (nextHopVpcNetworkBuilder_ != null) { + return nextHopVpcNetworkBuilder_.getMessageOrBuilder(); + } else { + return nextHopVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.getDefaultInstance() + : nextHopVpcNetwork_; + } + } + + /** + * + * + *
+     * Immutable. The destination VPC network for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder> + internalGetNextHopVpcNetworkFieldBuilder() { + if (nextHopVpcNetworkBuilder_ == null) { + nextHopVpcNetworkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder>( + getNextHopVpcNetwork(), getParentForChildren(), isClean()); + nextHopVpcNetwork_ = null; + } + return nextHopVpcNetworkBuilder_; + } + + 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_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + @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_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + 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_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + 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_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 6; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the route.
+     * 
+ * + * string description = 7; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route. This value is unique
+     * across all Network Connectivity Center route resources. If a
+     * route is deleted and another with the same name is created,
+     * the new route is assigned a different `uid`.
+     * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of the route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000200); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object spoke_ = ""; + + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + public java.lang.String getSpoke() { + java.lang.Object ref = spoke_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + spoke_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + public com.google.protobuf.ByteString getSpokeBytes() { + java.lang.Object ref = spoke_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + spoke_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The spoke to set. + * @return This builder for chaining. + */ + public Builder setSpoke(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSpoke() { + spoke_ = getDefaultInstance().getSpoke(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The spoke that this route leads to.
+     * Example: projects/12345/locations/global/spokes/SPOKE
+     * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for spoke to set. + * @return This builder for chaining. + */ + public Builder setSpokeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + spoke_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
+     * Output only. The origin location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The origin location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The origin location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The origin location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The origin location of the route.
+     * Uses the following form: "projects/{project}/locations/{location}"
+     * Example: projects/1234/locations/us-central1
+     * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private long priority_; + + /** + * + * + *
+     * Output only. The priority of this route. Priority is used to break ties in
+     * cases where a destination matches more than one route. In these cases the
+     * route with the lowest-numbered priority value wins.
+     * 
+ * + * int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + + /** + * + * + *
+     * Output only. The priority of this route. Priority is used to break ties in
+     * cases where a destination matches more than one route. In these cases the
+     * route with the lowest-numbered priority value wins.
+     * 
+ * + * int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(long value) { + + priority_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The priority of this route. Priority is used to break ties in
+     * cases where a destination matches more than one route. In these cases the
+     * route with the lowest-numbered priority value wins.
+     * 
+ * + * int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00001000); + priority_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel nextHopVpnTunnel_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder> + nextHopVpnTunnelBuilder_; + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpnTunnel field is set. + */ + public boolean hasNextHopVpnTunnel() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpnTunnel. + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel getNextHopVpnTunnel() { + if (nextHopVpnTunnelBuilder_ == null) { + return nextHopVpnTunnel_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance() + : nextHopVpnTunnel_; + } else { + return nextHopVpnTunnelBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpnTunnel( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel value) { + if (nextHopVpnTunnelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopVpnTunnel_ = value; + } else { + nextHopVpnTunnelBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopVpnTunnel( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder builderForValue) { + if (nextHopVpnTunnelBuilder_ == null) { + nextHopVpnTunnel_ = builderForValue.build(); + } else { + nextHopVpnTunnelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopVpnTunnel( + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel value) { + if (nextHopVpnTunnelBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && nextHopVpnTunnel_ != null + && nextHopVpnTunnel_ + != com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel + .getDefaultInstance()) { + getNextHopVpnTunnelBuilder().mergeFrom(value); + } else { + nextHopVpnTunnel_ = value; + } + } else { + nextHopVpnTunnelBuilder_.mergeFrom(value); + } + if (nextHopVpnTunnel_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopVpnTunnel() { + bitField0_ = (bitField0_ & ~0x00002000); + nextHopVpnTunnel_ = null; + if (nextHopVpnTunnelBuilder_ != null) { + nextHopVpnTunnelBuilder_.dispose(); + nextHopVpnTunnelBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder + getNextHopVpnTunnelBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return internalGetNextHopVpnTunnelFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder + getNextHopVpnTunnelOrBuilder() { + if (nextHopVpnTunnelBuilder_ != null) { + return nextHopVpnTunnelBuilder_.getMessageOrBuilder(); + } else { + return nextHopVpnTunnel_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.getDefaultInstance() + : nextHopVpnTunnel_; + } + } + + /** + * + * + *
+     * Immutable. The next-hop VPN tunnel for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder> + internalGetNextHopVpnTunnelFieldBuilder() { + if (nextHopVpnTunnelBuilder_ == null) { + nextHopVpnTunnelBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder>( + getNextHopVpnTunnel(), getParentForChildren(), isClean()); + nextHopVpnTunnel_ = null; + } + return nextHopVpnTunnelBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + nextHopRouterApplianceInstance_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder> + nextHopRouterApplianceInstanceBuilder_; + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopRouterApplianceInstance field is set. + */ + public boolean hasNextHopRouterApplianceInstance() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopRouterApplianceInstance. + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getNextHopRouterApplianceInstance() { + if (nextHopRouterApplianceInstanceBuilder_ == null) { + return nextHopRouterApplianceInstance_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance() + : nextHopRouterApplianceInstance_; + } else { + return nextHopRouterApplianceInstanceBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopRouterApplianceInstance( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance value) { + if (nextHopRouterApplianceInstanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopRouterApplianceInstance_ = value; + } else { + nextHopRouterApplianceInstanceBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopRouterApplianceInstance( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder + builderForValue) { + if (nextHopRouterApplianceInstanceBuilder_ == null) { + nextHopRouterApplianceInstance_ = builderForValue.build(); + } else { + nextHopRouterApplianceInstanceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopRouterApplianceInstance( + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance value) { + if (nextHopRouterApplianceInstanceBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && nextHopRouterApplianceInstance_ != null + && nextHopRouterApplianceInstance_ + != com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance()) { + getNextHopRouterApplianceInstanceBuilder().mergeFrom(value); + } else { + nextHopRouterApplianceInstance_ = value; + } + } else { + nextHopRouterApplianceInstanceBuilder_.mergeFrom(value); + } + if (nextHopRouterApplianceInstance_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopRouterApplianceInstance() { + bitField0_ = (bitField0_ & ~0x00004000); + nextHopRouterApplianceInstance_ = null; + if (nextHopRouterApplianceInstanceBuilder_ != null) { + nextHopRouterApplianceInstanceBuilder_.dispose(); + nextHopRouterApplianceInstanceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder + getNextHopRouterApplianceInstanceBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetNextHopRouterApplianceInstanceFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder + getNextHopRouterApplianceInstanceOrBuilder() { + if (nextHopRouterApplianceInstanceBuilder_ != null) { + return nextHopRouterApplianceInstanceBuilder_.getMessageOrBuilder(); + } else { + return nextHopRouterApplianceInstance_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + .getDefaultInstance() + : nextHopRouterApplianceInstance_; + } + } + + /** + * + * + *
+     * Immutable. The next-hop Router appliance instance for packets on this
+     * route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder> + internalGetNextHopRouterApplianceInstanceFieldBuilder() { + if (nextHopRouterApplianceInstanceBuilder_ == null) { + nextHopRouterApplianceInstanceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance, + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance.Builder, + com.google.cloud.networkconnectivity.v1beta + .NextHopRouterApplianceInstanceOrBuilder>( + getNextHopRouterApplianceInstance(), getParentForChildren(), isClean()); + nextHopRouterApplianceInstance_ = null; + } + return nextHopRouterApplianceInstanceBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + nextHopInterconnectAttachment_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder> + nextHopInterconnectAttachmentBuilder_; + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopInterconnectAttachment field is set. + */ + public boolean hasNextHopInterconnectAttachment() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopInterconnectAttachment. + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + getNextHopInterconnectAttachment() { + if (nextHopInterconnectAttachmentBuilder_ == null) { + return nextHopInterconnectAttachment_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance() + : nextHopInterconnectAttachment_; + } else { + return nextHopInterconnectAttachmentBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment value) { + if (nextHopInterconnectAttachmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopInterconnectAttachment_ = value; + } else { + nextHopInterconnectAttachmentBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder + builderForValue) { + if (nextHopInterconnectAttachmentBuilder_ == null) { + nextHopInterconnectAttachment_ = builderForValue.build(); + } else { + nextHopInterconnectAttachmentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopInterconnectAttachment( + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment value) { + if (nextHopInterconnectAttachmentBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && nextHopInterconnectAttachment_ != null + && nextHopInterconnectAttachment_ + != com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance()) { + getNextHopInterconnectAttachmentBuilder().mergeFrom(value); + } else { + nextHopInterconnectAttachment_ = value; + } + } else { + nextHopInterconnectAttachmentBuilder_.mergeFrom(value); + } + if (nextHopInterconnectAttachment_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopInterconnectAttachment() { + bitField0_ = (bitField0_ & ~0x00008000); + nextHopInterconnectAttachment_ = null; + if (nextHopInterconnectAttachmentBuilder_ != null) { + nextHopInterconnectAttachmentBuilder_.dispose(); + nextHopInterconnectAttachmentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder + getNextHopInterconnectAttachmentBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return internalGetNextHopInterconnectAttachmentFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder + getNextHopInterconnectAttachmentOrBuilder() { + if (nextHopInterconnectAttachmentBuilder_ != null) { + return nextHopInterconnectAttachmentBuilder_.getMessageOrBuilder(); + } else { + return nextHopInterconnectAttachment_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + .getDefaultInstance() + : nextHopInterconnectAttachment_; + } + } + + /** + * + * + *
+     * Immutable. The next-hop VLAN attachment for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder> + internalGetNextHopInterconnectAttachmentFieldBuilder() { + if (nextHopInterconnectAttachmentBuilder_ == null) { + nextHopInterconnectAttachmentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder>( + getNextHopInterconnectAttachment(), getParentForChildren(), isClean()); + nextHopInterconnectAttachment_ = null; + } + return nextHopInterconnectAttachmentBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.NextHopSpoke nextHopSpoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke, + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder> + nextHopSpokeBuilder_; + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopSpoke field is set. + */ + public boolean hasNextHopSpoke() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopSpoke. + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke getNextHopSpoke() { + if (nextHopSpokeBuilder_ == null) { + return nextHopSpoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance() + : nextHopSpoke_; + } else { + return nextHopSpokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopSpoke(com.google.cloud.networkconnectivity.v1beta.NextHopSpoke value) { + if (nextHopSpokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextHopSpoke_ = value; + } else { + nextHopSpokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder setNextHopSpoke( + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder builderForValue) { + if (nextHopSpokeBuilder_ == null) { + nextHopSpoke_ = builderForValue.build(); + } else { + nextHopSpokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder mergeNextHopSpoke( + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke value) { + if (nextHopSpokeBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && nextHopSpoke_ != null + && nextHopSpoke_ + != com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance()) { + getNextHopSpokeBuilder().mergeFrom(value); + } else { + nextHopSpoke_ = value; + } + } else { + nextHopSpokeBuilder_.mergeFrom(value); + } + if (nextHopSpoke_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public Builder clearNextHopSpoke() { + bitField0_ = (bitField0_ & ~0x00010000); + nextHopSpoke_ = null; + if (nextHopSpokeBuilder_ != null) { + nextHopSpokeBuilder_.dispose(); + nextHopSpokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder + getNextHopSpokeBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return internalGetNextHopSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder + getNextHopSpokeOrBuilder() { + if (nextHopSpokeBuilder_ != null) { + return nextHopSpokeBuilder_.getMessageOrBuilder(); + } else { + return nextHopSpoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.getDefaultInstance() + : nextHopSpoke_; + } + } + + /** + * + * + *
+     * Immutable. The next-hop spoke for packets on this route.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke, + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder> + internalGetNextHopSpokeFieldBuilder() { + if (nextHopSpokeBuilder_ == null) { + nextHopSpokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke, + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke.Builder, + com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder>( + getNextHopSpoke(), getParentForChildren(), isClean()); + nextHopSpoke_ = null; + } + return nextHopSpokeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Route) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Route) + private static final com.google.cloud.networkconnectivity.v1beta.Route DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Route(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Route getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Route 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.networkconnectivity.v1beta.Route getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteOrBuilder.java new file mode 100644 index 000000000000..a4649e963ebb --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteOrBuilder.java @@ -0,0 +1,658 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RouteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Route) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The name of the route. Route names must be unique. Route names
+   * use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`
+   * 
+ * + * string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the route was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the route was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The ipCidrRange. + */ + java.lang.String getIpCidrRange(); + + /** + * + * + *
+   * The destination IP address range.
+   * 
+ * + * string ip_cidr_range = 1; + * + * @return The bytes for ipCidrRange. + */ + com.google.protobuf.ByteString getIpCidrRangeBytes(); + + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+   * Output only. The route's type. Its type is determined by the properties of
+   * its IP address range.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The type. + */ + com.google.cloud.networkconnectivity.v1beta.RouteType getType(); + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpcNetwork field is set. + */ + boolean hasNextHopVpcNetwork(); + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpcNetwork. + */ + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork getNextHopVpcNetwork(); + + /** + * + * + *
+   * Immutable. The destination VPC network for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1beta.NextHopVpcNetworkOrBuilder + getNextHopVpcNetworkOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 6; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * An optional description of the route.
+   * 
+ * + * string description = 7; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route. This value is unique
+   * across all Network Connectivity Center route resources. If a
+   * route is deleted and another with the same name is created,
+   * the new route is assigned a different `uid`.
+   * 
+ * + * string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of the route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The spoke. + */ + java.lang.String getSpoke(); + + /** + * + * + *
+   * Immutable. The spoke that this route leads to.
+   * Example: projects/12345/locations/global/spokes/SPOKE
+   * 
+ * + * + * string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for spoke. + */ + com.google.protobuf.ByteString getSpokeBytes(); + + /** + * + * + *
+   * Output only. The origin location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
+   * Output only. The origin location of the route.
+   * Uses the following form: "projects/{project}/locations/{location}"
+   * Example: projects/1234/locations/us-central1
+   * 
+ * + * string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Output only. The priority of this route. Priority is used to break ties in
+   * cases where a destination matches more than one route. In these cases the
+   * route with the lowest-numbered priority value wins.
+   * 
+ * + * int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The priority. + */ + long getPriority(); + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopVpnTunnel field is set. + */ + boolean hasNextHopVpnTunnel(); + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopVpnTunnel. + */ + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel getNextHopVpnTunnel(); + + /** + * + * + *
+   * Immutable. The next-hop VPN tunnel for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1beta.NextHopVPNTunnelOrBuilder + getNextHopVpnTunnelOrBuilder(); + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopRouterApplianceInstance field is set. + */ + boolean hasNextHopRouterApplianceInstance(); + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopRouterApplianceInstance. + */ + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance + getNextHopRouterApplianceInstance(); + + /** + * + * + *
+   * Immutable. The next-hop Router appliance instance for packets on this
+   * route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1beta.NextHopRouterApplianceInstanceOrBuilder + getNextHopRouterApplianceInstanceOrBuilder(); + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopInterconnectAttachment field is set. + */ + boolean hasNextHopInterconnectAttachment(); + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopInterconnectAttachment. + */ + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment + getNextHopInterconnectAttachment(); + + /** + * + * + *
+   * Immutable. The next-hop VLAN attachment for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1beta.NextHopInterconnectAttachmentOrBuilder + getNextHopInterconnectAttachmentOrBuilder(); + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the nextHopSpoke field is set. + */ + boolean hasNextHopSpoke(); + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The nextHopSpoke. + */ + com.google.cloud.networkconnectivity.v1beta.NextHopSpoke getNextHopSpoke(); + + /** + * + * + *
+   * Immutable. The next-hop spoke for packets on this route.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.NextHopSpoke next_hop_spoke = 18 [(.google.api.field_behavior) = IMMUTABLE]; + * + */ + com.google.cloud.networkconnectivity.v1beta.NextHopSpokeOrBuilder getNextHopSpokeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTable.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTable.java new file mode 100644 index 000000000000..a74f52fa46f8 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTable.java @@ -0,0 +1,2143 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** Protobuf type {@code google.cloud.networkconnectivity.v1beta.RouteTable} */ +@com.google.protobuf.Generated +public final class RouteTable extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RouteTable) + RouteTableOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RouteTable"); + } + + // Use RouteTable.newBuilder() to construct. + private RouteTable(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RouteTable() { + name_ = ""; + description_ = ""; + uid_ = ""; + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RouteTable.class, + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the route table 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. The time the route table 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. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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; + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.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.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, uid_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, 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.networkconnectivity.v1beta.RouteTable)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RouteTable other = + (com.google.cloud.networkconnectivity.v1beta.RouteTable) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getUid().equals(other.getUid())) 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 (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) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable 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.networkconnectivity.v1beta.RouteTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable 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.networkconnectivity.v1beta.RouteTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RouteTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** Protobuf type {@code google.cloud.networkconnectivity.v1beta.RouteTable} */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RouteTable) + com.google.cloud.networkconnectivity.v1beta.RouteTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RouteTable.class, + com.google.cloud.networkconnectivity.v1beta.RouteTable.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.RouteTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + uid_ = ""; + state_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouteTable_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteTable getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RouteTable.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteTable build() { + com.google.cloud.networkconnectivity.v1beta.RouteTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouteTable buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RouteTable result = + new com.google.cloud.networkconnectivity.v1beta.RouteTable(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.RouteTable result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RouteTable) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.RouteTable) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.RouteTable other) { + if (other == com.google.cloud.networkconnectivity.v1beta.RouteTable.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000020; + onChanged(); + } + 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( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the route table. Route table names must be unique.
+     * They use the following form:
+     * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the route table 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. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the route table 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. The time the route table was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the route table was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * An optional description of the route table.
+     * 
+ * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the route table. This value is
+     * unique across all route table resources. If a route table is deleted and
+     * another with the same name is created, the new route table is assigned
+     * a different `uid`.
+     * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.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_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this route table.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RouteTable) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RouteTable) + private static final com.google.cloud.networkconnectivity.v1beta.RouteTable DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RouteTable(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouteTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouteTable 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.networkconnectivity.v1beta.RouteTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableName.java new file mode 100644 index 000000000000..25fe0e2136b3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 RouteTableName implements ResourceName { + private static final PathTemplate PROJECT_HUB_ROUTE_TABLE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}"); + private volatile Map fieldValuesMap; + private final String project; + private final String hub; + private final String routeTable; + + @Deprecated + protected RouteTableName() { + project = null; + hub = null; + routeTable = null; + } + + private RouteTableName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + hub = Preconditions.checkNotNull(builder.getHub()); + routeTable = Preconditions.checkNotNull(builder.getRouteTable()); + } + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RouteTableName of(String project, String hub, String routeTable) { + return newBuilder().setProject(project).setHub(hub).setRouteTable(routeTable).build(); + } + + public static String format(String project, String hub, String routeTable) { + return newBuilder() + .setProject(project) + .setHub(hub) + .setRouteTable(routeTable) + .build() + .toString(); + } + + public static RouteTableName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_HUB_ROUTE_TABLE.validatedMatch( + formattedString, "RouteTableName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("hub"), matchMap.get("route_table")); + } + + 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 (RouteTableName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_HUB_ROUTE_TABLE.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 (hub != null) { + fieldMapBuilder.put("hub", hub); + } + if (routeTable != null) { + fieldMapBuilder.put("route_table", routeTable); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_HUB_ROUTE_TABLE.instantiate( + "project", project, "hub", hub, "route_table", routeTable); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RouteTableName that = ((RouteTableName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.hub, that.hub) + && Objects.equals(this.routeTable, that.routeTable); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(hub); + h *= 1000003; + h ^= Objects.hashCode(routeTable); + return h; + } + + /** Builder for projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}. */ + public static class Builder { + private String project; + private String hub; + private String routeTable; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getHub() { + return hub; + } + + public String getRouteTable() { + return routeTable; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setHub(String hub) { + this.hub = hub; + return this; + } + + public Builder setRouteTable(String routeTable) { + this.routeTable = routeTable; + return this; + } + + private Builder(RouteTableName routeTableName) { + this.project = routeTableName.project; + this.hub = routeTableName.hub; + this.routeTable = routeTableName.routeTable; + } + + public RouteTableName build() { + return new RouteTableName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableOrBuilder.java new file mode 100644 index 000000000000..e11d993028c4 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteTableOrBuilder.java @@ -0,0 +1,299 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RouteTableOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RouteTable) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The name of the route table. Route table names must be unique.
+   * They use the following form:
+   * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the route table 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. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the route table was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the route table was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * An optional description of the route table.
+   * 
+ * + * string description = 5; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the route table. This value is
+   * unique across all route table resources. If a route table is deleted and
+   * another with the same name is created, the new route table is assigned
+   * a different `uid`.
+   * 
+ * + * string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this route table.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteType.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteType.java new file mode 100644 index 000000000000..0edd3e2ff159 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouteType.java @@ -0,0 +1,224 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The route's type
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.RouteType} + */ +@com.google.protobuf.Generated +public enum RouteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No route type information specified
+   * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + ROUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * The route leads to a destination within the primary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_PRIMARY_SUBNET = 1; + */ + VPC_PRIMARY_SUBNET(1), + /** + * + * + *
+   * The route leads to a destination within the secondary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_SECONDARY_SUBNET = 2; + */ + VPC_SECONDARY_SUBNET(2), + /** + * + * + *
+   * The route leads to a destination in a dynamic route. Dynamic routes are
+   * derived from Border Gateway Protocol (BGP) advertisements received from an
+   * NCC hybrid spoke.
+   * 
+ * + * DYNAMIC_ROUTE = 3; + */ + DYNAMIC_ROUTE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RouteType"); + } + + /** + * + * + *
+   * No route type information specified
+   * 
+ * + * ROUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROUTE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The route leads to a destination within the primary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_PRIMARY_SUBNET = 1; + */ + public static final int VPC_PRIMARY_SUBNET_VALUE = 1; + + /** + * + * + *
+   * The route leads to a destination within the secondary address range of the
+   * VPC network's subnet.
+   * 
+ * + * VPC_SECONDARY_SUBNET = 2; + */ + public static final int VPC_SECONDARY_SUBNET_VALUE = 2; + + /** + * + * + *
+   * The route leads to a destination in a dynamic route. Dynamic routes are
+   * derived from Border Gateway Protocol (BGP) advertisements received from an
+   * NCC hybrid spoke.
+   * 
+ * + * DYNAMIC_ROUTE = 3; + */ + public static final int DYNAMIC_ROUTE_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 RouteType 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 RouteType forNumber(int value) { + switch (value) { + case 0: + return ROUTE_TYPE_UNSPECIFIED; + case 1: + return VPC_PRIMARY_SUBNET; + case 2: + return VPC_SECONDARY_SUBNET; + case 3: + return DYNAMIC_ROUTE; + 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 RouteType findValueByNumber(int number) { + return RouteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RouteType[] VALUES = values(); + + public static RouteType 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 RouteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.RouteType) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstance.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstance.java new file mode 100644 index 000000000000..ecf0763777f3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstance.java @@ -0,0 +1,803 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A router appliance instance is a Compute Engine virtual machine (VM) instance
+ * that acts as a BGP speaker. A router appliance instance is specified by the
+ * URI of the VM and the internal IP address of one of the VM's network
+ * interfaces.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RouterApplianceInstance} + */ +@com.google.protobuf.Generated +public final class RouterApplianceInstance extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) + RouterApplianceInstanceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RouterApplianceInstance"); + } + + // Use RouterApplianceInstance.newBuilder() to construct. + private RouterApplianceInstance(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RouterApplianceInstance() { + virtualMachine_ = ""; + ipAddress_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.class, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder.class); + } + + public static final int VIRTUAL_MACHINE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object virtualMachine_ = ""; + + /** + * + * + *
+   * The URI of the VM.
+   * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The virtualMachine. + */ + @java.lang.Override + public java.lang.String getVirtualMachine() { + java.lang.Object ref = virtualMachine_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + virtualMachine_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the VM.
+   * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for virtualMachine. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVirtualMachineBytes() { + java.lang.Object ref = virtualMachine_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + virtualMachine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_ADDRESS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+   * The IP address on the VM to use for peering.
+   * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + @java.lang.Override + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } + } + + /** + * + * + *
+   * The IP address on the VM to use for peering.
+   * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(virtualMachine_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, virtualMachine_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, ipAddress_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(virtualMachine_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, virtualMachine_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ipAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, ipAddress_); + } + 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.networkconnectivity.v1beta.RouterApplianceInstance)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance other = + (com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) obj; + + if (!getVirtualMachine().equals(other.getVirtualMachine())) return false; + if (!getIpAddress().equals(other.getIpAddress())) 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) + VIRTUAL_MACHINE_FIELD_NUMBER; + hash = (53 * hash) + getVirtualMachine().hashCode(); + hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getIpAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance 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.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance 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.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A router appliance instance is a Compute Engine virtual machine (VM) instance
+   * that acts as a BGP speaker. A router appliance instance is specified by the
+   * URI of the VM and the internal IP address of one of the VM's network
+   * interfaces.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RouterApplianceInstance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.class, + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + virtualMachine_ = ""; + ipAddress_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RouterApplianceInstance_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance build() { + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance result = + new com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.virtualMachine_ = virtualMachine_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + .getDefaultInstance()) return this; + if (!other.getVirtualMachine().isEmpty()) { + virtualMachine_ = other.virtualMachine_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getIpAddress().isEmpty()) { + ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + virtualMachine_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 virtualMachine_ = ""; + + /** + * + * + *
+     * The URI of the VM.
+     * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The virtualMachine. + */ + public java.lang.String getVirtualMachine() { + java.lang.Object ref = virtualMachine_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + virtualMachine_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the VM.
+     * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for virtualMachine. + */ + public com.google.protobuf.ByteString getVirtualMachineBytes() { + java.lang.Object ref = virtualMachine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + virtualMachine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the VM.
+     * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The virtualMachine to set. + * @return This builder for chaining. + */ + public Builder setVirtualMachine(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + virtualMachine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VM.
+     * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearVirtualMachine() { + virtualMachine_ = getDefaultInstance().getVirtualMachine(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VM.
+     * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for virtualMachine to set. + * @return This builder for chaining. + */ + public Builder setVirtualMachineBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + virtualMachine_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ipAddress_ = ""; + + /** + * + * + *
+     * The IP address on the VM to use for peering.
+     * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + public java.lang.String getIpAddress() { + java.lang.Object ref = ipAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ipAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The IP address on the VM to use for peering.
+     * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + public com.google.protobuf.ByteString getIpAddressBytes() { + java.lang.Object ref = ipAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ipAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The IP address on the VM to use for peering.
+     * 
+ * + * string ip_address = 3; + * + * @param value The ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The IP address on the VM to use for peering.
+     * 
+ * + * string ip_address = 3; + * + * @return This builder for chaining. + */ + public Builder clearIpAddress() { + ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * The IP address on the VM to use for peering.
+     * 
+ * + * string ip_address = 3; + * + * @param value The bytes for ipAddress to set. + * @return This builder for chaining. + */ + public Builder setIpAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ipAddress_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) + private static final com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RouterApplianceInstance + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RouterApplianceInstance 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.networkconnectivity.v1beta.RouterApplianceInstance + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstanceOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstanceOrBuilder.java new file mode 100644 index 000000000000..f79ec65fe72b --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RouterApplianceInstanceOrBuilder.java @@ -0,0 +1,80 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RouterApplianceInstanceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RouterApplianceInstance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the VM.
+   * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The virtualMachine. + */ + java.lang.String getVirtualMachine(); + + /** + * + * + *
+   * The URI of the VM.
+   * 
+ * + * string virtual_machine = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for virtualMachine. + */ + com.google.protobuf.ByteString getVirtualMachineBytes(); + + /** + * + * + *
+   * The IP address on the VM to use for peering.
+   * 
+ * + * string ip_address = 3; + * + * @return The ipAddress. + */ + java.lang.String getIpAddress(); + + /** + * + * + *
+   * The IP address on the VM to use for peering.
+   * 
+ * + * string ip_address = 3; + * + * @return The bytes for ipAddress. + */ + com.google.protobuf.ByteString getIpAddressBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPC.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPC.java new file mode 100644 index 000000000000..b03289653e1d --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPC.java @@ -0,0 +1,728 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * RoutingVPC contains information about the VPC networks associated
+ * with the spokes of a Network Connectivity Center hub.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RoutingVPC} + */ +@com.google.protobuf.Generated +public final class RoutingVPC extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.RoutingVPC) + RoutingVPCOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RoutingVPC"); + } + + // Use RoutingVPC.newBuilder() to construct. + private RoutingVPC(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RoutingVPC() { + uri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.class, + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * The URI of the VPC network.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + + /** + * + * + *
+   * The URI of the VPC network.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUIRED_FOR_NEW_SITE_TO_SITE_DATA_TRANSFER_SPOKES_FIELD_NUMBER = 2; + private boolean requiredForNewSiteToSiteDataTransferSpokes_ = false; + + /** + * + * + *
+   * Output only. If true, indicates that this VPC network is currently
+   * associated with spokes that use the data transfer feature (spokes where the
+   * site_to_site_data_transfer field is set to true). If you create new spokes
+   * that use data transfer, they must be associated with this VPC network. At
+   * most, one VPC network will have this field set to true.
+   * 
+ * + * + * bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The requiredForNewSiteToSiteDataTransferSpokes. + */ + @java.lang.Override + public boolean getRequiredForNewSiteToSiteDataTransferSpokes() { + return requiredForNewSiteToSiteDataTransferSpokes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (requiredForNewSiteToSiteDataTransferSpokes_ != false) { + output.writeBool(2, requiredForNewSiteToSiteDataTransferSpokes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (requiredForNewSiteToSiteDataTransferSpokes_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, requiredForNewSiteToSiteDataTransferSpokes_); + } + 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.networkconnectivity.v1beta.RoutingVPC)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.RoutingVPC other = + (com.google.cloud.networkconnectivity.v1beta.RoutingVPC) obj; + + if (!getUri().equals(other.getUri())) return false; + if (getRequiredForNewSiteToSiteDataTransferSpokes() + != other.getRequiredForNewSiteToSiteDataTransferSpokes()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + REQUIRED_FOR_NEW_SITE_TO_SITE_DATA_TRANSFER_SPOKES_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean( + getRequiredForNewSiteToSiteDataTransferSpokes()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC 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.networkconnectivity.v1beta.RoutingVPC parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC 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.networkconnectivity.v1beta.RoutingVPC parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.RoutingVPC prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * RoutingVPC contains information about the VPC networks associated
+   * with the spokes of a Network Connectivity Center hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.RoutingVPC} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.RoutingVPC) + com.google.cloud.networkconnectivity.v1beta.RoutingVPCOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.class, + com.google.cloud.networkconnectivity.v1beta.RoutingVPC.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.RoutingVPC.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + requiredForNewSiteToSiteDataTransferSpokes_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_RoutingVPC_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.RoutingVPC.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC build() { + com.google.cloud.networkconnectivity.v1beta.RoutingVPC result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.RoutingVPC buildPartial() { + com.google.cloud.networkconnectivity.v1beta.RoutingVPC result = + new com.google.cloud.networkconnectivity.v1beta.RoutingVPC(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.RoutingVPC result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requiredForNewSiteToSiteDataTransferSpokes_ = + requiredForNewSiteToSiteDataTransferSpokes_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.RoutingVPC) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.RoutingVPC) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.RoutingVPC other) { + if (other == com.google.cloud.networkconnectivity.v1beta.RoutingVPC.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRequiredForNewSiteToSiteDataTransferSpokes() != false) { + setRequiredForNewSiteToSiteDataTransferSpokes( + other.getRequiredForNewSiteToSiteDataTransferSpokes()); + } + 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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + requiredForNewSiteToSiteDataTransferSpokes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * The URI of the VPC network.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The URI of the VPC network.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The URI of the VPC network.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPC network.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The URI of the VPC network.
+     * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean requiredForNewSiteToSiteDataTransferSpokes_; + + /** + * + * + *
+     * Output only. If true, indicates that this VPC network is currently
+     * associated with spokes that use the data transfer feature (spokes where the
+     * site_to_site_data_transfer field is set to true). If you create new spokes
+     * that use data transfer, they must be associated with this VPC network. At
+     * most, one VPC network will have this field set to true.
+     * 
+ * + * + * bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The requiredForNewSiteToSiteDataTransferSpokes. + */ + @java.lang.Override + public boolean getRequiredForNewSiteToSiteDataTransferSpokes() { + return requiredForNewSiteToSiteDataTransferSpokes_; + } + + /** + * + * + *
+     * Output only. If true, indicates that this VPC network is currently
+     * associated with spokes that use the data transfer feature (spokes where the
+     * site_to_site_data_transfer field is set to true). If you create new spokes
+     * that use data transfer, they must be associated with this VPC network. At
+     * most, one VPC network will have this field set to true.
+     * 
+ * + * + * bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The requiredForNewSiteToSiteDataTransferSpokes to set. + * @return This builder for chaining. + */ + public Builder setRequiredForNewSiteToSiteDataTransferSpokes(boolean value) { + + requiredForNewSiteToSiteDataTransferSpokes_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. If true, indicates that this VPC network is currently
+     * associated with spokes that use the data transfer feature (spokes where the
+     * site_to_site_data_transfer field is set to true). If you create new spokes
+     * that use data transfer, they must be associated with this VPC network. At
+     * most, one VPC network will have this field set to true.
+     * 
+ * + * + * bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequiredForNewSiteToSiteDataTransferSpokes() { + bitField0_ = (bitField0_ & ~0x00000002); + requiredForNewSiteToSiteDataTransferSpokes_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.RoutingVPC) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.RoutingVPC) + private static final com.google.cloud.networkconnectivity.v1beta.RoutingVPC DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.RoutingVPC(); + } + + public static com.google.cloud.networkconnectivity.v1beta.RoutingVPC getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RoutingVPC 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.networkconnectivity.v1beta.RoutingVPC getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPCOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPCOrBuilder.java new file mode 100644 index 000000000000..82af5e4fa555 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/RoutingVPCOrBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface RoutingVPCOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.RoutingVPC) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI of the VPC network.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * The URI of the VPC network.
+   * 
+ * + * string uri = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Output only. If true, indicates that this VPC network is currently
+   * associated with spokes that use the data transfer feature (spokes where the
+   * site_to_site_data_transfer field is set to true). If you create new spokes
+   * that use data transfer, they must be associated with this VPC network. At
+   * most, one VPC network will have this field set to true.
+   * 
+ * + * + * bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The requiredForNewSiteToSiteDataTransferSpokes. + */ + boolean getRequiredForNewSiteToSiteDataTransferSpokes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfig.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfig.java new file mode 100644 index 000000000000..cff442e3b563 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfig.java @@ -0,0 +1,1127 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Specifies eligibility information for the service.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ServiceConfig} + */ +@com.google.protobuf.Generated +public final class ServiceConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.ServiceConfig) + ServiceConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ServiceConfig"); + } + + // Use ServiceConfig.newBuilder() to construct. + private ServiceConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ServiceConfig() { + eligibilityCriteria_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.class, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder.class); + } + + /** + * + * + *
+   * The eligibility information for the service.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria} + */ + public enum EligibilityCriteria implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The service is not eligible for Data Transfer Essentials configuration.
+     * This is the default case.
+     * 
+ * + * ELIGIBILITY_CRITERIA_UNSPECIFIED = 0; + */ + ELIGIBILITY_CRITERIA_UNSPECIFIED(0), + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for Premium Tier.
+     * 
+ * + * NETWORK_SERVICE_TIER_PREMIUM_ONLY = 1; + */ + NETWORK_SERVICE_TIER_PREMIUM_ONLY(1), + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for Standard Tier.
+     * 
+ * + * NETWORK_SERVICE_TIER_STANDARD_ONLY = 2; + */ + NETWORK_SERVICE_TIER_STANDARD_ONLY(2), + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for the regional endpoint.
+     * 
+ * + * REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY = 3; + */ + REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EligibilityCriteria"); + } + + /** + * + * + *
+     * The service is not eligible for Data Transfer Essentials configuration.
+     * This is the default case.
+     * 
+ * + * ELIGIBILITY_CRITERIA_UNSPECIFIED = 0; + */ + public static final int ELIGIBILITY_CRITERIA_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for Premium Tier.
+     * 
+ * + * NETWORK_SERVICE_TIER_PREMIUM_ONLY = 1; + */ + public static final int NETWORK_SERVICE_TIER_PREMIUM_ONLY_VALUE = 1; + + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for Standard Tier.
+     * 
+ * + * NETWORK_SERVICE_TIER_STANDARD_ONLY = 2; + */ + public static final int NETWORK_SERVICE_TIER_STANDARD_ONLY_VALUE = 2; + + /** + * + * + *
+     * The service is eligible for Data Transfer Essentials configuration only
+     * for the regional endpoint.
+     * 
+ * + * REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY = 3; + */ + public static final int REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY_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 EligibilityCriteria 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 EligibilityCriteria forNumber(int value) { + switch (value) { + case 0: + return ELIGIBILITY_CRITERIA_UNSPECIFIED; + case 1: + return NETWORK_SERVICE_TIER_PREMIUM_ONLY; + case 2: + return NETWORK_SERVICE_TIER_STANDARD_ONLY; + case 3: + return REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY; + 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 EligibilityCriteria findValueByNumber(int number) { + return EligibilityCriteria.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.ServiceConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EligibilityCriteria[] VALUES = values(); + + public static EligibilityCriteria 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 EligibilityCriteria(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria) + } + + private int bitField0_; + public static final int ELIGIBILITY_CRITERIA_FIELD_NUMBER = 1; + private int eligibilityCriteria_ = 0; + + /** + * + * + *
+   * Output only. The eligibility criteria for the service.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for eligibilityCriteria. + */ + @java.lang.Override + public int getEligibilityCriteriaValue() { + return eligibilityCriteria_; + } + + /** + * + * + *
+   * Output only. The eligibility criteria for the service.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eligibilityCriteria. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + getEligibilityCriteria() { + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria result = + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria.forNumber( + eligibilityCriteria_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria.UNRECOGNIZED + : result; + } + + public static final int SUPPORT_END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp supportEndTime_; + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the supportEndTime field is set. + */ + @java.lang.Override + public boolean hasSupportEndTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The supportEndTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSupportEndTime() { + return supportEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supportEndTime_; + } + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSupportEndTimeOrBuilder() { + return supportEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supportEndTime_; + } + + 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 (eligibilityCriteria_ + != com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + .ELIGIBILITY_CRITERIA_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, eligibilityCriteria_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSupportEndTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (eligibilityCriteria_ + != com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + .ELIGIBILITY_CRITERIA_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, eligibilityCriteria_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSupportEndTime()); + } + 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.networkconnectivity.v1beta.ServiceConfig)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.ServiceConfig other = + (com.google.cloud.networkconnectivity.v1beta.ServiceConfig) obj; + + if (eligibilityCriteria_ != other.eligibilityCriteria_) return false; + if (hasSupportEndTime() != other.hasSupportEndTime()) return false; + if (hasSupportEndTime()) { + if (!getSupportEndTime().equals(other.getSupportEndTime())) 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) + ELIGIBILITY_CRITERIA_FIELD_NUMBER; + hash = (53 * hash) + eligibilityCriteria_; + if (hasSupportEndTime()) { + hash = (37 * hash) + SUPPORT_END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSupportEndTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig 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.networkconnectivity.v1beta.ServiceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig 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.networkconnectivity.v1beta.ServiceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Specifies eligibility information for the service.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.ServiceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.ServiceConfig) + com.google.cloud.networkconnectivity.v1beta.ServiceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.class, + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.ServiceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSupportEndTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + eligibilityCriteria_ = 0; + supportEndTime_ = null; + if (supportEndTimeBuilder_ != null) { + supportEndTimeBuilder_.dispose(); + supportEndTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_ServiceConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.ServiceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig build() { + com.google.cloud.networkconnectivity.v1beta.ServiceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig buildPartial() { + com.google.cloud.networkconnectivity.v1beta.ServiceConfig result = + new com.google.cloud.networkconnectivity.v1beta.ServiceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.ServiceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.eligibilityCriteria_ = eligibilityCriteria_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.supportEndTime_ = + supportEndTimeBuilder_ == null ? supportEndTime_ : supportEndTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.ServiceConfig) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.ServiceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.ServiceConfig other) { + if (other == com.google.cloud.networkconnectivity.v1beta.ServiceConfig.getDefaultInstance()) + return this; + if (other.eligibilityCriteria_ != 0) { + setEligibilityCriteriaValue(other.getEligibilityCriteriaValue()); + } + if (other.hasSupportEndTime()) { + mergeSupportEndTime(other.getSupportEndTime()); + } + 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: + { + eligibilityCriteria_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetSupportEndTimeFieldBuilder().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 int eligibilityCriteria_ = 0; + + /** + * + * + *
+     * Output only. The eligibility criteria for the service.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for eligibilityCriteria. + */ + @java.lang.Override + public int getEligibilityCriteriaValue() { + return eligibilityCriteria_; + } + + /** + * + * + *
+     * Output only. The eligibility criteria for the service.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for eligibilityCriteria to set. + * @return This builder for chaining. + */ + public Builder setEligibilityCriteriaValue(int value) { + eligibilityCriteria_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The eligibility criteria for the service.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eligibilityCriteria. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + getEligibilityCriteria() { + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria result = + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria.forNumber( + eligibilityCriteria_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The eligibility criteria for the service.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The eligibilityCriteria to set. + * @return This builder for chaining. + */ + public Builder setEligibilityCriteria( + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + eligibilityCriteria_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The eligibility criteria for the service.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEligibilityCriteria() { + bitField0_ = (bitField0_ & ~0x00000001); + eligibilityCriteria_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp supportEndTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + supportEndTimeBuilder_; + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the supportEndTime field is set. + */ + public boolean hasSupportEndTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The supportEndTime. + */ + public com.google.protobuf.Timestamp getSupportEndTime() { + if (supportEndTimeBuilder_ == null) { + return supportEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supportEndTime_; + } else { + return supportEndTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportEndTime(com.google.protobuf.Timestamp value) { + if (supportEndTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + supportEndTime_ = value; + } else { + supportEndTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSupportEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (supportEndTimeBuilder_ == null) { + supportEndTime_ = builderForValue.build(); + } else { + supportEndTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSupportEndTime(com.google.protobuf.Timestamp value) { + if (supportEndTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && supportEndTime_ != null + && supportEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSupportEndTimeBuilder().mergeFrom(value); + } else { + supportEndTime_ = value; + } + } else { + supportEndTimeBuilder_.mergeFrom(value); + } + if (supportEndTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSupportEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + supportEndTime_ = null; + if (supportEndTimeBuilder_ != null) { + supportEndTimeBuilder_.dispose(); + supportEndTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getSupportEndTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSupportEndTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getSupportEndTimeOrBuilder() { + if (supportEndTimeBuilder_ != null) { + return supportEndTimeBuilder_.getMessageOrBuilder(); + } else { + return supportEndTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : supportEndTime_; + } + } + + /** + * + * + *
+     * Output only. The end time for eligibility criteria support. If not
+     * specified, no planned end time is set.
+     * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetSupportEndTimeFieldBuilder() { + if (supportEndTimeBuilder_ == null) { + supportEndTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSupportEndTime(), getParentForChildren(), isClean()); + supportEndTime_ = null; + } + return supportEndTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.ServiceConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.ServiceConfig) + private static final com.google.cloud.networkconnectivity.v1beta.ServiceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.ServiceConfig(); + } + + public static com.google.cloud.networkconnectivity.v1beta.ServiceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceConfig 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.networkconnectivity.v1beta.ServiceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfigOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfigOrBuilder.java new file mode 100644 index 000000000000..3e5583376979 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/ServiceConfigOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface ServiceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.ServiceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The eligibility criteria for the service.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for eligibilityCriteria. + */ + int getEligibilityCriteriaValue(); + + /** + * + * + *
+   * Output only. The eligibility criteria for the service.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria eligibility_criteria = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The eligibilityCriteria. + */ + com.google.cloud.networkconnectivity.v1beta.ServiceConfig.EligibilityCriteria + getEligibilityCriteria(); + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the supportEndTime field is set. + */ + boolean hasSupportEndTime(); + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The supportEndTime. + */ + com.google.protobuf.Timestamp getSupportEndTime(); + + /** + * + * + *
+   * Output only. The end time for eligibility criteria support. If not
+   * specified, no planned end time is set.
+   * 
+ * + * + * .google.protobuf.Timestamp support_end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getSupportEndTimeOrBuilder(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Spoke.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Spoke.java new file mode 100644 index 000000000000..9e1b662ef5db --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Spoke.java @@ -0,0 +1,7100 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * A Network Connectivity Center spoke represents one or more network
+ * connectivity resources.
+ *
+ * When you create a spoke, you associate it with a hub. You must also
+ * identify a value for exactly one of the following fields:
+ *
+ * * linked_vpn_tunnels
+ * * linked_interconnect_attachments
+ * * linked_router_appliance_instances
+ * * linked_vpc_network
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Spoke} + */ +@com.google.protobuf.Generated +public final class Spoke extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Spoke) + SpokeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Spoke"); + } + + // Use Spoke.newBuilder() to construct. + private Spoke(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Spoke() { + name_ = ""; + description_ = ""; + hub_ = ""; + group_ = ""; + uniqueId_ = ""; + state_ = 0; + reasons_ = java.util.Collections.emptyList(); + spokeType_ = 0; + etag_ = ""; + fieldPathsPendingUpdate_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Spoke.class, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder.class); + } + + public interface StateReasonOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Spoke.StateReason) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code getCode(); + + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The message. + */ + java.lang.String getMessage(); + + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + java.lang.String getUserDetails(); + + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + com.google.protobuf.ByteString getUserDetailsBytes(); + } + + /** + * + * + *
+   * The reason for the current state of the spoke.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Spoke.StateReason} + */ + public static final class StateReason extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Spoke.StateReason) + StateReasonOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StateReason"); + } + + // Use StateReason.newBuilder() to construct. + private StateReason(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StateReason() { + code_ = 0; + message_ = ""; + userDetails_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.class, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder.class); + } + + /** + * + * + *
+     * The Code enum represents the various reasons for the state of the spoke.
+     * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code} + */ + public enum Code implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * No information available.
+       * 
+ * + * CODE_UNSPECIFIED = 0; + */ + CODE_UNSPECIFIED(0), + /** + * + * + *
+       * The proposed spoke is pending review.
+       * 
+ * + * PENDING_REVIEW = 1; + */ + PENDING_REVIEW(1), + /** + * + * + *
+       * The proposed spoke has been rejected by the hub administrator.
+       * 
+ * + * REJECTED = 2; + */ + REJECTED(2), + /** + * + * + *
+       * The spoke has been deactivated internally.
+       * 
+ * + * PAUSED = 3; + */ + PAUSED(3), + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke.
+       * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+       * The proposed spoke update is pending review.
+       * 
+ * + * UPDATE_PENDING_REVIEW = 5; + */ + UPDATE_PENDING_REVIEW(5), + /** + * + * + *
+       * The proposed spoke update has been rejected by the hub administrator.
+       * 
+ * + * UPDATE_REJECTED = 6; + */ + UPDATE_REJECTED(6), + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke update.
+       * 
+ * + * UPDATE_FAILED = 7; + */ + UPDATE_FAILED(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Code"); + } + + /** + * + * + *
+       * No information available.
+       * 
+ * + * CODE_UNSPECIFIED = 0; + */ + public static final int CODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The proposed spoke is pending review.
+       * 
+ * + * PENDING_REVIEW = 1; + */ + public static final int PENDING_REVIEW_VALUE = 1; + + /** + * + * + *
+       * The proposed spoke has been rejected by the hub administrator.
+       * 
+ * + * REJECTED = 2; + */ + public static final int REJECTED_VALUE = 2; + + /** + * + * + *
+       * The spoke has been deactivated internally.
+       * 
+ * + * PAUSED = 3; + */ + public static final int PAUSED_VALUE = 3; + + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke.
+       * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + /** + * + * + *
+       * The proposed spoke update is pending review.
+       * 
+ * + * UPDATE_PENDING_REVIEW = 5; + */ + public static final int UPDATE_PENDING_REVIEW_VALUE = 5; + + /** + * + * + *
+       * The proposed spoke update has been rejected by the hub administrator.
+       * 
+ * + * UPDATE_REJECTED = 6; + */ + public static final int UPDATE_REJECTED_VALUE = 6; + + /** + * + * + *
+       * Network Connectivity Center encountered errors while accepting
+       * the spoke update.
+       * 
+ * + * UPDATE_FAILED = 7; + */ + public static final int UPDATE_FAILED_VALUE = 7; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Code 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 Code forNumber(int value) { + switch (value) { + case 0: + return CODE_UNSPECIFIED; + case 1: + return PENDING_REVIEW; + case 2: + return REJECTED; + case 3: + return PAUSED; + case 4: + return FAILED; + case 5: + return UPDATE_PENDING_REVIEW; + case 6: + return UPDATE_REJECTED; + case 7: + return UPDATE_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 Code findValueByNumber(int number) { + return Code.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Code[] VALUES = values(); + + public static Code 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 Code(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code) + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+     * The code associated with this reason.
+     * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + + /** + * + * + *
+     * Human-readable details about this reason.
+     * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DETAILS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object userDetails_ = ""; + + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + @java.lang.Override + public java.lang.String getUserDetails() { + java.lang.Object ref = userDetails_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDetails_ = s; + return s; + } + } + + /** + * + * + *
+     * Additional information provided by the user in the RejectSpoke call.
+     * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserDetailsBytes() { + java.lang.Object ref = userDetails_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userDetails_ = 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 (code_ + != com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, message_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userDetails_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, userDetails_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ + != com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, message_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userDetails_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, userDetails_); + } + 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.networkconnectivity.v1beta.Spoke.StateReason)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason other = + (com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason) obj; + + if (code_ != other.code_) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (!getUserDetails().equals(other.getUserDetails())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + USER_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getUserDetails().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason 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.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason 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.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The reason for the current state of the spoke.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Spoke.StateReason} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Spoke.StateReason) + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.class, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + message_ = ""; + userDetails_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_StateReason_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason build() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason result = + new com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userDetails_ = userDetails_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.getDefaultInstance()) + return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserDetails().isEmpty()) { + userDetails_ = other.userDetails_; + 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 8: + { + code_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + userDetails_ = 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 int code_ = 0; + + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code getCode() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.forNumber(code_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + code_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * The code associated with this reason.
+       * 
+ * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Human-readable details about this reason.
+       * 
+ * + * string message = 2; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userDetails_ = ""; + + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return The userDetails. + */ + public java.lang.String getUserDetails() { + java.lang.Object ref = userDetails_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userDetails_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return The bytes for userDetails. + */ + public com.google.protobuf.ByteString getUserDetailsBytes() { + java.lang.Object ref = userDetails_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userDetails_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @param value The userDetails to set. + * @return This builder for chaining. + */ + public Builder setUserDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userDetails_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserDetails() { + userDetails_ = getDefaultInstance().getUserDetails(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Additional information provided by the user in the RejectSpoke call.
+       * 
+ * + * string user_details = 3; + * + * @param value The bytes for userDetails to set. + * @return This builder for chaining. + */ + public Builder setUserDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userDetails_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Spoke.StateReason) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Spoke.StateReason) + private static final com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateReason 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.networkconnectivity.v1beta.Spoke.StateReason + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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. The time the spoke was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time the spoke 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. The time the spoke 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. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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; + } + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. An optional description of the spoke.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional description of the spoke.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HUB_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object hub_ = ""; + + /** + * + * + *
+   * Immutable. The name of the hub that this spoke is attached to.
+   * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The hub. + */ + @java.lang.Override + public java.lang.String getHub() { + java.lang.Object ref = hub_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hub_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The name of the hub that this spoke is attached to.
+   * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hub. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHubBytes() { + java.lang.Object ref = hub_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private volatile java.lang.Object group_ = ""; + + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINKED_VPN_TUNNELS_FIELD_NUMBER = 17; + private com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linkedVpnTunnels_; + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpnTunnels field is set. + */ + @java.lang.Override + public boolean hasLinkedVpnTunnels() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpnTunnels. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels getLinkedVpnTunnels() { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; + } + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder + getLinkedVpnTunnelsOrBuilder() { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; + } + + public static final int LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER = 18; + private com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + linkedInterconnectAttachments_; + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedInterconnectAttachments field is set. + */ + @java.lang.Override + public boolean hasLinkedInterconnectAttachments() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedInterconnectAttachments. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + getLinkedInterconnectAttachments() { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; + } + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder + getLinkedInterconnectAttachmentsOrBuilder() { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; + } + + public static final int LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER = 19; + private com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + linkedRouterApplianceInstances_; + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedRouterApplianceInstances field is set. + */ + @java.lang.Override + public boolean hasLinkedRouterApplianceInstances() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedRouterApplianceInstances. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getLinkedRouterApplianceInstances() { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; + } + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder + getLinkedRouterApplianceInstancesOrBuilder() { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; + } + + public static final int LINKED_VPC_NETWORK_FIELD_NUMBER = 20; + private com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linkedVpcNetwork_; + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpcNetwork field is set. + */ + @java.lang.Override + public boolean hasLinkedVpcNetwork() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpcNetwork. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork getLinkedVpcNetwork() { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder + getLinkedVpcNetworkOrBuilder() { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } + + public static final int GATEWAY_FIELD_NUMBER = 24; + private com.google.cloud.networkconnectivity.v1beta.Gateway gateway_; + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gateway field is set. + */ + @java.lang.Override + public boolean hasGateway() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gateway. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Gateway getGateway() { + return gateway_ == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance() + : gateway_; + } + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder getGatewayOrBuilder() { + return gateway_ == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance() + : gateway_; + } + + public static final int LINKED_PRODUCER_VPC_NETWORK_FIELD_NUMBER = 26; + private com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + linkedProducerVpcNetwork_; + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedProducerVpcNetwork field is set. + */ + @java.lang.Override + public boolean hasLinkedProducerVpcNetwork() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedProducerVpcNetwork. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getLinkedProducerVpcNetwork() { + return linkedProducerVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.getDefaultInstance() + : linkedProducerVpcNetwork_; + } + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder + getLinkedProducerVpcNetworkOrBuilder() { + return linkedProducerVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.getDefaultInstance() + : linkedProducerVpcNetwork_; + } + + public static final int UNIQUE_ID_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + @java.lang.Override + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 15; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED : result; + } + + public static final int REASONS_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private java.util.List reasons_; + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getReasonsList() { + return reasons_; + } + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder> + getReasonsOrBuilderList() { + return reasons_; + } + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getReasonsCount() { + return reasons_.size(); + } + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason getReasons(int index) { + return reasons_.get(index); + } + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder getReasonsOrBuilder( + int index) { + return reasons_.get(index); + } + + public static final int SPOKE_TYPE_FIELD_NUMBER = 22; + private int spokeType_ = 0; + + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1beta.SpokeType result = + com.google.cloud.networkconnectivity.v1beta.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeType.UNRECOGNIZED + : result; + } + + public static final int ETAG_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FIELD_PATHS_PENDING_UPDATE_FIELD_NUMBER = 28; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList fieldPathsPendingUpdate_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the fieldPathsPendingUpdate. + */ + public com.google.protobuf.ProtocolStringList getFieldPathsPendingUpdateList() { + return fieldPathsPendingUpdate_; + } + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of fieldPathsPendingUpdate. + */ + public int getFieldPathsPendingUpdateCount() { + return fieldPathsPendingUpdate_.size(); + } + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The fieldPathsPendingUpdate at the given index. + */ + public java.lang.String getFieldPathsPendingUpdate(int index) { + return fieldPathsPendingUpdate_.get(index); + } + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the fieldPathsPendingUpdate at the given index. + */ + public com.google.protobuf.ByteString getFieldPathsPendingUpdateBytes(int index) { + return fieldPathsPendingUpdate_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hub_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, hub_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(15, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(17, getLinkedVpnTunnels()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(18, getLinkedInterconnectAttachments()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(19, getLinkedRouterApplianceInstances()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(20, getLinkedVpcNetwork()); + } + for (int i = 0; i < reasons_.size(); i++) { + output.writeMessage(21, reasons_.get(i)); + } + if (spokeType_ + != com.google.cloud.networkconnectivity.v1beta.SpokeType.SPOKE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(22, spokeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 23, group_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(24, getGateway()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(26, getLinkedProducerVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 27, etag_); + } + for (int i = 0; i < fieldPathsPendingUpdate_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 28, fieldPathsPendingUpdate_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(hub_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, hub_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uniqueId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, uniqueId_); + } + if (state_ != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, state_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getLinkedVpnTunnels()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, getLinkedInterconnectAttachments()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 19, getLinkedRouterApplianceInstances()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getLinkedVpcNetwork()); + } + for (int i = 0; i < reasons_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, reasons_.get(i)); + } + if (spokeType_ + != com.google.cloud.networkconnectivity.v1beta.SpokeType.SPOKE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, spokeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(23, group_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getGateway()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 26, getLinkedProducerVpcNetwork()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(27, etag_); + } + { + int dataSize = 0; + for (int i = 0; i < fieldPathsPendingUpdate_.size(); i++) { + dataSize += computeStringSizeNoTag(fieldPathsPendingUpdate_.getRaw(i)); + } + size += dataSize; + size += 2 * getFieldPathsPendingUpdateList().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.networkconnectivity.v1beta.Spoke)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Spoke other = + (com.google.cloud.networkconnectivity.v1beta.Spoke) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getHub().equals(other.getHub())) return false; + if (!getGroup().equals(other.getGroup())) return false; + if (hasLinkedVpnTunnels() != other.hasLinkedVpnTunnels()) return false; + if (hasLinkedVpnTunnels()) { + if (!getLinkedVpnTunnels().equals(other.getLinkedVpnTunnels())) return false; + } + if (hasLinkedInterconnectAttachments() != other.hasLinkedInterconnectAttachments()) + return false; + if (hasLinkedInterconnectAttachments()) { + if (!getLinkedInterconnectAttachments().equals(other.getLinkedInterconnectAttachments())) + return false; + } + if (hasLinkedRouterApplianceInstances() != other.hasLinkedRouterApplianceInstances()) + return false; + if (hasLinkedRouterApplianceInstances()) { + if (!getLinkedRouterApplianceInstances().equals(other.getLinkedRouterApplianceInstances())) + return false; + } + if (hasLinkedVpcNetwork() != other.hasLinkedVpcNetwork()) return false; + if (hasLinkedVpcNetwork()) { + if (!getLinkedVpcNetwork().equals(other.getLinkedVpcNetwork())) return false; + } + if (hasGateway() != other.hasGateway()) return false; + if (hasGateway()) { + if (!getGateway().equals(other.getGateway())) return false; + } + if (hasLinkedProducerVpcNetwork() != other.hasLinkedProducerVpcNetwork()) return false; + if (hasLinkedProducerVpcNetwork()) { + if (!getLinkedProducerVpcNetwork().equals(other.getLinkedProducerVpcNetwork())) return false; + } + if (!getUniqueId().equals(other.getUniqueId())) return false; + if (state_ != other.state_) return false; + if (!getReasonsList().equals(other.getReasonsList())) return false; + if (spokeType_ != other.spokeType_) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getFieldPathsPendingUpdateList().equals(other.getFieldPathsPendingUpdateList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + HUB_FIELD_NUMBER; + hash = (53 * hash) + getHub().hashCode(); + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); + if (hasLinkedVpnTunnels()) { + hash = (37 * hash) + LINKED_VPN_TUNNELS_FIELD_NUMBER; + hash = (53 * hash) + getLinkedVpnTunnels().hashCode(); + } + if (hasLinkedInterconnectAttachments()) { + hash = (37 * hash) + LINKED_INTERCONNECT_ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getLinkedInterconnectAttachments().hashCode(); + } + if (hasLinkedRouterApplianceInstances()) { + hash = (37 * hash) + LINKED_ROUTER_APPLIANCE_INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getLinkedRouterApplianceInstances().hashCode(); + } + if (hasLinkedVpcNetwork()) { + hash = (37 * hash) + LINKED_VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getLinkedVpcNetwork().hashCode(); + } + if (hasGateway()) { + hash = (37 * hash) + GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getGateway().hashCode(); + } + if (hasLinkedProducerVpcNetwork()) { + hash = (37 * hash) + LINKED_PRODUCER_VPC_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getLinkedProducerVpcNetwork().hashCode(); + } + hash = (37 * hash) + UNIQUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getUniqueId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getReasonsCount() > 0) { + hash = (37 * hash) + REASONS_FIELD_NUMBER; + hash = (53 * hash) + getReasonsList().hashCode(); + } + hash = (37 * hash) + SPOKE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + spokeType_; + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (getFieldPathsPendingUpdateCount() > 0) { + hash = (37 * hash) + FIELD_PATHS_PENDING_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getFieldPathsPendingUpdateList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke 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.networkconnectivity.v1beta.Spoke parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke 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.networkconnectivity.v1beta.Spoke parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.networkconnectivity.v1beta.Spoke prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A Network Connectivity Center spoke represents one or more network
+   * connectivity resources.
+   *
+   * When you create a spoke, you associate it with a hub. You must also
+   * identify a value for exactly one of the following fields:
+   *
+   * * linked_vpn_tunnels
+   * * linked_interconnect_attachments
+   * * linked_router_appliance_instances
+   * * linked_vpc_network
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Spoke} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Spoke) + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Spoke.class, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Spoke.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetLinkedVpnTunnelsFieldBuilder(); + internalGetLinkedInterconnectAttachmentsFieldBuilder(); + internalGetLinkedRouterApplianceInstancesFieldBuilder(); + internalGetLinkedVpcNetworkFieldBuilder(); + internalGetGatewayFieldBuilder(); + internalGetLinkedProducerVpcNetworkFieldBuilder(); + internalGetReasonsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + hub_ = ""; + group_ = ""; + linkedVpnTunnels_ = null; + if (linkedVpnTunnelsBuilder_ != null) { + linkedVpnTunnelsBuilder_.dispose(); + linkedVpnTunnelsBuilder_ = null; + } + linkedInterconnectAttachments_ = null; + if (linkedInterconnectAttachmentsBuilder_ != null) { + linkedInterconnectAttachmentsBuilder_.dispose(); + linkedInterconnectAttachmentsBuilder_ = null; + } + linkedRouterApplianceInstances_ = null; + if (linkedRouterApplianceInstancesBuilder_ != null) { + linkedRouterApplianceInstancesBuilder_.dispose(); + linkedRouterApplianceInstancesBuilder_ = null; + } + linkedVpcNetwork_ = null; + if (linkedVpcNetworkBuilder_ != null) { + linkedVpcNetworkBuilder_.dispose(); + linkedVpcNetworkBuilder_ = null; + } + gateway_ = null; + if (gatewayBuilder_ != null) { + gatewayBuilder_.dispose(); + gatewayBuilder_ = null; + } + linkedProducerVpcNetwork_ = null; + if (linkedProducerVpcNetworkBuilder_ != null) { + linkedProducerVpcNetworkBuilder_.dispose(); + linkedProducerVpcNetworkBuilder_ = null; + } + uniqueId_ = ""; + state_ = 0; + if (reasonsBuilder_ == null) { + reasons_ = java.util.Collections.emptyList(); + } else { + reasons_ = null; + reasonsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00008000); + spokeType_ = 0; + etag_ = ""; + fieldPathsPendingUpdate_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_Spoke_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke build() { + com.google.cloud.networkconnectivity.v1beta.Spoke result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Spoke result = + new com.google.cloud.networkconnectivity.v1beta.Spoke(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.Spoke result) { + if (reasonsBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0)) { + reasons_ = java.util.Collections.unmodifiableList(reasons_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.reasons_ = reasons_; + } else { + result.reasons_ = reasonsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Spoke result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.hub_ = hub_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.group_ = group_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.linkedVpnTunnels_ = + linkedVpnTunnelsBuilder_ == null ? linkedVpnTunnels_ : linkedVpnTunnelsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.linkedInterconnectAttachments_ = + linkedInterconnectAttachmentsBuilder_ == null + ? linkedInterconnectAttachments_ + : linkedInterconnectAttachmentsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.linkedRouterApplianceInstances_ = + linkedRouterApplianceInstancesBuilder_ == null + ? linkedRouterApplianceInstances_ + : linkedRouterApplianceInstancesBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.linkedVpcNetwork_ = + linkedVpcNetworkBuilder_ == null ? linkedVpcNetwork_ : linkedVpcNetworkBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.gateway_ = gatewayBuilder_ == null ? gateway_ : gatewayBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.linkedProducerVpcNetwork_ = + linkedProducerVpcNetworkBuilder_ == null + ? linkedProducerVpcNetwork_ + : linkedProducerVpcNetworkBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.uniqueId_ = uniqueId_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.spokeType_ = spokeType_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + fieldPathsPendingUpdate_.makeImmutable(); + result.fieldPathsPendingUpdate_ = fieldPathsPendingUpdate_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Spoke) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Spoke) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Spoke other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getHub().isEmpty()) { + hub_ = other.hub_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasLinkedVpnTunnels()) { + mergeLinkedVpnTunnels(other.getLinkedVpnTunnels()); + } + if (other.hasLinkedInterconnectAttachments()) { + mergeLinkedInterconnectAttachments(other.getLinkedInterconnectAttachments()); + } + if (other.hasLinkedRouterApplianceInstances()) { + mergeLinkedRouterApplianceInstances(other.getLinkedRouterApplianceInstances()); + } + if (other.hasLinkedVpcNetwork()) { + mergeLinkedVpcNetwork(other.getLinkedVpcNetwork()); + } + if (other.hasGateway()) { + mergeGateway(other.getGateway()); + } + if (other.hasLinkedProducerVpcNetwork()) { + mergeLinkedProducerVpcNetwork(other.getLinkedProducerVpcNetwork()); + } + if (!other.getUniqueId().isEmpty()) { + uniqueId_ = other.uniqueId_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (reasonsBuilder_ == null) { + if (!other.reasons_.isEmpty()) { + if (reasons_.isEmpty()) { + reasons_ = other.reasons_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureReasonsIsMutable(); + reasons_.addAll(other.reasons_); + } + onChanged(); + } + } else { + if (!other.reasons_.isEmpty()) { + if (reasonsBuilder_.isEmpty()) { + reasonsBuilder_.dispose(); + reasonsBuilder_ = null; + reasons_ = other.reasons_; + bitField0_ = (bitField0_ & ~0x00008000); + reasonsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReasonsFieldBuilder() + : null; + } else { + reasonsBuilder_.addAllMessages(other.reasons_); + } + } + } + if (other.spokeType_ != 0) { + setSpokeTypeValue(other.getSpokeTypeValue()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00020000; + onChanged(); + } + if (!other.fieldPathsPendingUpdate_.isEmpty()) { + if (fieldPathsPendingUpdate_.isEmpty()) { + fieldPathsPendingUpdate_ = other.fieldPathsPendingUpdate_; + bitField0_ |= 0x00040000; + } else { + ensureFieldPathsPendingUpdateIsMutable(); + fieldPathsPendingUpdate_.addAll(other.fieldPathsPendingUpdate_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + hub_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 90: + { + uniqueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 90 + case 120: + { + state_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 138: + { + input.readMessage( + internalGetLinkedVpnTunnelsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 138 + case 146: + { + input.readMessage( + internalGetLinkedInterconnectAttachmentsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetLinkedRouterApplianceInstancesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 154 + case 162: + { + input.readMessage( + internalGetLinkedVpcNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 162 + case 170: + { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.parser(), + extensionRegistry); + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(m); + } else { + reasonsBuilder_.addMessage(m); + } + break; + } // case 170 + case 176: + { + spokeType_ = input.readEnum(); + bitField0_ |= 0x00010000; + break; + } // case 176 + case 186: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 186 + case 194: + { + input.readMessage(internalGetGatewayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 194 + case 210: + { + input.readMessage( + internalGetLinkedProducerVpcNetworkFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 210 + case 218: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 218 + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFieldPathsPendingUpdateIsMutable(); + fieldPathsPendingUpdate_.add(s); + break; + } // case 226 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the spoke. Spoke names must be unique. They use the
+     * following form:
+     * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The time the spoke 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. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the spoke 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. The time the spoke was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. The time the spoke was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * 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_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional labels in key-value pair format. For more information about
+     * labels, see [Requirements for
+     * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+     * 
+ * + * map<string, string> labels = 4; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. An optional description of the spoke.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of the spoke.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional description of the spoke.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of the spoke.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional description of the spoke.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object hub_ = ""; + + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The hub. + */ + public java.lang.String getHub() { + java.lang.Object ref = hub_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hub_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hub. + */ + public com.google.protobuf.ByteString getHubBytes() { + java.lang.Object ref = hub_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hub_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The hub to set. + * @return This builder for chaining. + */ + public Builder setHub(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hub_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearHub() { + hub_ = getDefaultInstance().getHub(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The name of the hub that this spoke is attached to.
+     * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for hub to set. + * @return This builder for chaining. + */ + public Builder setHubBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hub_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object group_ = ""; + + /** + * + * + *
+     * Optional. The name of the group that this spoke is associated with.
+     * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the group that this spoke is associated with.
+     * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the group that this spoke is associated with.
+     * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the group that this spoke is associated with.
+     * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + group_ = getDefaultInstance().getGroup(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the group that this spoke is associated with.
+     * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + group_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linkedVpnTunnels_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder> + linkedVpnTunnelsBuilder_; + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpnTunnels field is set. + */ + public boolean hasLinkedVpnTunnels() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpnTunnels. + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels getLinkedVpnTunnels() { + if (linkedVpnTunnelsBuilder_ == null) { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; + } else { + return linkedVpnTunnelsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels value) { + if (linkedVpnTunnelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedVpnTunnels_ = value; + } else { + linkedVpnTunnelsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder builderForValue) { + if (linkedVpnTunnelsBuilder_ == null) { + linkedVpnTunnels_ = builderForValue.build(); + } else { + linkedVpnTunnelsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLinkedVpnTunnels( + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels value) { + if (linkedVpnTunnelsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && linkedVpnTunnels_ != null + && linkedVpnTunnels_ + != com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels + .getDefaultInstance()) { + getLinkedVpnTunnelsBuilder().mergeFrom(value); + } else { + linkedVpnTunnels_ = value; + } + } else { + linkedVpnTunnelsBuilder_.mergeFrom(value); + } + if (linkedVpnTunnels_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinkedVpnTunnels() { + bitField0_ = (bitField0_ & ~0x00000080); + linkedVpnTunnels_ = null; + if (linkedVpnTunnelsBuilder_ != null) { + linkedVpnTunnelsBuilder_.dispose(); + linkedVpnTunnelsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder + getLinkedVpnTunnelsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetLinkedVpnTunnelsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder + getLinkedVpnTunnelsOrBuilder() { + if (linkedVpnTunnelsBuilder_ != null) { + return linkedVpnTunnelsBuilder_.getMessageOrBuilder(); + } else { + return linkedVpnTunnels_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.getDefaultInstance() + : linkedVpnTunnels_; + } + } + + /** + * + * + *
+     * Optional. VPN tunnels that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder> + internalGetLinkedVpnTunnelsFieldBuilder() { + if (linkedVpnTunnelsBuilder_ == null) { + linkedVpnTunnelsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder>( + getLinkedVpnTunnels(), getParentForChildren(), isClean()); + linkedVpnTunnels_ = null; + } + return linkedVpnTunnelsBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + linkedInterconnectAttachments_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder> + linkedInterconnectAttachmentsBuilder_; + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedInterconnectAttachments field is set. + */ + public boolean hasLinkedInterconnectAttachments() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedInterconnectAttachments. + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + getLinkedInterconnectAttachments() { + if (linkedInterconnectAttachmentsBuilder_ == null) { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; + } else { + return linkedInterconnectAttachmentsBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments value) { + if (linkedInterconnectAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedInterconnectAttachments_ = value; + } else { + linkedInterconnectAttachmentsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder + builderForValue) { + if (linkedInterconnectAttachmentsBuilder_ == null) { + linkedInterconnectAttachments_ = builderForValue.build(); + } else { + linkedInterconnectAttachmentsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLinkedInterconnectAttachments( + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments value) { + if (linkedInterconnectAttachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && linkedInterconnectAttachments_ != null + && linkedInterconnectAttachments_ + != com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance()) { + getLinkedInterconnectAttachmentsBuilder().mergeFrom(value); + } else { + linkedInterconnectAttachments_ = value; + } + } else { + linkedInterconnectAttachmentsBuilder_.mergeFrom(value); + } + if (linkedInterconnectAttachments_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinkedInterconnectAttachments() { + bitField0_ = (bitField0_ & ~0x00000100); + linkedInterconnectAttachments_ = null; + if (linkedInterconnectAttachmentsBuilder_ != null) { + linkedInterconnectAttachmentsBuilder_.dispose(); + linkedInterconnectAttachmentsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder + getLinkedInterconnectAttachmentsBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetLinkedInterconnectAttachmentsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder + getLinkedInterconnectAttachmentsOrBuilder() { + if (linkedInterconnectAttachmentsBuilder_ != null) { + return linkedInterconnectAttachmentsBuilder_.getMessageOrBuilder(); + } else { + return linkedInterconnectAttachments_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + .getDefaultInstance() + : linkedInterconnectAttachments_; + } + } + + /** + * + * + *
+     * Optional. VLAN attachments that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder> + internalGetLinkedInterconnectAttachmentsFieldBuilder() { + if (linkedInterconnectAttachmentsBuilder_ == null) { + linkedInterconnectAttachmentsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder>( + getLinkedInterconnectAttachments(), getParentForChildren(), isClean()); + linkedInterconnectAttachments_ = null; + } + return linkedInterconnectAttachmentsBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + linkedRouterApplianceInstances_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder> + linkedRouterApplianceInstancesBuilder_; + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedRouterApplianceInstances field is set. + */ + public boolean hasLinkedRouterApplianceInstances() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedRouterApplianceInstances. + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getLinkedRouterApplianceInstances() { + if (linkedRouterApplianceInstancesBuilder_ == null) { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; + } else { + return linkedRouterApplianceInstancesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances value) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedRouterApplianceInstances_ = value; + } else { + linkedRouterApplianceInstancesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder + builderForValue) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + linkedRouterApplianceInstances_ = builderForValue.build(); + } else { + linkedRouterApplianceInstancesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLinkedRouterApplianceInstances( + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances value) { + if (linkedRouterApplianceInstancesBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && linkedRouterApplianceInstances_ != null + && linkedRouterApplianceInstances_ + != com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance()) { + getLinkedRouterApplianceInstancesBuilder().mergeFrom(value); + } else { + linkedRouterApplianceInstances_ = value; + } + } else { + linkedRouterApplianceInstancesBuilder_.mergeFrom(value); + } + if (linkedRouterApplianceInstances_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinkedRouterApplianceInstances() { + bitField0_ = (bitField0_ & ~0x00000200); + linkedRouterApplianceInstances_ = null; + if (linkedRouterApplianceInstancesBuilder_ != null) { + linkedRouterApplianceInstancesBuilder_.dispose(); + linkedRouterApplianceInstancesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder + getLinkedRouterApplianceInstancesBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetLinkedRouterApplianceInstancesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder + getLinkedRouterApplianceInstancesOrBuilder() { + if (linkedRouterApplianceInstancesBuilder_ != null) { + return linkedRouterApplianceInstancesBuilder_.getMessageOrBuilder(); + } else { + return linkedRouterApplianceInstances_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + .getDefaultInstance() + : linkedRouterApplianceInstances_; + } + } + + /** + * + * + *
+     * Optional. Router appliance instances that are associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder> + internalGetLinkedRouterApplianceInstancesFieldBuilder() { + if (linkedRouterApplianceInstancesBuilder_ == null) { + linkedRouterApplianceInstancesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances, + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances.Builder, + com.google.cloud.networkconnectivity.v1beta + .LinkedRouterApplianceInstancesOrBuilder>( + getLinkedRouterApplianceInstances(), getParentForChildren(), isClean()); + linkedRouterApplianceInstances_ = null; + } + return linkedRouterApplianceInstancesBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linkedVpcNetwork_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder> + linkedVpcNetworkBuilder_; + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpcNetwork field is set. + */ + public boolean hasLinkedVpcNetwork() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpcNetwork. + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork getLinkedVpcNetwork() { + if (linkedVpcNetworkBuilder_ == null) { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } else { + return linkedVpcNetworkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork value) { + if (linkedVpcNetworkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedVpcNetwork_ = value; + } else { + linkedVpcNetworkBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder builderForValue) { + if (linkedVpcNetworkBuilder_ == null) { + linkedVpcNetwork_ = builderForValue.build(); + } else { + linkedVpcNetworkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLinkedVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork value) { + if (linkedVpcNetworkBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && linkedVpcNetwork_ != null + && linkedVpcNetwork_ + != com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork + .getDefaultInstance()) { + getLinkedVpcNetworkBuilder().mergeFrom(value); + } else { + linkedVpcNetwork_ = value; + } + } else { + linkedVpcNetworkBuilder_.mergeFrom(value); + } + if (linkedVpcNetwork_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinkedVpcNetwork() { + bitField0_ = (bitField0_ & ~0x00000400); + linkedVpcNetwork_ = null; + if (linkedVpcNetworkBuilder_ != null) { + linkedVpcNetworkBuilder_.dispose(); + linkedVpcNetworkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder + getLinkedVpcNetworkBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetLinkedVpcNetworkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder + getLinkedVpcNetworkOrBuilder() { + if (linkedVpcNetworkBuilder_ != null) { + return linkedVpcNetworkBuilder_.getMessageOrBuilder(); + } else { + return linkedVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.getDefaultInstance() + : linkedVpcNetwork_; + } + } + + /** + * + * + *
+     * Optional. VPC network that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder> + internalGetLinkedVpcNetworkFieldBuilder() { + if (linkedVpcNetworkBuilder_ == null) { + linkedVpcNetworkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder>( + getLinkedVpcNetwork(), getParentForChildren(), isClean()); + linkedVpcNetwork_ = null; + } + return linkedVpcNetworkBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Gateway gateway_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway, + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder> + gatewayBuilder_; + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gateway field is set. + */ + public boolean hasGateway() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gateway. + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway getGateway() { + if (gatewayBuilder_ == null) { + return gateway_ == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance() + : gateway_; + } else { + return gatewayBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGateway(com.google.cloud.networkconnectivity.v1beta.Gateway value) { + if (gatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gateway_ = value; + } else { + gatewayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGateway( + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder builderForValue) { + if (gatewayBuilder_ == null) { + gateway_ = builderForValue.build(); + } else { + gatewayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGateway(com.google.cloud.networkconnectivity.v1beta.Gateway value) { + if (gatewayBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && gateway_ != null + && gateway_ + != com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance()) { + getGatewayBuilder().mergeFrom(value); + } else { + gateway_ = value; + } + } else { + gatewayBuilder_.mergeFrom(value); + } + if (gateway_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGateway() { + bitField0_ = (bitField0_ & ~0x00000800); + gateway_ = null; + if (gatewayBuilder_ != null) { + gatewayBuilder_.dispose(); + gatewayBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Gateway.Builder getGatewayBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetGatewayFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder getGatewayOrBuilder() { + if (gatewayBuilder_ != null) { + return gatewayBuilder_.getMessageOrBuilder(); + } else { + return gateway_ == null + ? com.google.cloud.networkconnectivity.v1beta.Gateway.getDefaultInstance() + : gateway_; + } + } + + /** + * + * + *
+     * Optional. This is a gateway that can apply specialized processing to
+     * traffic going through it.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway, + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder> + internalGetGatewayFieldBuilder() { + if (gatewayBuilder_ == null) { + gatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Gateway, + com.google.cloud.networkconnectivity.v1beta.Gateway.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder>( + getGateway(), getParentForChildren(), isClean()); + gateway_ = null; + } + return gatewayBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + linkedProducerVpcNetwork_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder> + linkedProducerVpcNetworkBuilder_; + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedProducerVpcNetwork field is set. + */ + public boolean hasLinkedProducerVpcNetwork() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedProducerVpcNetwork. + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getLinkedProducerVpcNetwork() { + if (linkedProducerVpcNetworkBuilder_ == null) { + return linkedProducerVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + .getDefaultInstance() + : linkedProducerVpcNetwork_; + } else { + return linkedProducerVpcNetworkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedProducerVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork value) { + if (linkedProducerVpcNetworkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + linkedProducerVpcNetwork_ = value; + } else { + linkedProducerVpcNetworkBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLinkedProducerVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder + builderForValue) { + if (linkedProducerVpcNetworkBuilder_ == null) { + linkedProducerVpcNetwork_ = builderForValue.build(); + } else { + linkedProducerVpcNetworkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLinkedProducerVpcNetwork( + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork value) { + if (linkedProducerVpcNetworkBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && linkedProducerVpcNetwork_ != null + && linkedProducerVpcNetwork_ + != com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + .getDefaultInstance()) { + getLinkedProducerVpcNetworkBuilder().mergeFrom(value); + } else { + linkedProducerVpcNetwork_ = value; + } + } else { + linkedProducerVpcNetworkBuilder_.mergeFrom(value); + } + if (linkedProducerVpcNetwork_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLinkedProducerVpcNetwork() { + bitField0_ = (bitField0_ & ~0x00001000); + linkedProducerVpcNetwork_ = null; + if (linkedProducerVpcNetworkBuilder_ != null) { + linkedProducerVpcNetworkBuilder_.dispose(); + linkedProducerVpcNetworkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder + getLinkedProducerVpcNetworkBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetLinkedProducerVpcNetworkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder + getLinkedProducerVpcNetworkOrBuilder() { + if (linkedProducerVpcNetworkBuilder_ != null) { + return linkedProducerVpcNetworkBuilder_.getMessageOrBuilder(); + } else { + return linkedProducerVpcNetwork_ == null + ? com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + .getDefaultInstance() + : linkedProducerVpcNetwork_; + } + } + + /** + * + * + *
+     * Optional. The linked producer VPC that is associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder> + internalGetLinkedProducerVpcNetworkFieldBuilder() { + if (linkedProducerVpcNetworkBuilder_ == null) { + linkedProducerVpcNetworkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork.Builder, + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder>( + getLinkedProducerVpcNetwork(), getParentForChildren(), isClean()); + linkedProducerVpcNetwork_ = null; + } + return linkedProducerVpcNetworkBuilder_; + } + + private java.lang.Object uniqueId_ = ""; + + /** + * + * + *
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + public java.lang.String getUniqueId() { + java.lang.Object ref = uniqueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uniqueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + public com.google.protobuf.ByteString getUniqueIdBytes() { + java.lang.Object ref = uniqueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uniqueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uniqueId_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUniqueId() { + uniqueId_ = getDefaultInstance().getUniqueId(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The Google-generated UUID for the spoke. This value is unique
+     * across all spoke resources. If a spoke is deleted and another with the same
+     * name is created, the new spoke is assigned a different `unique_id`.
+     * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uniqueId to set. + * @return This builder for chaining. + */ + public Builder setUniqueIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uniqueId_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The current lifecycle state of this spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.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_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The current lifecycle state of this spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00004000); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List reasons_ = + java.util.Collections.emptyList(); + + private void ensureReasonsIsMutable() { + if (!((bitField0_ & 0x00008000) != 0)) { + reasons_ = + new java.util.ArrayList( + reasons_); + bitField0_ |= 0x00008000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder> + reasonsBuilder_; + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getReasonsList() { + if (reasonsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reasons_); + } else { + return reasonsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getReasonsCount() { + if (reasonsBuilder_ == null) { + return reasons_.size(); + } else { + return reasonsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason getReasons(int index) { + if (reasonsBuilder_ == null) { + return reasons_.get(index); + } else { + return reasonsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReasons( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.set(index, value); + onChanged(); + } else { + reasonsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setReasons( + int index, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.set(index, builderForValue.build()); + onChanged(); + } else { + reasonsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReasons(com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.add(value); + onChanged(); + } else { + reasonsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReasons( + int index, com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason value) { + if (reasonsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.add(index, value); + onChanged(); + } else { + reasonsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReasons( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(builderForValue.build()); + onChanged(); + } else { + reasonsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addReasons( + int index, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder builderForValue) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.add(index, builderForValue.build()); + onChanged(); + } else { + reasonsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllReasons( + java.lang.Iterable + values) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reasons_); + onChanged(); + } else { + reasonsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearReasons() { + if (reasonsBuilder_ == null) { + reasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + reasonsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeReasons(int index) { + if (reasonsBuilder_ == null) { + ensureReasonsIsMutable(); + reasons_.remove(index); + onChanged(); + } else { + reasonsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder getReasonsBuilder( + int index) { + return internalGetReasonsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder + getReasonsOrBuilder(int index) { + if (reasonsBuilder_ == null) { + return reasons_.get(index); + } else { + return reasonsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder> + getReasonsOrBuilderList() { + if (reasonsBuilder_ != null) { + return reasonsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reasons_); + } + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder + addReasonsBuilder() { + return internalGetReasonsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder addReasonsBuilder( + int index) { + return internalGetReasonsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The reasons for current state of the spoke.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getReasonsBuilderList() { + return internalGetReasonsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder> + internalGetReasonsFieldBuilder() { + if (reasonsBuilder_ == null) { + reasonsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Builder, + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder>( + reasons_, ((bitField0_ & 0x00008000) != 0), getParentForChildren(), isClean()); + reasons_ = null; + } + return reasonsBuilder_; + } + + private int spokeType_ = 0; + + /** + * + * + *
+     * Output only. The type of resource associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + + /** + * + * + *
+     * Output only. The type of resource associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeTypeValue(int value) { + spokeType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of resource associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1beta.SpokeType result = + com.google.cloud.networkconnectivity.v1beta.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The type of resource associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeType(com.google.cloud.networkconnectivity.v1beta.SpokeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00010000; + spokeType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The type of resource associated with the spoke.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeType() { + bitField0_ = (bitField0_ & ~0x00010000); + spokeType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList fieldPathsPendingUpdate_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFieldPathsPendingUpdateIsMutable() { + if (!fieldPathsPendingUpdate_.isModifiable()) { + fieldPathsPendingUpdate_ = + new com.google.protobuf.LazyStringArrayList(fieldPathsPendingUpdate_); + } + bitField0_ |= 0x00040000; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the fieldPathsPendingUpdate. + */ + public com.google.protobuf.ProtocolStringList getFieldPathsPendingUpdateList() { + fieldPathsPendingUpdate_.makeImmutable(); + return fieldPathsPendingUpdate_; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of fieldPathsPendingUpdate. + */ + public int getFieldPathsPendingUpdateCount() { + return fieldPathsPendingUpdate_.size(); + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The fieldPathsPendingUpdate at the given index. + */ + public java.lang.String getFieldPathsPendingUpdate(int index) { + return fieldPathsPendingUpdate_.get(index); + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the fieldPathsPendingUpdate at the given index. + */ + public com.google.protobuf.ByteString getFieldPathsPendingUpdateBytes(int index) { + return fieldPathsPendingUpdate_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The fieldPathsPendingUpdate to set. + * @return This builder for chaining. + */ + public Builder setFieldPathsPendingUpdate(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsPendingUpdateIsMutable(); + fieldPathsPendingUpdate_.set(index, value); + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The fieldPathsPendingUpdate to add. + * @return This builder for chaining. + */ + public Builder addFieldPathsPendingUpdate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsPendingUpdateIsMutable(); + fieldPathsPendingUpdate_.add(value); + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The fieldPathsPendingUpdate to add. + * @return This builder for chaining. + */ + public Builder addAllFieldPathsPendingUpdate(java.lang.Iterable values) { + ensureFieldPathsPendingUpdateIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldPathsPendingUpdate_); + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFieldPathsPendingUpdate() { + fieldPathsPendingUpdate_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields waiting for hub administrator's approval.
+     * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the fieldPathsPendingUpdate to add. + * @return This builder for chaining. + */ + public Builder addFieldPathsPendingUpdateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldPathsPendingUpdateIsMutable(); + fieldPathsPendingUpdate_.add(value); + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Spoke) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Spoke) + private static final com.google.cloud.networkconnectivity.v1beta.Spoke DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Spoke(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Spoke getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Spoke 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.networkconnectivity.v1beta.Spoke getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeName.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeName.java new file mode 100644 index 000000000000..2de4338446ea --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta; + +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 SpokeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_SPOKE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/spokes/{spoke}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String spoke; + + @Deprecated + protected SpokeName() { + project = null; + location = null; + spoke = null; + } + + private SpokeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + spoke = Preconditions.checkNotNull(builder.getSpoke()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSpoke() { + return spoke; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SpokeName of(String project, String location, String spoke) { + return newBuilder().setProject(project).setLocation(location).setSpoke(spoke).build(); + } + + public static String format(String project, String location, String spoke) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setSpoke(spoke) + .build() + .toString(); + } + + public static SpokeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_SPOKE.validatedMatch( + formattedString, "SpokeName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("spoke")); + } + + 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 (SpokeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_SPOKE.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 (spoke != null) { + fieldMapBuilder.put("spoke", spoke); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_SPOKE.instantiate( + "project", project, "location", location, "spoke", spoke); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + SpokeName that = ((SpokeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.spoke, that.spoke); + } + 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(spoke); + return h; + } + + /** Builder for projects/{project}/locations/{location}/spokes/{spoke}. */ + public static class Builder { + private String project; + private String location; + private String spoke; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getSpoke() { + return spoke; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setSpoke(String spoke) { + this.spoke = spoke; + return this; + } + + private Builder(SpokeName spokeName) { + this.project = spokeName.project; + this.location = spokeName.location; + this.spoke = spokeName.spoke; + } + + public SpokeName build() { + return new SpokeName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeOrBuilder.java new file mode 100644 index 000000000000..e51aa302d621 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeOrBuilder.java @@ -0,0 +1,815 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface SpokeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Spoke) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The name of the spoke. Spoke names must be unique. They use the
+   * following form:
+   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time the spoke 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. The time the spoke was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The time the spoke was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time the spoke was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional labels in key-value pair format. For more information about
+   * labels, see [Requirements for
+   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
+   * 
+ * + * map<string, string> labels = 4; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. An optional description of the spoke.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. An optional description of the spoke.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Immutable. The name of the hub that this spoke is attached to.
+   * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The hub. + */ + java.lang.String getHub(); + + /** + * + * + *
+   * Immutable. The name of the hub that this spoke is attached to.
+   * 
+ * + * + * string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for hub. + */ + com.google.protobuf.ByteString getHubBytes(); + + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The group. + */ + java.lang.String getGroup(); + + /** + * + * + *
+   * Optional. The name of the group that this spoke is associated with.
+   * 
+ * + * + * string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpnTunnels field is set. + */ + boolean hasLinkedVpnTunnels(); + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpnTunnels. + */ + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels getLinkedVpnTunnels(); + + /** + * + * + *
+   * Optional. VPN tunnels that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpnTunnels linked_vpn_tunnels = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.LinkedVpnTunnelsOrBuilder + getLinkedVpnTunnelsOrBuilder(); + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedInterconnectAttachments field is set. + */ + boolean hasLinkedInterconnectAttachments(); + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedInterconnectAttachments. + */ + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments + getLinkedInterconnectAttachments(); + + /** + * + * + *
+   * Optional. VLAN attachments that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachments linked_interconnect_attachments = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.LinkedInterconnectAttachmentsOrBuilder + getLinkedInterconnectAttachmentsOrBuilder(); + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedRouterApplianceInstances field is set. + */ + boolean hasLinkedRouterApplianceInstances(); + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedRouterApplianceInstances. + */ + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances + getLinkedRouterApplianceInstances(); + + /** + * + * + *
+   * Optional. Router appliance instances that are associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstances linked_router_appliance_instances = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.LinkedRouterApplianceInstancesOrBuilder + getLinkedRouterApplianceInstancesOrBuilder(); + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedVpcNetwork field is set. + */ + boolean hasLinkedVpcNetwork(); + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedVpcNetwork. + */ + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork getLinkedVpcNetwork(); + + /** + * + * + *
+   * Optional. VPC network that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.LinkedVpcNetworkOrBuilder + getLinkedVpcNetworkOrBuilder(); + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gateway field is set. + */ + boolean hasGateway(); + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gateway. + */ + com.google.cloud.networkconnectivity.v1beta.Gateway getGateway(); + + /** + * + * + *
+   * Optional. This is a gateway that can apply specialized processing to
+   * traffic going through it.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Gateway gateway = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.GatewayOrBuilder getGatewayOrBuilder(); + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the linkedProducerVpcNetwork field is set. + */ + boolean hasLinkedProducerVpcNetwork(); + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The linkedProducerVpcNetwork. + */ + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork + getLinkedProducerVpcNetwork(); + + /** + * + * + *
+   * Optional. The linked producer VPC that is associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkconnectivity.v1beta.LinkedProducerVpcNetworkOrBuilder + getLinkedProducerVpcNetworkOrBuilder(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uniqueId. + */ + java.lang.String getUniqueId(); + + /** + * + * + *
+   * Output only. The Google-generated UUID for the spoke. This value is unique
+   * across all spoke resources. If a spoke is deleted and another with the same
+   * name is created, the new spoke is assigned a different `unique_id`.
+   * 
+ * + * string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uniqueId. + */ + com.google.protobuf.ByteString getUniqueIdBytes(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The current lifecycle state of this spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getReasonsList(); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason getReasons(int index); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getReasonsCount(); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getReasonsOrBuilderList(); + + /** + * + * + *
+   * Output only. The reasons for current state of the spoke.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReasonOrBuilder getReasonsOrBuilder( + int index); + + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + int getSpokeTypeValue(); + + /** + * + * + *
+   * Output only. The type of resource associated with the spoke.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the fieldPathsPendingUpdate. + */ + java.util.List getFieldPathsPendingUpdateList(); + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of fieldPathsPendingUpdate. + */ + int getFieldPathsPendingUpdateCount(); + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The fieldPathsPendingUpdate at the given index. + */ + java.lang.String getFieldPathsPendingUpdate(int index); + + /** + * + * + *
+   * Optional. The list of fields waiting for hub administrator's approval.
+   * 
+ * + * + * repeated string field_paths_pending_update = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the fieldPathsPendingUpdate at the given index. + */ + com.google.protobuf.ByteString getFieldPathsPendingUpdateBytes(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummary.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummary.java new file mode 100644 index 000000000000..14fda0b2dfc6 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummary.java @@ -0,0 +1,4515 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Summarizes information about the spokes associated with a hub.
+ * The summary includes a count of spokes according to type
+ * and according to state. If any spokes are inactive,
+ * the summary also lists the reasons they are inactive,
+ * including a count for each reason.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary} + */ +@com.google.protobuf.Generated +public final class SpokeSummary extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary) + SpokeSummaryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeSummary"); + } + + // Use SpokeSummary.newBuilder() to construct. + private SpokeSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SpokeSummary() { + spokeTypeCounts_ = java.util.Collections.emptyList(); + spokeStateCounts_ = java.util.Collections.emptyList(); + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder.class); + } + + public interface SpokeTypeCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + int getSpokeTypeValue(); + + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType(); + + /** + * + * + *
+     * Output only. The total number of spokes of this type that are
+     * associated with the hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + + /** + * + * + *
+   * The number of spokes of a given type that are associated
+   * with a specific hub. The type indicates what kind of
+   * resource is associated with the spoke.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount} + */ + public static final class SpokeTypeCount extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) + SpokeTypeCountOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeTypeCount"); + } + + // Use SpokeTypeCount.newBuilder() to construct. + private SpokeTypeCount(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SpokeTypeCount() { + spokeType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + .class); + } + + public static final int SPOKE_TYPE_FIELD_NUMBER = 1; + private int spokeType_ = 0; + + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + + /** + * + * + *
+     * Output only. The type of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1beta.SpokeType result = + com.google.cloud.networkconnectivity.v1beta.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeType.UNRECOGNIZED + : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + + /** + * + * + *
+     * Output only. The total number of spokes of this type that are
+     * associated with the hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + 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 (spokeType_ + != com.google.cloud.networkconnectivity.v1beta.SpokeType.SPOKE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, spokeType_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (spokeType_ + != com.google.cloud.networkconnectivity.v1beta.SpokeType.SPOKE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, spokeType_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + 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.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount other = + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) obj; + + if (spokeType_ != other.spokeType_) return false; + if (getCount() != other.getCount()) 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) + SPOKE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + spokeType_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount 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.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount 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.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The number of spokes of a given type that are associated
+     * with a specific hub. The type indicates what kind of
+     * resource is associated with the spoke.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + spokeType_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeTypeCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount build() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount result = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.spokeType_ = spokeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + .getDefaultInstance()) return this; + if (other.spokeType_ != 0) { + setSpokeTypeValue(other.getSpokeTypeValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + 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: + { + spokeType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = 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 int spokeType_ = 0; + + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for spokeType. + */ + @java.lang.Override + public int getSpokeTypeValue() { + return spokeType_; + } + + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeTypeValue(int value) { + spokeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The spokeType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeType getSpokeType() { + com.google.cloud.networkconnectivity.v1beta.SpokeType result = + com.google.cloud.networkconnectivity.v1beta.SpokeType.forNumber(spokeType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.SpokeType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The spokeType to set. + * @return This builder for chaining. + */ + public Builder setSpokeType(com.google.cloud.networkconnectivity.v1beta.SpokeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + spokeType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The type of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSpokeType() { + bitField0_ = (bitField0_ & ~0x00000001); + spokeType_ = 0; + onChanged(); + return this; + } + + private long count_; + + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The total number of spokes of this type that are
+       * associated with the hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount) + private static final com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount(); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeTypeCount 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.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpokeStateCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.State getState(); + + /** + * + * + *
+     * Output only. The total number of spokes that are in this state
+     * and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + + /** + * + * + *
+   * The number of spokes that are in a particular state
+   * and associated with a given hub.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount} + */ + public static final class SpokeStateCount extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) + SpokeStateCountOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeStateCount"); + } + + // Use SpokeStateCount.newBuilder() to construct. + private SpokeStateCount(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SpokeStateCount() { + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + .class); + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the spokes.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + + /** + * + * + *
+     * Output only. The total number of spokes that are in this state
+     * and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + 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 (state_ + != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, state_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.networkconnectivity.v1beta.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount other = + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) obj; + + if (state_ != other.state_) return false; + if (getCount() != other.getCount()) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The number of spokes that are in a particular state
+     * and associated with a given hub.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount build() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount result = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + 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: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = 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 int state_ = 0; + + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.State getState() { + com.google.cloud.networkconnectivity.v1beta.State result = + com.google.cloud.networkconnectivity.v1beta.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the spokes.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private long count_; + + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The total number of spokes that are in this state
+       * and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount) + private static final com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount(); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeStateCount 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SpokeStateReasonCountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + int getStateReasonCodeValue(); + + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code getStateReasonCode(); + + /** + * + * + *
+     * Output only. The total number of spokes that are inactive for a
+     * particular reason and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + long getCount(); + } + + /** + * + * + *
+   * The number of spokes in the hub that are inactive for this reason.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount} + */ + public static final class SpokeStateReasonCount extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + SpokeStateReasonCountOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeStateReasonCount"); + } + + // Use SpokeStateReasonCount.newBuilder() to construct. + private SpokeStateReasonCount(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SpokeStateReasonCount() { + stateReasonCode_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + .class); + } + + public static final int STATE_REASON_CODE_FIELD_NUMBER = 1; + private int stateReasonCode_ = 0; + + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + @java.lang.Override + public int getStateReasonCodeValue() { + return stateReasonCode_; + } + + /** + * + * + *
+     * Output only. The reason that a spoke is inactive.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code getStateReasonCode() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.forNumber( + stateReasonCode_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + + /** + * + * + *
+     * Output only. The total number of spokes that are inactive for a
+     * particular reason and associated with a given hub.
+     * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + 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 (stateReasonCode_ + != com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, stateReasonCode_); + } + if (count_ != 0L) { + output.writeInt64(2, count_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (stateReasonCode_ + != com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.CODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, stateReasonCode_); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); + } + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount other = + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) obj; + + if (stateReasonCode_ != other.stateReasonCode_) return false; + if (getCount() != other.getCount()) 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) + STATE_REASON_CODE_FIELD_NUMBER; + hash = (53 * hash) + stateReasonCode_; + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The number of spokes in the hub that are inactive for this reason.
+     * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + stateReasonCode_ = 0; + count_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_SpokeStateReasonCount_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + build() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount result = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.stateReasonCode_ = stateReasonCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()) return this; + if (other.stateReasonCode_ != 0) { + setStateReasonCodeValue(other.getStateReasonCodeValue()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + 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: + { + stateReasonCode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + count_ = 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 int stateReasonCode_ = 0; + + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for stateReasonCode. + */ + @java.lang.Override + public int getStateReasonCodeValue() { + return stateReasonCode_; + } + + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for stateReasonCode to set. + * @return This builder for chaining. + */ + public Builder setStateReasonCodeValue(int value) { + stateReasonCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The stateReasonCode. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code + getStateReasonCode() { + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code result = + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.forNumber( + stateReasonCode_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The stateReasonCode to set. + * @return This builder for chaining. + */ + public Builder setStateReasonCode( + com.google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + stateReasonCode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The reason that a spoke is inactive.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStateReasonCode() { + bitField0_ = (bitField0_ & ~0x00000001); + stateReasonCode_ = 0; + onChanged(); + return this; + } + + private long count_; + + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The total number of spokes that are inactive for a
+       * particular reason and associated with a given hub.
+       * 
+ * + * int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount) + private static final com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount(); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeStateReasonCount 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.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SPOKE_TYPE_COUNTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + spokeTypeCounts_; + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSpokeTypeCountsList() { + return spokeTypeCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList() { + return spokeTypeCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeTypeCountsCount() { + return spokeTypeCounts_.size(); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount getSpokeTypeCounts( + int index) { + return spokeTypeCounts_.get(index); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index) { + return spokeTypeCounts_.get(index); + } + + public static final int SPOKE_STATE_COUNTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + spokeStateCounts_; + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSpokeStateCountsList() { + return spokeStateCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList() { + return spokeStateCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeStateCountsCount() { + return spokeStateCounts_.size(); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + getSpokeStateCounts(int index) { + return spokeStateCounts_.get(index); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index) { + return spokeStateCounts_.get(index); + } + + public static final int SPOKE_STATE_REASON_COUNTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount> + spokeStateReasonCounts_; + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount> + getSpokeStateReasonCountsList() { + return spokeStateReasonCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList() { + return spokeStateReasonCounts_; + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSpokeStateReasonCountsCount() { + return spokeStateReasonCounts_.size(); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index) { + return spokeStateReasonCounts_.get(index); + } + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index) { + return spokeStateReasonCounts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < spokeTypeCounts_.size(); i++) { + output.writeMessage(1, spokeTypeCounts_.get(i)); + } + for (int i = 0; i < spokeStateCounts_.size(); i++) { + output.writeMessage(2, spokeStateCounts_.get(i)); + } + for (int i = 0; i < spokeStateReasonCounts_.size(); i++) { + output.writeMessage(3, spokeStateReasonCounts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < spokeTypeCounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, spokeTypeCounts_.get(i)); + } + for (int i = 0; i < spokeStateCounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, spokeStateCounts_.get(i)); + } + for (int i = 0; i < spokeStateReasonCounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, spokeStateReasonCounts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.SpokeSummary)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.SpokeSummary other = + (com.google.cloud.networkconnectivity.v1beta.SpokeSummary) obj; + + if (!getSpokeTypeCountsList().equals(other.getSpokeTypeCountsList())) return false; + if (!getSpokeStateCountsList().equals(other.getSpokeStateCountsList())) return false; + if (!getSpokeStateReasonCountsList().equals(other.getSpokeStateReasonCountsList())) + 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 (getSpokeTypeCountsCount() > 0) { + hash = (37 * hash) + SPOKE_TYPE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeTypeCountsList().hashCode(); + } + if (getSpokeStateCountsCount() > 0) { + hash = (37 * hash) + SPOKE_STATE_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeStateCountsList().hashCode(); + } + if (getSpokeStateReasonCountsCount() > 0) { + hash = (37 * hash) + SPOKE_STATE_REASON_COUNTS_FIELD_NUMBER; + hash = (53 * hash) + getSpokeStateReasonCountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary 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.networkconnectivity.v1beta.SpokeSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary 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.networkconnectivity.v1beta.SpokeSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Summarizes information about the spokes associated with a hub.
+   * The summary includes a count of spokes according to type
+   * and according to state. If any spokes are inactive,
+   * the summary also lists the reasons they are inactive,
+   * including a count for each reason.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.SpokeSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.SpokeSummary) + com.google.cloud.networkconnectivity.v1beta.SpokeSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.class, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.SpokeSummary.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCounts_ = java.util.Collections.emptyList(); + } else { + spokeTypeCounts_ = null; + spokeTypeCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (spokeStateCountsBuilder_ == null) { + spokeStateCounts_ = java.util.Collections.emptyList(); + } else { + spokeStateCounts_ = null; + spokeStateCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + } else { + spokeStateReasonCounts_ = null; + spokeStateReasonCountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_SpokeSummary_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary build() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary buildPartial() { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary result = + new com.google.cloud.networkconnectivity.v1beta.SpokeSummary(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary result) { + if (spokeTypeCountsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + spokeTypeCounts_ = java.util.Collections.unmodifiableList(spokeTypeCounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.spokeTypeCounts_ = spokeTypeCounts_; + } else { + result.spokeTypeCounts_ = spokeTypeCountsBuilder_.build(); + } + if (spokeStateCountsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + spokeStateCounts_ = java.util.Collections.unmodifiableList(spokeStateCounts_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.spokeStateCounts_ = spokeStateCounts_; + } else { + result.spokeStateCounts_ = spokeStateCountsBuilder_.build(); + } + if (spokeStateReasonCountsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + spokeStateReasonCounts_ = java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.spokeStateReasonCounts_ = spokeStateReasonCounts_; + } else { + result.spokeStateReasonCounts_ = spokeStateReasonCountsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.SpokeSummary result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.SpokeSummary) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.SpokeSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.SpokeSummary other) { + if (other == com.google.cloud.networkconnectivity.v1beta.SpokeSummary.getDefaultInstance()) + return this; + if (spokeTypeCountsBuilder_ == null) { + if (!other.spokeTypeCounts_.isEmpty()) { + if (spokeTypeCounts_.isEmpty()) { + spokeTypeCounts_ = other.spokeTypeCounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.addAll(other.spokeTypeCounts_); + } + onChanged(); + } + } else { + if (!other.spokeTypeCounts_.isEmpty()) { + if (spokeTypeCountsBuilder_.isEmpty()) { + spokeTypeCountsBuilder_.dispose(); + spokeTypeCountsBuilder_ = null; + spokeTypeCounts_ = other.spokeTypeCounts_; + bitField0_ = (bitField0_ & ~0x00000001); + spokeTypeCountsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSpokeTypeCountsFieldBuilder() + : null; + } else { + spokeTypeCountsBuilder_.addAllMessages(other.spokeTypeCounts_); + } + } + } + if (spokeStateCountsBuilder_ == null) { + if (!other.spokeStateCounts_.isEmpty()) { + if (spokeStateCounts_.isEmpty()) { + spokeStateCounts_ = other.spokeStateCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.addAll(other.spokeStateCounts_); + } + onChanged(); + } + } else { + if (!other.spokeStateCounts_.isEmpty()) { + if (spokeStateCountsBuilder_.isEmpty()) { + spokeStateCountsBuilder_.dispose(); + spokeStateCountsBuilder_ = null; + spokeStateCounts_ = other.spokeStateCounts_; + bitField0_ = (bitField0_ & ~0x00000002); + spokeStateCountsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSpokeStateCountsFieldBuilder() + : null; + } else { + spokeStateCountsBuilder_.addAllMessages(other.spokeStateCounts_); + } + } + } + if (spokeStateReasonCountsBuilder_ == null) { + if (!other.spokeStateReasonCounts_.isEmpty()) { + if (spokeStateReasonCounts_.isEmpty()) { + spokeStateReasonCounts_ = other.spokeStateReasonCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.addAll(other.spokeStateReasonCounts_); + } + onChanged(); + } + } else { + if (!other.spokeStateReasonCounts_.isEmpty()) { + if (spokeStateReasonCountsBuilder_.isEmpty()) { + spokeStateReasonCountsBuilder_.dispose(); + spokeStateReasonCountsBuilder_ = null; + spokeStateReasonCounts_ = other.spokeStateReasonCounts_; + bitField0_ = (bitField0_ & ~0x00000004); + spokeStateReasonCountsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSpokeStateReasonCountsFieldBuilder() + : null; + } else { + spokeStateReasonCountsBuilder_.addAllMessages(other.spokeStateReasonCounts_); + } + } + } + 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.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + .parser(), + extensionRegistry); + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(m); + } else { + spokeTypeCountsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + .parser(), + extensionRegistry); + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(m); + } else { + spokeStateCountsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCount.parser(), + extensionRegistry); + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(m); + } else { + spokeStateReasonCountsBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + spokeTypeCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeTypeCountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + spokeTypeCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount>( + spokeTypeCounts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder> + spokeTypeCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSpokeTypeCountsList() { + if (spokeTypeCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeTypeCounts_); + } else { + return spokeTypeCountsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeTypeCountsCount() { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.size(); + } else { + return spokeTypeCountsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + getSpokeTypeCounts(int index) { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.get(index); + } else { + return spokeTypeCountsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeTypeCounts( + int index, com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.set(index, value); + onChanged(); + } else { + spokeTypeCountsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeTypeCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(value); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + int index, com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount value) { + if (spokeTypeCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(index, value); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeTypeCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + builderForValue) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeTypeCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeTypeCounts( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount> + values) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeTypeCounts_); + onChanged(); + } else { + spokeTypeCountsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeTypeCounts() { + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + spokeTypeCountsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeTypeCounts(int index) { + if (spokeTypeCountsBuilder_ == null) { + ensureSpokeTypeCountsIsMutable(); + spokeTypeCounts_.remove(index); + onChanged(); + } else { + spokeTypeCountsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + getSpokeTypeCountsBuilder(int index) { + return internalGetSpokeTypeCountsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index) { + if (spokeTypeCountsBuilder_ == null) { + return spokeTypeCounts_.get(index); + } else { + return spokeTypeCountsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList() { + if (spokeTypeCountsBuilder_ != null) { + return spokeTypeCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeTypeCounts_); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + addSpokeTypeCountsBuilder() { + return internalGetSpokeTypeCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder + addSpokeTypeCountsBuilder(int index) { + return internalGetSpokeTypeCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes of each type that are
+     * associated with a specific hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder> + getSpokeTypeCountsBuilderList() { + return internalGetSpokeTypeCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder> + internalGetSpokeTypeCountsFieldBuilder() { + if (spokeTypeCountsBuilder_ == null) { + spokeTypeCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder>( + spokeTypeCounts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + spokeTypeCounts_ = null; + } + return spokeTypeCountsBuilder_; + } + + private java.util.List + spokeStateCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeStateCountsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + spokeStateCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount>( + spokeStateCounts_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder> + spokeStateCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSpokeStateCountsList() { + if (spokeStateCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeStateCounts_); + } else { + return spokeStateCountsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeStateCountsCount() { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.size(); + } else { + return spokeStateCountsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + getSpokeStateCounts(int index) { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.get(index); + } else { + return spokeStateCountsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateCounts( + int index, com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.set(index, value); + onChanged(); + } else { + spokeStateCountsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(value); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + int index, com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount value) { + if (spokeStateCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(index, value); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + builderForValue) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeStateCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeStateCounts( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount> + values) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeStateCounts_); + onChanged(); + } else { + spokeStateCountsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeStateCounts() { + if (spokeStateCountsBuilder_ == null) { + spokeStateCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + spokeStateCountsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeStateCounts(int index) { + if (spokeStateCountsBuilder_ == null) { + ensureSpokeStateCountsIsMutable(); + spokeStateCounts_.remove(index); + onChanged(); + } else { + spokeStateCountsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + getSpokeStateCountsBuilder(int index) { + return internalGetSpokeStateCountsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index) { + if (spokeStateCountsBuilder_ == null) { + return spokeStateCounts_.get(index); + } else { + return spokeStateCountsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList() { + if (spokeStateCountsBuilder_ != null) { + return spokeStateCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeStateCounts_); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + addSpokeStateCountsBuilder() { + return internalGetSpokeStateCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder + addSpokeStateCountsBuilder(int index) { + return internalGetSpokeStateCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are in each state
+     * and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder> + getSpokeStateCountsBuilderList() { + return internalGetSpokeStateCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder> + internalGetSpokeStateCountsFieldBuilder() { + if (spokeStateCountsBuilder_ == null) { + spokeStateCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder>( + spokeStateCounts_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + spokeStateCounts_ = null; + } + return spokeStateCountsBuilder_; + } + + private java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount> + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + + private void ensureSpokeStateReasonCountsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + spokeStateReasonCounts_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount>( + spokeStateReasonCounts_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder> + spokeStateReasonCountsBuilder_; + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount> + getSpokeStateReasonCountsList() { + if (spokeStateReasonCountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + } else { + return spokeStateReasonCountsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSpokeStateReasonCountsCount() { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.size(); + } else { + return spokeStateReasonCountsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.get(index); + } else { + return spokeStateReasonCountsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.set(index, value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.set(index, builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount value) { + if (spokeStateReasonCountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(index, value); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSpokeStateReasonCounts( + int index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + builderForValue) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.add(index, builderForValue.build()); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSpokeStateReasonCounts( + java.lang.Iterable< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount> + values) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, spokeStateReasonCounts_); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSpokeStateReasonCounts() { + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSpokeStateReasonCounts(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + ensureSpokeStateReasonCountsIsMutable(); + spokeStateReasonCounts_.remove(index); + onChanged(); + } else { + spokeStateReasonCountsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + getSpokeStateReasonCountsBuilder(int index) { + return internalGetSpokeStateReasonCountsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index) { + if (spokeStateReasonCountsBuilder_ == null) { + return spokeStateReasonCounts_.get(index); + } else { + return spokeStateReasonCountsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList() { + if (spokeStateReasonCountsBuilder_ != null) { + return spokeStateReasonCountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(spokeStateReasonCounts_); + } + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + addSpokeStateReasonCountsBuilder() { + return internalGetSpokeStateReasonCountsFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder + addSpokeStateReasonCountsBuilder(int index) { + return internalGetSpokeStateReasonCountsFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Counts the number of spokes that are inactive for each
+     * possible reason and associated with a given hub.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder> + getSpokeStateReasonCountsBuilderList() { + return internalGetSpokeStateReasonCountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder> + internalGetSpokeStateReasonCountsFieldBuilder() { + if (spokeStateReasonCountsBuilder_ == null) { + spokeStateReasonCountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + .Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCountOrBuilder>( + spokeStateReasonCounts_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + spokeStateReasonCounts_ = null; + } + return spokeStateReasonCountsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.SpokeSummary) + private static final com.google.cloud.networkconnectivity.v1beta.SpokeSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.SpokeSummary(); + } + + public static com.google.cloud.networkconnectivity.v1beta.SpokeSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SpokeSummary 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.networkconnectivity.v1beta.SpokeSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummaryOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummaryOrBuilder.java new file mode 100644 index 000000000000..aa12e3c61ea6 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeSummaryOrBuilder.java @@ -0,0 +1,257 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface SpokeSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.SpokeSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeTypeCountsList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount getSpokeTypeCounts( + int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeTypeCountsCount(); + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder> + getSpokeTypeCountsOrBuilderList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes of each type that are
+   * associated with a specific hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeTypeCountOrBuilder + getSpokeTypeCountsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeStateCountsList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount getSpokeStateCounts( + int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeStateCountsCount(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder> + getSpokeStateCountsOrBuilderList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are in each state
+   * and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateCountOrBuilder + getSpokeStateCountsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSpokeStateReasonCountsList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount + getSpokeStateReasonCounts(int index); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSpokeStateReasonCountsCount(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.SpokeSummary + .SpokeStateReasonCountOrBuilder> + getSpokeStateReasonCountsOrBuilderList(); + + /** + * + * + *
+   * Output only. Counts the number of spokes that are inactive for each
+   * possible reason and associated with a given hub.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeSummary.SpokeStateReasonCountOrBuilder + getSpokeStateReasonCountsOrBuilder(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeType.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeType.java new file mode 100644 index 000000000000..119c4198feed --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/SpokeType.java @@ -0,0 +1,286 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The SpokeType enum represents the type of spoke. The type
+ * reflects the kind of resource that a spoke is associated with.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.SpokeType} + */ +@com.google.protobuf.Generated +public enum SpokeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified spoke type.
+   * 
+ * + * SPOKE_TYPE_UNSPECIFIED = 0; + */ + SPOKE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Spokes associated with VPN tunnels.
+   * 
+ * + * VPN_TUNNEL = 1; + */ + VPN_TUNNEL(1), + /** + * + * + *
+   * Spokes associated with VLAN attachments.
+   * 
+ * + * INTERCONNECT_ATTACHMENT = 2; + */ + INTERCONNECT_ATTACHMENT(2), + /** + * + * + *
+   * Spokes associated with router appliance instances.
+   * 
+ * + * ROUTER_APPLIANCE = 3; + */ + ROUTER_APPLIANCE(3), + /** + * + * + *
+   * Spokes associated with VPC networks.
+   * 
+ * + * VPC_NETWORK = 4; + */ + VPC_NETWORK(4), + /** + * + * + *
+   * Spokes that are NCC gateways.
+   * 
+ * + * GATEWAY = 5; + */ + GATEWAY(5), + /** + * + * + *
+   * Spokes that are backed by a producer VPC network.
+   * 
+ * + * PRODUCER_VPC_NETWORK = 7; + */ + PRODUCER_VPC_NETWORK(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SpokeType"); + } + + /** + * + * + *
+   * Unspecified spoke type.
+   * 
+ * + * SPOKE_TYPE_UNSPECIFIED = 0; + */ + public static final int SPOKE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Spokes associated with VPN tunnels.
+   * 
+ * + * VPN_TUNNEL = 1; + */ + public static final int VPN_TUNNEL_VALUE = 1; + + /** + * + * + *
+   * Spokes associated with VLAN attachments.
+   * 
+ * + * INTERCONNECT_ATTACHMENT = 2; + */ + public static final int INTERCONNECT_ATTACHMENT_VALUE = 2; + + /** + * + * + *
+   * Spokes associated with router appliance instances.
+   * 
+ * + * ROUTER_APPLIANCE = 3; + */ + public static final int ROUTER_APPLIANCE_VALUE = 3; + + /** + * + * + *
+   * Spokes associated with VPC networks.
+   * 
+ * + * VPC_NETWORK = 4; + */ + public static final int VPC_NETWORK_VALUE = 4; + + /** + * + * + *
+   * Spokes that are NCC gateways.
+   * 
+ * + * GATEWAY = 5; + */ + public static final int GATEWAY_VALUE = 5; + + /** + * + * + *
+   * Spokes that are backed by a producer VPC network.
+   * 
+ * + * PRODUCER_VPC_NETWORK = 7; + */ + public static final int PRODUCER_VPC_NETWORK_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 SpokeType 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 SpokeType forNumber(int value) { + switch (value) { + case 0: + return SPOKE_TYPE_UNSPECIFIED; + case 1: + return VPN_TUNNEL; + case 2: + return INTERCONNECT_ATTACHMENT; + case 3: + return ROUTER_APPLIANCE; + case 4: + return VPC_NETWORK; + case 5: + return GATEWAY; + case 7: + return PRODUCER_VPC_NETWORK; + 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 SpokeType findValueByNumber(int number) { + return SpokeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final SpokeType[] VALUES = values(); + + public static SpokeType 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 SpokeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.SpokeType) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/State.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/State.java new file mode 100644 index 000000000000..51c08c7b4a67 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/State.java @@ -0,0 +1,361 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The State enum represents the lifecycle stage of a Network Connectivity
+ * Center resource.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.State} + */ +@com.google.protobuf.Generated +public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No state information available
+   * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The resource's create operation is in progress.
+   * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+   * The resource is active
+   * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+   * The resource's delete operation is in progress.
+   * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+   * The resource's accept operation is in progress.
+   * 
+ * + * ACCEPTING = 8; + */ + ACCEPTING(8), + /** + * + * + *
+   * The resource's reject operation is in progress.
+   * 
+ * + * REJECTING = 9; + */ + REJECTING(9), + /** + * + * + *
+   * The resource's update operation is in progress.
+   * 
+ * + * UPDATING = 6; + */ + UPDATING(6), + /** + * + * + *
+   * The resource is inactive.
+   * 
+ * + * INACTIVE = 7; + */ + INACTIVE(7), + /** + * + * + *
+   * The hub associated with this spoke resource has been deleted.
+   * This state applies to spoke resources only.
+   * 
+ * + * OBSOLETE = 10; + */ + OBSOLETE(10), + /** + * + * + *
+   * The resource is in an undefined state due to resource creation or deletion
+   * failure. You can try to delete the resource later or contact support for
+   * help.
+   * 
+ * + * FAILED = 11; + */ + FAILED(11), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+   * No state information available
+   * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The resource's create operation is in progress.
+   * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+   * The resource is active
+   * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+   * The resource's delete operation is in progress.
+   * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+   * The resource's accept operation is in progress.
+   * 
+ * + * ACCEPTING = 8; + */ + public static final int ACCEPTING_VALUE = 8; + + /** + * + * + *
+   * The resource's reject operation is in progress.
+   * 
+ * + * REJECTING = 9; + */ + public static final int REJECTING_VALUE = 9; + + /** + * + * + *
+   * The resource's update operation is in progress.
+   * 
+ * + * UPDATING = 6; + */ + public static final int UPDATING_VALUE = 6; + + /** + * + * + *
+   * The resource is inactive.
+   * 
+ * + * INACTIVE = 7; + */ + public static final int INACTIVE_VALUE = 7; + + /** + * + * + *
+   * The hub associated with this spoke resource has been deleted.
+   * This state applies to spoke resources only.
+   * 
+ * + * OBSOLETE = 10; + */ + public static final int OBSOLETE_VALUE = 10; + + /** + * + * + *
+   * The resource is in an undefined state due to resource creation or deletion
+   * failure. You can try to delete the resource later or contact support for
+   * help.
+   * 
+ * + * FAILED = 11; + */ + public static final int FAILED_VALUE = 11; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return DELETING; + case 8: + return ACCEPTING; + case 9: + return REJECTING; + case 6: + return UPDATING; + case 7: + return INACTIVE; + case 10: + return OBSOLETE; + case 11: + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto.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.networkconnectivity.v1beta.State) +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimeline.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimeline.java new file mode 100644 index 000000000000..fd5f53328e2e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimeline.java @@ -0,0 +1,2293 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The timeline of the pending states for a resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.StateTimeline} + */ +@com.google.protobuf.Generated +public final class StateTimeline extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.StateTimeline) + StateTimelineOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StateTimeline"); + } + + // Use StateTimeline.newBuilder() to construct. + private StateTimeline(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StateTimeline() { + states_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.class, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder.class); + } + + public interface StateMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State getState(); + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveTime field is set. + */ + boolean hasEffectiveTime(); + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTime. + */ + com.google.protobuf.Timestamp getEffectiveTime(); + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder(); + } + + /** + * + * + *
+   * The state and activation time details of the resource state.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata} + */ + public static final class StateMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) + StateMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StateMetadata"); + } + + // Use StateMetadata.newBuilder() to construct. + private StateMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StateMetadata() { + state_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.class, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + .class); + } + + /** + * + * + *
+     * The state of the resource.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * An invalid state, which is the default case.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+       * The resource is being added.
+       * 
+ * + * ADDING = 1; + */ + ADDING(1), + /** + * + * + *
+       * The resource is in use.
+       * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+       * The resource is being deleted.
+       * 
+ * + * DELETING = 3; + */ + DELETING(3), + /** + * + * + *
+       * The resource is being suspended.
+       * 
+ * + * SUSPENDING = 4; + */ + SUSPENDING(4), + /** + * + * + *
+       * The resource is suspended and not in use.
+       * 
+ * + * SUSPENDED = 5; + */ + SUSPENDED(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+       * An invalid state, which is the default case.
+       * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The resource is being added.
+       * 
+ * + * ADDING = 1; + */ + public static final int ADDING_VALUE = 1; + + /** + * + * + *
+       * The resource is in use.
+       * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
+       * The resource is being deleted.
+       * 
+ * + * DELETING = 3; + */ + public static final int DELETING_VALUE = 3; + + /** + * + * + *
+       * The resource is being suspended.
+       * 
+ * + * SUSPENDING = 4; + */ + public static final int SUSPENDING_VALUE = 4; + + /** + * + * + *
+       * The resource is suspended and not in use.
+       * 
+ * + * SUSPENDED = 5; + */ + public static final int SUSPENDED_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 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 ADDING; + case 2: + return ACTIVE; + case 3: + return DELETING; + case 4: + return SUSPENDING; + case 5: + return SUSPENDED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .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.networkconnectivity.v1beta.StateTimeline.StateMetadata.State) + } + + private int bitField0_; + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the resource.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + getState() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State result = + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State.forNumber( + state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + .UNRECOGNIZED + : result; + } + + public static final int EFFECTIVE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp effectiveTime_; + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveTime field is set. + */ + @java.lang.Override + public boolean hasEffectiveTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEffectiveTime() { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + + /** + * + * + *
+     * Output only. Accompanies only the transient states, which include
+     * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+     * the transient state of the resource will be effective. For instance, if
+     * the state is `ADDING`, this field shows the time when the resource state
+     * transitions to `ACTIVE`.
+     * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + + 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 (state_ + != com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getEffectiveTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEffectiveTime()); + } + 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.networkconnectivity.v1beta.StateTimeline.StateMetadata)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata other = + (com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) obj; + + if (state_ != other.state_) return false; + if (hasEffectiveTime() != other.hasEffectiveTime()) return false; + if (hasEffectiveTime()) { + if (!getEffectiveTime().equals(other.getEffectiveTime())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasEffectiveTime()) { + hash = (37 * hash) + EFFECTIVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEffectiveTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata 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.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata 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.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The state and activation time details of the resource state.
+     * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.class, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEffectiveTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + effectiveTime_ = null; + if (effectiveTimeBuilder_ != null) { + effectiveTimeBuilder_.dispose(); + effectiveTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_StateMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata build() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata result = + new com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.effectiveTime_ = + effectiveTimeBuilder_ == null ? effectiveTime_ : effectiveTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasEffectiveTime()) { + mergeEffectiveTime(other.getEffectiveTime()); + } + 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: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetEffectiveTimeFieldBuilder().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 int state_ = 0; + + /** + * + * + *
+       * Output only. The state of the resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+       * Output only. The state of the resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.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_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + getState() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State result = + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State.forNumber( + state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The state of the resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The state of the resource.
+       * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp effectiveTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + effectiveTimeBuilder_; + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveTime field is set. + */ + public boolean hasEffectiveTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTime. + */ + public com.google.protobuf.Timestamp getEffectiveTime() { + if (effectiveTimeBuilder_ == null) { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } else { + return effectiveTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEffectiveTime(com.google.protobuf.Timestamp value) { + if (effectiveTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + effectiveTime_ = value; + } else { + effectiveTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEffectiveTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (effectiveTimeBuilder_ == null) { + effectiveTime_ = builderForValue.build(); + } else { + effectiveTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEffectiveTime(com.google.protobuf.Timestamp value) { + if (effectiveTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && effectiveTime_ != null + && effectiveTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEffectiveTimeBuilder().mergeFrom(value); + } else { + effectiveTime_ = value; + } + } else { + effectiveTimeBuilder_.mergeFrom(value); + } + if (effectiveTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEffectiveTime() { + bitField0_ = (bitField0_ & ~0x00000002); + effectiveTime_ = null; + if (effectiveTimeBuilder_ != null) { + effectiveTimeBuilder_.dispose(); + effectiveTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEffectiveTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEffectiveTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { + if (effectiveTimeBuilder_ != null) { + return effectiveTimeBuilder_.getMessageOrBuilder(); + } else { + return effectiveTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : effectiveTime_; + } + } + + /** + * + * + *
+       * Output only. Accompanies only the transient states, which include
+       * `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which
+       * the transient state of the resource will be effective. For instance, if
+       * the state is `ADDING`, this field shows the time when the resource state
+       * transitions to `ACTIVE`.
+       * 
+ * + * + * .google.protobuf.Timestamp effective_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetEffectiveTimeFieldBuilder() { + if (effectiveTimeBuilder_ == null) { + effectiveTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEffectiveTime(), getParentForChildren(), isClean()); + effectiveTime_ = null; + } + return effectiveTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata) + private static final com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata(); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateMetadata 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.networkconnectivity.v1beta.StateTimeline.StateMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int STATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + states_; + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getStatesList() { + return states_; + } + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder> + getStatesOrBuilderList() { + return states_; + } + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getStatesCount() { + return states_.size(); + } + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata getStates( + int index) { + return states_.get(index); + } + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder + getStatesOrBuilder(int index) { + return states_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < states_.size(); i++) { + output.writeMessage(1, states_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < states_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, states_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkconnectivity.v1beta.StateTimeline)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.StateTimeline other = + (com.google.cloud.networkconnectivity.v1beta.StateTimeline) obj; + + if (!getStatesList().equals(other.getStatesList())) 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 (getStatesCount() > 0) { + hash = (37 * hash) + STATES_FIELD_NUMBER; + hash = (53 * hash) + getStatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline 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.networkconnectivity.v1beta.StateTimeline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline 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.networkconnectivity.v1beta.StateTimeline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.StateTimeline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The timeline of the pending states for a resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.StateTimeline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.StateTimeline) + com.google.cloud.networkconnectivity.v1beta.StateTimelineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.class, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.StateTimeline.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (statesBuilder_ == null) { + states_ = java.util.Collections.emptyList(); + } else { + states_ = null; + statesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_StateTimeline_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline build() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.StateTimeline buildPartial() { + com.google.cloud.networkconnectivity.v1beta.StateTimeline result = + new com.google.cloud.networkconnectivity.v1beta.StateTimeline(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkconnectivity.v1beta.StateTimeline result) { + if (statesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + states_ = java.util.Collections.unmodifiableList(states_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.states_ = states_; + } else { + result.states_ = statesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.StateTimeline result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.StateTimeline) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.StateTimeline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.StateTimeline other) { + if (other == com.google.cloud.networkconnectivity.v1beta.StateTimeline.getDefaultInstance()) + return this; + if (statesBuilder_ == null) { + if (!other.states_.isEmpty()) { + if (states_.isEmpty()) { + states_ = other.states_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStatesIsMutable(); + states_.addAll(other.states_); + } + onChanged(); + } + } else { + if (!other.states_.isEmpty()) { + if (statesBuilder_.isEmpty()) { + statesBuilder_.dispose(); + statesBuilder_ = null; + states_ = other.states_; + bitField0_ = (bitField0_ & ~0x00000001); + statesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStatesFieldBuilder() + : null; + } else { + statesBuilder_.addAllMessages(other.states_); + } + } + } + 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.networkconnectivity.v1beta.StateTimeline.StateMetadata m = + input.readMessage( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .parser(), + extensionRegistry); + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + states_.add(m); + } else { + statesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + states_ = java.util.Collections.emptyList(); + + private void ensureStatesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + states_ = + new java.util.ArrayList< + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata>(states_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder> + statesBuilder_; + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getStatesList() { + if (statesBuilder_ == null) { + return java.util.Collections.unmodifiableList(states_); + } else { + return statesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getStatesCount() { + if (statesBuilder_ == null) { + return states_.size(); + } else { + return statesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata getStates( + int index) { + if (statesBuilder_ == null) { + return states_.get(index); + } else { + return statesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStates( + int index, com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata value) { + if (statesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatesIsMutable(); + states_.set(index, value); + onChanged(); + } else { + statesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStates( + int index, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + builderForValue) { + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + states_.set(index, builderForValue.build()); + onChanged(); + } else { + statesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStates( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata value) { + if (statesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatesIsMutable(); + states_.add(value); + onChanged(); + } else { + statesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStates( + int index, com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata value) { + if (statesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatesIsMutable(); + states_.add(index, value); + onChanged(); + } else { + statesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStates( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + builderForValue) { + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + states_.add(builderForValue.build()); + onChanged(); + } else { + statesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addStates( + int index, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + builderForValue) { + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + states_.add(index, builderForValue.build()); + onChanged(); + } else { + statesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllStates( + java.lang.Iterable< + ? extends com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata> + values) { + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, states_); + onChanged(); + } else { + statesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStates() { + if (statesBuilder_ == null) { + states_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + statesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeStates(int index) { + if (statesBuilder_ == null) { + ensureStatesIsMutable(); + states_.remove(index); + onChanged(); + } else { + statesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + getStatesBuilder(int index) { + return internalGetStatesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder + getStatesOrBuilder(int index) { + if (statesBuilder_ == null) { + return states_.get(index); + } else { + return statesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder> + getStatesOrBuilderList() { + if (statesBuilder_ != null) { + return statesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(states_); + } + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + addStatesBuilder() { + return internalGetStatesFieldBuilder() + .addBuilder( + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder + addStatesBuilder(int index) { + return internalGetStatesFieldBuilder() + .addBuilder( + index, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata + .getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The state and activation time details of the resource state.
+     * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder> + getStatesBuilderList() { + return internalGetStatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder> + internalGetStatesFieldBuilder() { + if (statesBuilder_ == null) { + statesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata.Builder, + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder>( + states_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + states_ = null; + } + return statesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.StateTimeline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.StateTimeline) + private static final com.google.cloud.networkconnectivity.v1beta.StateTimeline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.StateTimeline(); + } + + public static com.google.cloud.networkconnectivity.v1beta.StateTimeline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StateTimeline 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.networkconnectivity.v1beta.StateTimeline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimelineOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimelineOrBuilder.java new file mode 100644 index 000000000000..dbc3c7a64b51 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/StateTimelineOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface StateTimelineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.StateTimeline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getStatesList(); + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata getStates(int index); + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getStatesCount(); + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder> + getStatesOrBuilderList(); + + /** + * + * + *
+   * Output only. The state and activation time details of the resource state.
+   * 
+ * + * + * repeated .google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadata states = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkconnectivity.v1beta.StateTimeline.StateMetadataOrBuilder + getStatesOrBuilder(int index); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Transport.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Transport.java new file mode 100644 index 000000000000..8454b5ed5254 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/Transport.java @@ -0,0 +1,4945 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message describing Transport object.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Transport} + */ +@com.google.protobuf.Generated +public final class Transport extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.Transport) + TransportOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Transport"); + } + + // Use Transport.newBuilder() to construct. + private Transport(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Transport() { + name_ = ""; + description_ = ""; + remoteProfile_ = ""; + providedActivationKey_ = ""; + generatedActivationKey_ = ""; + bandwidth_ = 0; + stackType_ = 0; + state_ = 0; + network_ = ""; + advertisedRoutes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + remoteAccountId_ = ""; + peeringNetwork_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Transport.class, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder.class); + } + + /** + * + * + *
+   * Supported bandwidth options.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.Transport.Bandwidth} + */ + public enum Bandwidth implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified bandwidth.
+     * 
+ * + * BANDWIDTH_UNSPECIFIED = 0; + */ + BANDWIDTH_UNSPECIFIED(0), + /** + * + * + *
+     * 50 Megabits per second.
+     * 
+ * + * BPS_50M = 1; + */ + BPS_50M(1), + /** + * + * + *
+     * 100 Megabits per second.
+     * 
+ * + * BPS_100M = 2; + */ + BPS_100M(2), + /** + * + * + *
+     * 200 Megabits per second.
+     * 
+ * + * BPS_200M = 3; + */ + BPS_200M(3), + /** + * + * + *
+     * 300 Megabits per second.
+     * 
+ * + * BPS_300M = 4; + */ + BPS_300M(4), + /** + * + * + *
+     * 400 Megabits per second.
+     * 
+ * + * BPS_400M = 5; + */ + BPS_400M(5), + /** + * + * + *
+     * 500 Megabits per second.
+     * 
+ * + * BPS_500M = 6; + */ + BPS_500M(6), + /** + * + * + *
+     * 1 Gigabit per second.
+     * 
+ * + * BPS_1G = 7; + */ + BPS_1G(7), + /** + * + * + *
+     * 2 Gigabits per second.
+     * 
+ * + * BPS_2G = 8; + */ + BPS_2G(8), + /** + * + * + *
+     * 5 Gigabits per second.
+     * 
+ * + * BPS_5G = 9; + */ + BPS_5G(9), + /** + * + * + *
+     * 10 Gigabits per second.
+     * 
+ * + * BPS_10G = 10; + */ + BPS_10G(10), + /** + * + * + *
+     * 20 Gigabits per second.
+     * 
+ * + * BPS_20G = 11; + */ + BPS_20G(11), + /** + * + * + *
+     * 50 Gigabits per second.
+     * 
+ * + * BPS_50G = 12; + */ + BPS_50G(12), + /** + * + * + *
+     * 100 Gigabits per second.
+     * 
+ * + * BPS_100G = 13; + */ + BPS_100G(13), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Bandwidth"); + } + + /** + * + * + *
+     * Unspecified bandwidth.
+     * 
+ * + * BANDWIDTH_UNSPECIFIED = 0; + */ + public static final int BANDWIDTH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * 50 Megabits per second.
+     * 
+ * + * BPS_50M = 1; + */ + public static final int BPS_50M_VALUE = 1; + + /** + * + * + *
+     * 100 Megabits per second.
+     * 
+ * + * BPS_100M = 2; + */ + public static final int BPS_100M_VALUE = 2; + + /** + * + * + *
+     * 200 Megabits per second.
+     * 
+ * + * BPS_200M = 3; + */ + public static final int BPS_200M_VALUE = 3; + + /** + * + * + *
+     * 300 Megabits per second.
+     * 
+ * + * BPS_300M = 4; + */ + public static final int BPS_300M_VALUE = 4; + + /** + * + * + *
+     * 400 Megabits per second.
+     * 
+ * + * BPS_400M = 5; + */ + public static final int BPS_400M_VALUE = 5; + + /** + * + * + *
+     * 500 Megabits per second.
+     * 
+ * + * BPS_500M = 6; + */ + public static final int BPS_500M_VALUE = 6; + + /** + * + * + *
+     * 1 Gigabit per second.
+     * 
+ * + * BPS_1G = 7; + */ + public static final int BPS_1G_VALUE = 7; + + /** + * + * + *
+     * 2 Gigabits per second.
+     * 
+ * + * BPS_2G = 8; + */ + public static final int BPS_2G_VALUE = 8; + + /** + * + * + *
+     * 5 Gigabits per second.
+     * 
+ * + * BPS_5G = 9; + */ + public static final int BPS_5G_VALUE = 9; + + /** + * + * + *
+     * 10 Gigabits per second.
+     * 
+ * + * BPS_10G = 10; + */ + public static final int BPS_10G_VALUE = 10; + + /** + * + * + *
+     * 20 Gigabits per second.
+     * 
+ * + * BPS_20G = 11; + */ + public static final int BPS_20G_VALUE = 11; + + /** + * + * + *
+     * 50 Gigabits per second.
+     * 
+ * + * BPS_50G = 12; + */ + public static final int BPS_50G_VALUE = 12; + + /** + * + * + *
+     * 100 Gigabits per second.
+     * 
+ * + * BPS_100G = 13; + */ + public static final int BPS_100G_VALUE = 13; + + 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 Bandwidth 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 Bandwidth forNumber(int value) { + switch (value) { + case 0: + return BANDWIDTH_UNSPECIFIED; + case 1: + return BPS_50M; + case 2: + return BPS_100M; + case 3: + return BPS_200M; + case 4: + return BPS_300M; + case 5: + return BPS_400M; + case 6: + return BPS_500M; + case 7: + return BPS_1G; + case 8: + return BPS_2G; + case 9: + return BPS_5G; + case 10: + return BPS_10G; + case 11: + return BPS_20G; + case 12: + return BPS_50G; + case 13: + return BPS_100G; + 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 Bandwidth findValueByNumber(int number) { + return Bandwidth.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Transport.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Bandwidth[] VALUES = values(); + + public static Bandwidth 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 Bandwidth(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.Transport.Bandwidth) + } + + /** + * + * + *
+   * IP version stack for the established connectivity.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.Transport.StackType} + */ + public enum StackType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified stack type.
+     * 
+ * + * STACK_TYPE_UNSPECIFIED = 0; + */ + STACK_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Only IPv4 is supported. (default)
+     * 
+ * + * IPV4_ONLY = 1; + */ + IPV4_ONLY(1), + /** + * + * + *
+     * Both IPv4 and IPv6 are supported.
+     * 
+ * + * IPV4_IPV6 = 2; + */ + IPV4_IPV6(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StackType"); + } + + /** + * + * + *
+     * Unspecified stack type.
+     * 
+ * + * STACK_TYPE_UNSPECIFIED = 0; + */ + public static final int STACK_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Only IPv4 is supported. (default)
+     * 
+ * + * IPV4_ONLY = 1; + */ + public static final int IPV4_ONLY_VALUE = 1; + + /** + * + * + *
+     * Both IPv4 and IPv6 are supported.
+     * 
+ * + * IPV4_IPV6 = 2; + */ + public static final int IPV4_IPV6_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 StackType 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 StackType forNumber(int value) { + switch (value) { + case 0: + return STACK_TYPE_UNSPECIFIED; + case 1: + return IPV4_ONLY; + case 2: + return IPV4_IPV6; + 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 StackType findValueByNumber(int number) { + return StackType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Transport.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final StackType[] VALUES = values(); + + public static StackType 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 StackType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkconnectivity.v1beta.Transport.StackType) + } + + /** + * + * + *
+   * Represents the status of the underlying connectivity. One of
+   * the following states, depending on who has initiated the Transport request.
+   * 
+ * + * Protobuf enum {@code google.cloud.networkconnectivity.v1beta.Transport.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The resource exists locally and is being created / associated with the
+     * resource on the remote provider’s end of the underlying connectivity.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The Transport exists on both sides of the connection, and is waiting for
+     * configuration to finalize and be verified as operational.
+     * 
+ * + * PENDING_CONFIG = 2; + */ + PENDING_CONFIG(2), + /** + * + * + *
+     * The Transport was created in GCP. Depending on the profile’s key
+     * provisioning flow, this is either waiting for an activation key to be
+     * input (the key will be validated that it uses remote resources that match
+     * the Transport), or for the generated key to be input to the provider for
+     * finalizing. The configured bandwidth is not yet guaranteed.
+     * 
+ * + * PENDING_KEY = 3; + */ + PENDING_KEY(3), + /** + * + * + *
+     * The Transport is configured and the underlying connectivity is considered
+     * operational.
+     * 
+ * + * ACTIVE = 4; + */ + ACTIVE(4), + /** + * + * + *
+     * The Transport is being deleted from GCP. The underlying connectivity is
+     * no longer operational.
+     * 
+ * + * DELETING = 5; + */ + DELETING(5), + /** + * + * + *
+     * The Transport was deleted on the remote provider's end and is no longer
+     * operational. GCP has insufficient information to move the resource back
+     * to PENDING_KEY state.
+     * 
+ * + * DEPROVISIONED = 6; + */ + DEPROVISIONED(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The resource exists locally and is being created / associated with the
+     * resource on the remote provider’s end of the underlying connectivity.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
+     * The Transport exists on both sides of the connection, and is waiting for
+     * configuration to finalize and be verified as operational.
+     * 
+ * + * PENDING_CONFIG = 2; + */ + public static final int PENDING_CONFIG_VALUE = 2; + + /** + * + * + *
+     * The Transport was created in GCP. Depending on the profile’s key
+     * provisioning flow, this is either waiting for an activation key to be
+     * input (the key will be validated that it uses remote resources that match
+     * the Transport), or for the generated key to be input to the provider for
+     * finalizing. The configured bandwidth is not yet guaranteed.
+     * 
+ * + * PENDING_KEY = 3; + */ + public static final int PENDING_KEY_VALUE = 3; + + /** + * + * + *
+     * The Transport is configured and the underlying connectivity is considered
+     * operational.
+     * 
+ * + * ACTIVE = 4; + */ + public static final int ACTIVE_VALUE = 4; + + /** + * + * + *
+     * The Transport is being deleted from GCP. The underlying connectivity is
+     * no longer operational.
+     * 
+ * + * DELETING = 5; + */ + public static final int DELETING_VALUE = 5; + + /** + * + * + *
+     * The Transport was deleted on the remote provider's end and is no longer
+     * operational. GCP has insufficient information to move the resource back
+     * to PENDING_KEY state.
+     * 
+ * + * DEPROVISIONED = 6; + */ + public static final int DEPROVISIONED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return PENDING_CONFIG; + case 3: + return PENDING_KEY; + case 4: + return ACTIVE; + case 5: + return DELETING; + case 6: + return DEPROVISIONED; + 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.Transport.getDescriptor() + .getEnumTypes() + .get(2); + } + + 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.networkconnectivity.v1beta.Transport.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. Description of the Transport.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Description of the Transport.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOTE_PROFILE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object remoteProfile_ = ""; + + /** + * + * + *
+   * Optional. Name of the remoteTransportProfile that this Transport is
+   * connecting to.
+   * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The remoteProfile. + */ + @java.lang.Override + public java.lang.String getRemoteProfile() { + java.lang.Object ref = remoteProfile_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteProfile_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Name of the remoteTransportProfile that this Transport is
+   * connecting to.
+   * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for remoteProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteProfileBytes() { + java.lang.Object ref = remoteProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDED_ACTIVATION_KEY_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object providedActivationKey_ = ""; + + /** + * + * + *
+   * Optional. Key used for establishing a connection with the remote transport.
+   * This key can only be provided if the profile supports an INPUT key flow and
+   * the resource is in the PENDING_KEY state.
+   * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The providedActivationKey. + */ + @java.lang.Override + public java.lang.String getProvidedActivationKey() { + java.lang.Object ref = providedActivationKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providedActivationKey_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Key used for establishing a connection with the remote transport.
+   * This key can only be provided if the profile supports an INPUT key flow and
+   * the resource is in the PENDING_KEY state.
+   * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for providedActivationKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProvidedActivationKeyBytes() { + java.lang.Object ref = providedActivationKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providedActivationKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATED_ACTIVATION_KEY_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object generatedActivationKey_ = ""; + + /** + * + * + *
+   * Output only. Google-generated activation key. This is only output if the
+   * selected profile supports an OUTPUT key flow. Inputting this to the
+   * provider is only valid while the resource is in a PENDING_KEY state. Once
+   * the provider has accepted the key, the resource will move to the
+   * CONFIGURING state.
+   * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generatedActivationKey. + */ + @java.lang.Override + public java.lang.String getGeneratedActivationKey() { + java.lang.Object ref = generatedActivationKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + generatedActivationKey_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Google-generated activation key. This is only output if the
+   * selected profile supports an OUTPUT key flow. Inputting this to the
+   * provider is only valid while the resource is in a PENDING_KEY state. Once
+   * the provider has accepted the key, the resource will move to the
+   * CONFIGURING state.
+   * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for generatedActivationKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGeneratedActivationKeyBytes() { + java.lang.Object ref = generatedActivationKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + generatedActivationKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BANDWIDTH_FIELD_NUMBER = 10; + private int bandwidth_ = 0; + + /** + * + * + *
+   * Optional. Bandwidth of the Transport. This must be one of the supported
+   * bandwidths for the remote profile, and must be set when no activation key
+   * is being provided.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for bandwidth. + */ + @java.lang.Override + public int getBandwidthValue() { + return bandwidth_; + } + + /** + * + * + *
+   * Optional. Bandwidth of the Transport. This must be one of the supported
+   * bandwidths for the remote profile, and must be set when no activation key
+   * is being provided.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bandwidth. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth getBandwidth() { + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth result = + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.forNumber(bandwidth_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.UNRECOGNIZED + : result; + } + + public static final int STACK_TYPE_FIELD_NUMBER = 11; + private int stackType_ = 0; + + /** + * + * + *
+   * Optional. IP version stack for the established connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for stackType. + */ + @java.lang.Override + public int getStackTypeValue() { + return stackType_; + } + + /** + * + * + *
+   * Optional. IP version stack for the established connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stackType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.StackType getStackType() { + com.google.cloud.networkconnectivity.v1beta.Transport.StackType result = + com.google.cloud.networkconnectivity.v1beta.Transport.StackType.forNumber(stackType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.StackType.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 12; + private int state_ = 0; + + /** + * + * + *
+   * Output only. State of the underlying connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. State of the underlying connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.State getState() { + com.google.cloud.networkconnectivity.v1beta.Transport.State result = + com.google.cloud.networkconnectivity.v1beta.Transport.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.State.UNRECOGNIZED + : result; + } + + public static final int MTU_LIMIT_FIELD_NUMBER = 13; + private int mtuLimit_ = 0; + + /** + * + * + *
+   * Output only. The maximum transmission unit (MTU) of a packet that can be
+   * sent over this transport.
+   * 
+ * + * int32 mtu_limit = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtuLimit. + */ + @java.lang.Override + public int getMtuLimit() { + return mtuLimit_; + } + + public static final int ADMIN_ENABLED_FIELD_NUMBER = 14; + private boolean adminEnabled_ = false; + + /** + * + * + *
+   * Optional. Administrative state of the underlying connectivity. If set to
+   * true (default), connectivity should be available between your environments.
+   * If set to false, the connectivity over these links is disabled. Disabling
+   * your Transport does not affect billing, and retains the underlying network
+   * bandwidth associated with the connectivity.
+   * 
+ * + * bool admin_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adminEnabled. + */ + @java.lang.Override + public boolean getAdminEnabled() { + return adminEnabled_; + } + + public static final int NETWORK_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
+   * Optional. Resource URI of the Network that will be peered with this
+   * Transport. This field must be provided during resource creation and cannot
+   * be changed.
+   * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Resource URI of the Network that will be peered with this
+   * Transport. This field must be provided during resource creation and cannot
+   * be changed.
+   * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADVERTISED_ROUTES_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList advertisedRoutes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the advertisedRoutes. + */ + public com.google.protobuf.ProtocolStringList getAdvertisedRoutesList() { + return advertisedRoutes_; + } + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of advertisedRoutes. + */ + public int getAdvertisedRoutesCount() { + return advertisedRoutes_.size(); + } + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The advertisedRoutes at the given index. + */ + public java.lang.String getAdvertisedRoutes(int index) { + return advertisedRoutes_.get(index); + } + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the advertisedRoutes at the given index. + */ + public com.google.protobuf.ByteString getAdvertisedRoutesBytes(int index) { + return advertisedRoutes_.getByteString(index); + } + + public static final int REMOTE_ACCOUNT_ID_FIELD_NUMBER = 17; + + @SuppressWarnings("serial") + private volatile java.lang.Object remoteAccountId_ = ""; + + /** + * + * + *
+   * Optional. The user supplied account id for the CSP associated with the
+   * remote profile.
+   * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The remoteAccountId. + */ + @java.lang.Override + public java.lang.String getRemoteAccountId() { + java.lang.Object ref = remoteAccountId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteAccountId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The user supplied account id for the CSP associated with the
+   * remote profile.
+   * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for remoteAccountId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRemoteAccountIdBytes() { + java.lang.Object ref = remoteAccountId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEERING_NETWORK_FIELD_NUMBER = 18; + + @SuppressWarnings("serial") + private volatile java.lang.Object peeringNetwork_ = ""; + + /** + * + * + *
+   * Output only. VPC Network URI that was created for the VPC Peering
+   * connection to the provided `network`. If VPC Peering is disconnected, this
+   * can be used to re-establish.
+   * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The peeringNetwork. + */ + @java.lang.Override + public java.lang.String getPeeringNetwork() { + java.lang.Object ref = peeringNetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peeringNetwork_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. VPC Network URI that was created for the VPC Peering
+   * connection to the provided `network`. If VPC Peering is disconnected, this
+   * can be used to re-establish.
+   * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for peeringNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPeeringNetworkBytes() { + java.lang.Object ref = peeringNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peeringNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(remoteProfile_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, remoteProfile_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providedActivationKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, providedActivationKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(generatedActivationKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, generatedActivationKey_); + } + if (bandwidth_ + != com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.BANDWIDTH_UNSPECIFIED + .getNumber()) { + output.writeEnum(10, bandwidth_); + } + if (stackType_ + != com.google.cloud.networkconnectivity.v1beta.Transport.StackType.STACK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, stackType_); + } + if (state_ + != com.google.cloud.networkconnectivity.v1beta.Transport.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, state_); + } + if (mtuLimit_ != 0) { + output.writeInt32(13, mtuLimit_); + } + if (adminEnabled_ != false) { + output.writeBool(14, adminEnabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, network_); + } + for (int i = 0; i < advertisedRoutes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, advertisedRoutes_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(remoteAccountId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, remoteAccountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peeringNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 18, peeringNetwork_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(remoteProfile_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, remoteProfile_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(providedActivationKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, providedActivationKey_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(generatedActivationKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, generatedActivationKey_); + } + if (bandwidth_ + != com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.BANDWIDTH_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, bandwidth_); + } + if (stackType_ + != com.google.cloud.networkconnectivity.v1beta.Transport.StackType.STACK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, stackType_); + } + if (state_ + != com.google.cloud.networkconnectivity.v1beta.Transport.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, state_); + } + if (mtuLimit_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, mtuLimit_); + } + if (adminEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, adminEnabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(network_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, network_); + } + { + int dataSize = 0; + for (int i = 0; i < advertisedRoutes_.size(); i++) { + dataSize += computeStringSizeNoTag(advertisedRoutes_.getRaw(i)); + } + size += dataSize; + size += 2 * getAdvertisedRoutesList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(remoteAccountId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, remoteAccountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(peeringNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(18, peeringNetwork_); + } + 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.networkconnectivity.v1beta.Transport)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.Transport other = + (com.google.cloud.networkconnectivity.v1beta.Transport) 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 (!getDescription().equals(other.getDescription())) return false; + if (!getRemoteProfile().equals(other.getRemoteProfile())) return false; + if (!getProvidedActivationKey().equals(other.getProvidedActivationKey())) return false; + if (!getGeneratedActivationKey().equals(other.getGeneratedActivationKey())) return false; + if (bandwidth_ != other.bandwidth_) return false; + if (stackType_ != other.stackType_) return false; + if (state_ != other.state_) return false; + if (getMtuLimit() != other.getMtuLimit()) return false; + if (getAdminEnabled() != other.getAdminEnabled()) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getAdvertisedRoutesList().equals(other.getAdvertisedRoutesList())) return false; + if (!getRemoteAccountId().equals(other.getRemoteAccountId())) return false; + if (!getPeeringNetwork().equals(other.getPeeringNetwork())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + REMOTE_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getRemoteProfile().hashCode(); + hash = (37 * hash) + PROVIDED_ACTIVATION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getProvidedActivationKey().hashCode(); + hash = (37 * hash) + GENERATED_ACTIVATION_KEY_FIELD_NUMBER; + hash = (53 * hash) + getGeneratedActivationKey().hashCode(); + hash = (37 * hash) + BANDWIDTH_FIELD_NUMBER; + hash = (53 * hash) + bandwidth_; + hash = (37 * hash) + STACK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + stackType_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + MTU_LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getMtuLimit(); + hash = (37 * hash) + ADMIN_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAdminEnabled()); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + if (getAdvertisedRoutesCount() > 0) { + hash = (37 * hash) + ADVERTISED_ROUTES_FIELD_NUMBER; + hash = (53 * hash) + getAdvertisedRoutesList().hashCode(); + } + hash = (37 * hash) + REMOTE_ACCOUNT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRemoteAccountId().hashCode(); + hash = (37 * hash) + PEERING_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getPeeringNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport 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.networkconnectivity.v1beta.Transport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport 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.networkconnectivity.v1beta.Transport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.Transport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message describing Transport object.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.Transport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.Transport) + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.Transport.class, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.Transport.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + remoteProfile_ = ""; + providedActivationKey_ = ""; + generatedActivationKey_ = ""; + bandwidth_ = 0; + stackType_ = 0; + state_ = 0; + mtuLimit_ = 0; + adminEnabled_ = false; + network_ = ""; + advertisedRoutes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + remoteAccountId_ = ""; + peeringNetwork_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_Transport_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport build() { + com.google.cloud.networkconnectivity.v1beta.Transport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport buildPartial() { + com.google.cloud.networkconnectivity.v1beta.Transport result = + new com.google.cloud.networkconnectivity.v1beta.Transport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkconnectivity.v1beta.Transport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.remoteProfile_ = remoteProfile_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.providedActivationKey_ = providedActivationKey_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.generatedActivationKey_ = generatedActivationKey_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.bandwidth_ = bandwidth_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.stackType_ = stackType_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.mtuLimit_ = mtuLimit_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.adminEnabled_ = adminEnabled_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.network_ = network_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + advertisedRoutes_.makeImmutable(); + result.advertisedRoutes_ = advertisedRoutes_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.remoteAccountId_ = remoteAccountId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.peeringNetwork_ = peeringNetwork_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.Transport) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.Transport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.Transport other) { + if (other == com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000008; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getRemoteProfile().isEmpty()) { + remoteProfile_ = other.remoteProfile_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getProvidedActivationKey().isEmpty()) { + providedActivationKey_ = other.providedActivationKey_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getGeneratedActivationKey().isEmpty()) { + generatedActivationKey_ = other.generatedActivationKey_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.bandwidth_ != 0) { + setBandwidthValue(other.getBandwidthValue()); + } + if (other.stackType_ != 0) { + setStackTypeValue(other.getStackTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getMtuLimit() != 0) { + setMtuLimit(other.getMtuLimit()); + } + if (other.getAdminEnabled() != false) { + setAdminEnabled(other.getAdminEnabled()); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (!other.advertisedRoutes_.isEmpty()) { + if (advertisedRoutes_.isEmpty()) { + advertisedRoutes_ = other.advertisedRoutes_; + bitField0_ |= 0x00004000; + } else { + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.addAll(other.advertisedRoutes_); + } + onChanged(); + } + if (!other.getRemoteAccountId().isEmpty()) { + remoteAccountId_ = other.remoteAccountId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (!other.getPeeringNetwork().isEmpty()) { + peeringNetwork_ = other.peeringNetwork_; + bitField0_ |= 0x00010000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + remoteProfile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + providedActivationKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 74: + { + generatedActivationKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 80: + { + bandwidth_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: + { + stackType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 96 + case 104: + { + mtuLimit_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 112: + { + adminEnabled_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 122: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.add(s); + break; + } // case 130 + case 138: + { + remoteAccountId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 146: + { + peeringNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the resource.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Create time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
+     * Output only. Update time stamp.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000008; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000008; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. Description of the Transport.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Description of the Transport.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Description of the Transport.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the Transport.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Description of the Transport.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object remoteProfile_ = ""; + + /** + * + * + *
+     * Optional. Name of the remoteTransportProfile that this Transport is
+     * connecting to.
+     * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The remoteProfile. + */ + public java.lang.String getRemoteProfile() { + java.lang.Object ref = remoteProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Name of the remoteTransportProfile that this Transport is
+     * connecting to.
+     * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for remoteProfile. + */ + public com.google.protobuf.ByteString getRemoteProfileBytes() { + java.lang.Object ref = remoteProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Name of the remoteTransportProfile that this Transport is
+     * connecting to.
+     * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The remoteProfile to set. + * @return This builder for chaining. + */ + public Builder setRemoteProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remoteProfile_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Name of the remoteTransportProfile that this Transport is
+     * connecting to.
+     * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRemoteProfile() { + remoteProfile_ = getDefaultInstance().getRemoteProfile(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Name of the remoteTransportProfile that this Transport is
+     * connecting to.
+     * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for remoteProfile to set. + * @return This builder for chaining. + */ + public Builder setRemoteProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remoteProfile_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object providedActivationKey_ = ""; + + /** + * + * + *
+     * Optional. Key used for establishing a connection with the remote transport.
+     * This key can only be provided if the profile supports an INPUT key flow and
+     * the resource is in the PENDING_KEY state.
+     * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The providedActivationKey. + */ + public java.lang.String getProvidedActivationKey() { + java.lang.Object ref = providedActivationKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + providedActivationKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Key used for establishing a connection with the remote transport.
+     * This key can only be provided if the profile supports an INPUT key flow and
+     * the resource is in the PENDING_KEY state.
+     * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for providedActivationKey. + */ + public com.google.protobuf.ByteString getProvidedActivationKeyBytes() { + java.lang.Object ref = providedActivationKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + providedActivationKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Key used for establishing a connection with the remote transport.
+     * This key can only be provided if the profile supports an INPUT key flow and
+     * the resource is in the PENDING_KEY state.
+     * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The providedActivationKey to set. + * @return This builder for chaining. + */ + public Builder setProvidedActivationKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + providedActivationKey_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Key used for establishing a connection with the remote transport.
+     * This key can only be provided if the profile supports an INPUT key flow and
+     * the resource is in the PENDING_KEY state.
+     * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearProvidedActivationKey() { + providedActivationKey_ = getDefaultInstance().getProvidedActivationKey(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Key used for establishing a connection with the remote transport.
+     * This key can only be provided if the profile supports an INPUT key flow and
+     * the resource is in the PENDING_KEY state.
+     * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for providedActivationKey to set. + * @return This builder for chaining. + */ + public Builder setProvidedActivationKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + providedActivationKey_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object generatedActivationKey_ = ""; + + /** + * + * + *
+     * Output only. Google-generated activation key. This is only output if the
+     * selected profile supports an OUTPUT key flow. Inputting this to the
+     * provider is only valid while the resource is in a PENDING_KEY state. Once
+     * the provider has accepted the key, the resource will move to the
+     * CONFIGURING state.
+     * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The generatedActivationKey. + */ + public java.lang.String getGeneratedActivationKey() { + java.lang.Object ref = generatedActivationKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + generatedActivationKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Google-generated activation key. This is only output if the
+     * selected profile supports an OUTPUT key flow. Inputting this to the
+     * provider is only valid while the resource is in a PENDING_KEY state. Once
+     * the provider has accepted the key, the resource will move to the
+     * CONFIGURING state.
+     * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for generatedActivationKey. + */ + public com.google.protobuf.ByteString getGeneratedActivationKeyBytes() { + java.lang.Object ref = generatedActivationKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + generatedActivationKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Google-generated activation key. This is only output if the
+     * selected profile supports an OUTPUT key flow. Inputting this to the
+     * provider is only valid while the resource is in a PENDING_KEY state. Once
+     * the provider has accepted the key, the resource will move to the
+     * CONFIGURING state.
+     * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The generatedActivationKey to set. + * @return This builder for chaining. + */ + public Builder setGeneratedActivationKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + generatedActivationKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Google-generated activation key. This is only output if the
+     * selected profile supports an OUTPUT key flow. Inputting this to the
+     * provider is only valid while the resource is in a PENDING_KEY state. Once
+     * the provider has accepted the key, the resource will move to the
+     * CONFIGURING state.
+     * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearGeneratedActivationKey() { + generatedActivationKey_ = getDefaultInstance().getGeneratedActivationKey(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Google-generated activation key. This is only output if the
+     * selected profile supports an OUTPUT key flow. Inputting this to the
+     * provider is only valid while the resource is in a PENDING_KEY state. Once
+     * the provider has accepted the key, the resource will move to the
+     * CONFIGURING state.
+     * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for generatedActivationKey to set. + * @return This builder for chaining. + */ + public Builder setGeneratedActivationKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + generatedActivationKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int bandwidth_ = 0; + + /** + * + * + *
+     * Optional. Bandwidth of the Transport. This must be one of the supported
+     * bandwidths for the remote profile, and must be set when no activation key
+     * is being provided.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for bandwidth. + */ + @java.lang.Override + public int getBandwidthValue() { + return bandwidth_; + } + + /** + * + * + *
+     * Optional. Bandwidth of the Transport. This must be one of the supported
+     * bandwidths for the remote profile, and must be set when no activation key
+     * is being provided.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for bandwidth to set. + * @return This builder for chaining. + */ + public Builder setBandwidthValue(int value) { + bandwidth_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Bandwidth of the Transport. This must be one of the supported
+     * bandwidths for the remote profile, and must be set when no activation key
+     * is being provided.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bandwidth. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth getBandwidth() { + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth result = + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.forNumber(bandwidth_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Bandwidth of the Transport. This must be one of the supported
+     * bandwidths for the remote profile, and must be set when no activation key
+     * is being provided.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bandwidth to set. + * @return This builder for chaining. + */ + public Builder setBandwidth( + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + bandwidth_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Bandwidth of the Transport. This must be one of the supported
+     * bandwidths for the remote profile, and must be set when no activation key
+     * is being provided.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBandwidth() { + bitField0_ = (bitField0_ & ~0x00000100); + bandwidth_ = 0; + onChanged(); + return this; + } + + private int stackType_ = 0; + + /** + * + * + *
+     * Optional. IP version stack for the established connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for stackType. + */ + @java.lang.Override + public int getStackTypeValue() { + return stackType_; + } + + /** + * + * + *
+     * Optional. IP version stack for the established connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for stackType to set. + * @return This builder for chaining. + */ + public Builder setStackTypeValue(int value) { + stackType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP version stack for the established connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stackType. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.StackType getStackType() { + com.google.cloud.networkconnectivity.v1beta.Transport.StackType result = + com.google.cloud.networkconnectivity.v1beta.Transport.StackType.forNumber(stackType_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.StackType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. IP version stack for the established connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The stackType to set. + * @return This builder for chaining. + */ + public Builder setStackType( + com.google.cloud.networkconnectivity.v1beta.Transport.StackType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + stackType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. IP version stack for the established connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStackType() { + bitField0_ = (bitField0_ & ~0x00000200); + stackType_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. State of the underlying connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. State of the underlying connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.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_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the underlying connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport.State getState() { + com.google.cloud.networkconnectivity.v1beta.Transport.State result = + com.google.cloud.networkconnectivity.v1beta.Transport.State.forNumber(state_); + return result == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. State of the underlying connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.networkconnectivity.v1beta.Transport.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. State of the underlying connectivity.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000400); + state_ = 0; + onChanged(); + return this; + } + + private int mtuLimit_; + + /** + * + * + *
+     * Output only. The maximum transmission unit (MTU) of a packet that can be
+     * sent over this transport.
+     * 
+ * + * int32 mtu_limit = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtuLimit. + */ + @java.lang.Override + public int getMtuLimit() { + return mtuLimit_; + } + + /** + * + * + *
+     * Output only. The maximum transmission unit (MTU) of a packet that can be
+     * sent over this transport.
+     * 
+ * + * int32 mtu_limit = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mtuLimit to set. + * @return This builder for chaining. + */ + public Builder setMtuLimit(int value) { + + mtuLimit_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The maximum transmission unit (MTU) of a packet that can be
+     * sent over this transport.
+     * 
+ * + * int32 mtu_limit = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMtuLimit() { + bitField0_ = (bitField0_ & ~0x00000800); + mtuLimit_ = 0; + onChanged(); + return this; + } + + private boolean adminEnabled_; + + /** + * + * + *
+     * Optional. Administrative state of the underlying connectivity. If set to
+     * true (default), connectivity should be available between your environments.
+     * If set to false, the connectivity over these links is disabled. Disabling
+     * your Transport does not affect billing, and retains the underlying network
+     * bandwidth associated with the connectivity.
+     * 
+ * + * bool admin_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adminEnabled. + */ + @java.lang.Override + public boolean getAdminEnabled() { + return adminEnabled_; + } + + /** + * + * + *
+     * Optional. Administrative state of the underlying connectivity. If set to
+     * true (default), connectivity should be available between your environments.
+     * If set to false, the connectivity over these links is disabled. Disabling
+     * your Transport does not affect billing, and retains the underlying network
+     * bandwidth associated with the connectivity.
+     * 
+ * + * bool admin_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The adminEnabled to set. + * @return This builder for chaining. + */ + public Builder setAdminEnabled(boolean value) { + + adminEnabled_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Administrative state of the underlying connectivity. If set to
+     * true (default), connectivity should be available between your environments.
+     * If set to false, the connectivity over these links is disabled. Disabling
+     * your Transport does not affect billing, and retains the underlying network
+     * bandwidth associated with the connectivity.
+     * 
+ * + * bool admin_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAdminEnabled() { + bitField0_ = (bitField0_ & ~0x00001000); + adminEnabled_ = false; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + + /** + * + * + *
+     * Optional. Resource URI of the Network that will be peered with this
+     * Transport. This field must be provided during resource creation and cannot
+     * be changed.
+     * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Resource URI of the Network that will be peered with this
+     * Transport. This field must be provided during resource creation and cannot
+     * be changed.
+     * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Resource URI of the Network that will be peered with this
+     * Transport. This field must be provided during resource creation and cannot
+     * be changed.
+     * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource URI of the Network that will be peered with this
+     * Transport. This field must be provided during resource creation and cannot
+     * be changed.
+     * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Resource URI of the Network that will be peered with this
+     * Transport. This field must be provided during resource creation and cannot
+     * be changed.
+     * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList advertisedRoutes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAdvertisedRoutesIsMutable() { + if (!advertisedRoutes_.isModifiable()) { + advertisedRoutes_ = new com.google.protobuf.LazyStringArrayList(advertisedRoutes_); + } + bitField0_ |= 0x00004000; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the advertisedRoutes. + */ + public com.google.protobuf.ProtocolStringList getAdvertisedRoutesList() { + advertisedRoutes_.makeImmutable(); + return advertisedRoutes_; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of advertisedRoutes. + */ + public int getAdvertisedRoutesCount() { + return advertisedRoutes_.size(); + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The advertisedRoutes at the given index. + */ + public java.lang.String getAdvertisedRoutes(int index) { + return advertisedRoutes_.get(index); + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the advertisedRoutes at the given index. + */ + public com.google.protobuf.ByteString getAdvertisedRoutesBytes(int index) { + return advertisedRoutes_.getByteString(index); + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The advertisedRoutes to set. + * @return This builder for chaining. + */ + public Builder setAdvertisedRoutes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.set(index, value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The advertisedRoutes to add. + * @return This builder for chaining. + */ + public Builder addAdvertisedRoutes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The advertisedRoutes to add. + * @return This builder for chaining. + */ + public Builder addAllAdvertisedRoutes(java.lang.Iterable values) { + ensureAdvertisedRoutesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advertisedRoutes_); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdvertisedRoutes() { + advertisedRoutes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of IP Prefixes that will be advertised to the remote
+     * provider. Both IPv4 and IPv6 addresses are supported.
+     * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the advertisedRoutes to add. + * @return This builder for chaining. + */ + public Builder addAdvertisedRoutesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.add(value); + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.lang.Object remoteAccountId_ = ""; + + /** + * + * + *
+     * Optional. The user supplied account id for the CSP associated with the
+     * remote profile.
+     * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The remoteAccountId. + */ + public java.lang.String getRemoteAccountId() { + java.lang.Object ref = remoteAccountId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remoteAccountId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The user supplied account id for the CSP associated with the
+     * remote profile.
+     * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for remoteAccountId. + */ + public com.google.protobuf.ByteString getRemoteAccountIdBytes() { + java.lang.Object ref = remoteAccountId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + remoteAccountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The user supplied account id for the CSP associated with the
+     * remote profile.
+     * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The remoteAccountId to set. + * @return This builder for chaining. + */ + public Builder setRemoteAccountId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + remoteAccountId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user supplied account id for the CSP associated with the
+     * remote profile.
+     * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRemoteAccountId() { + remoteAccountId_ = getDefaultInstance().getRemoteAccountId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The user supplied account id for the CSP associated with the
+     * remote profile.
+     * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for remoteAccountId to set. + * @return This builder for chaining. + */ + public Builder setRemoteAccountIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + remoteAccountId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object peeringNetwork_ = ""; + + /** + * + * + *
+     * Output only. VPC Network URI that was created for the VPC Peering
+     * connection to the provided `network`. If VPC Peering is disconnected, this
+     * can be used to re-establish.
+     * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The peeringNetwork. + */ + public java.lang.String getPeeringNetwork() { + java.lang.Object ref = peeringNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peeringNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. VPC Network URI that was created for the VPC Peering
+     * connection to the provided `network`. If VPC Peering is disconnected, this
+     * can be used to re-establish.
+     * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for peeringNetwork. + */ + public com.google.protobuf.ByteString getPeeringNetworkBytes() { + java.lang.Object ref = peeringNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + peeringNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. VPC Network URI that was created for the VPC Peering
+     * connection to the provided `network`. If VPC Peering is disconnected, this
+     * can be used to re-establish.
+     * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The peeringNetwork to set. + * @return This builder for chaining. + */ + public Builder setPeeringNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + peeringNetwork_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. VPC Network URI that was created for the VPC Peering
+     * connection to the provided `network`. If VPC Peering is disconnected, this
+     * can be used to re-establish.
+     * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPeeringNetwork() { + peeringNetwork_ = getDefaultInstance().getPeeringNetwork(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. VPC Network URI that was created for the VPC Peering
+     * connection to the provided `network`. If VPC Peering is disconnected, this
+     * can be used to re-establish.
+     * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for peeringNetwork to set. + * @return This builder for chaining. + */ + public Builder setPeeringNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + peeringNetwork_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.Transport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.Transport) + private static final com.google.cloud.networkconnectivity.v1beta.Transport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.Transport(); + } + + public static com.google.cloud.networkconnectivity.v1beta.Transport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Transport 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.networkconnectivity.v1beta.Transport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerProto.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerProto.java new file mode 100644 index 000000000000..94fa4488b002 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportManagerProto.java @@ -0,0 +1,550 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public final class TransportManagerProto extends com.google.protobuf.GeneratedFile { + private TransportManagerProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TransportManagerProto"); + } + + 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_networkconnectivity_v1beta_RemoteTransportProfile_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_RemoteTransportProfile_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListRemoteTransportProfilesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetRemoteTransportProfileRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Transport_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Transport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_Transport_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_Transport_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_ListTransportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetTransportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetStatusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_GetStatusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_CreateTransportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkconnectivity_v1beta_DeleteTransportRequest_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/networkconnectivity/v1beta/transport_manager.proto\022\'google.cloud." + + "networkconnectivity.v1beta\032\034google/api/a" + + "nnotations.proto\032\027google/api/client.prot" + + "o\032\037google/api/field_behavior.proto\032\033goog" + + "le/api/field_info.proto\032\031google/api/reso" + + "urce.proto\0324google/cloud/networkconnectivity/v1beta/common.proto\032#google/longrun" + + "ning/operations.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\364\n" + + "\n" + + "\026RemoteTransportProfile\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022`\n" + + "\006labels\030\004 \003(\0132K.google.cloud.netwo" + + "rkconnectivity.v1beta.RemoteTransportProfile.LabelsEntryB\003\340A\003\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\003\022\025\n" + + "\010provider\030\007 \001(\tB\003\340A\003\022\032\n\r" + + "provider_site\030\010 \001(\tB\003\340A\003\022l\n" + + "\024supported_bandwidths\030\t \003(\0162I.google.cloud.networkconnectiv" + + "ity.v1beta.RemoteTransportProfile.BandwidthB\003\340A\003\022j\n" + + "\003sla\030\n" + + " \001(\0162X.google.cloud.net" + + "workconnectivity.v1beta.RemoteTransportProfile.ServiceLevelAvailabilityB\003\340A\003\022f\n" + + "\004flow\030\013 \001(\0162S.google.cloud.networkconnect" + + "ivity.v1beta.RemoteTransportProfile.KeyProvisioningFlowB\003\340A\003\022_\n" + + "\013order_state\030\014 \001(" + + "\0162E.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile.StateB\003\340A\003\022\031\n" + + "\014display_name\030\r" + + " \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\322\001\n" + + "\tBandwidth\022\031\n" + + "\025BANDWIDTH_UNSPECIFIED\020\000\022\013\n" + + "\007BPS_50M\020\001\022\014\n" + + "\010BPS_100M\020\002\022\014\n" + + "\010BPS_200M\020\003\022\014\n" + + "\010BPS_300M\020\004\022\014\n" + + "\010BPS_400M\020\005\022\014\n" + + "\010BPS_500M\020\006\022\n\n" + + "\006BPS_1G\020\007\022\n\n" + + "\006BPS_2G\020\010\022\n\n" + + "\006BPS_5G\020\t\022\013\n" + + "\007BPS_10G\020\n" + + "\022\013\n" + + "\007BPS_20G\020\013\022\013\n" + + "\007BPS_50G\020\014\022\014\n" + + "\010BPS_100G\020\r" + + "\"]\n" + + "\030ServiceLevelAvailability\022*\n" + + "&SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED\020\000\022\010\n" + + "\004HIGH\020\001\022\013\n" + + "\007MAXIMUM\020\002\"r\n" + + "\023KeyProvisioningFlow\022%\n" + + "!KEY_PROVISIONING_FLOW_UNSPECIFIED\020\000\022\016\n\n" + + "INPUT_ONLY\020\001\022\017\n" + + "\013OUTPUT_ONLY\020\002\022\023\n" + + "\017INPUT_OR_OUTPUT\020\003\"4\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006CLOSED\020\001\022\010\n" + + "\004OPEN\020\002:\314\001\352A\310\001\n" + + "9networkconnectivity.googleapis.com/RemoteTransportProfile\022Zprojects/{project}/loca" + + "tions/{location}/remoteTransportProfiles" + + "/{remote_transport_profile}*\027remoteTransportProfiles2\026remoteTransportProfile\"\324\001\n" + + "\"ListRemoteTransportProfilesRequest\022Q\n" + + "\006parent\030\001 \001(\tBA\340A\002\372A;\0229networkconnectivity" + + ".googleapis.com/RemoteTransportProfile\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\274\001\n" + + "#ListRemoteTransportProfilesResponse\022b\n" + + "\031remote_transport_profiles\030\001" + + " \003(\0132?.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006\"s\n" + + " GetRemoteTransportProfileRequest\022O\n" + + "\004name\030\001 \001(\tBA\340A\002\372A;\n" + + "9networkconnectivity.googleapis.com/RemoteTransportProfile\"\276\013\n" + + "\tTransport\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022S\n" + + "\006labels\030\004 \003(\0132>.g" + + "oogle.cloud.networkconnectivity.v1beta.Transport.LabelsEntryB\003\340A\001\022\030\n" + + "\013description\030\006 \001(\tB\003\340A\001\022Y\n" + + "\016remote_profile\030\007 \001(\tBA\340A\001\372A;\n" + + "9networkconnectivity.googleapis.com/RemoteTransportProfile\022$\n" + + "\027provided_activation_key\030\010 \001(\tB\003\340A\001\022%\n" + + "\030generated_activation_key\030\t \001(\tB\003\340A\003\022T\n" + + "\tbandwidth\030\n" + + " \001(\0162<" + + ".google.cloud.networkconnectivity.v1beta.Transport.BandwidthB\003\340A\001\022U\n\n" + + "stack_type\030\013" + + " \001(\0162<.google.cloud.networkconnectivity.v1beta.Transport.StackTypeB\003\340A\001\022L\n" + + "\005state\030\014" + + " \001(\01628.google.cloud.networkconnectivity.v1beta.Transport.StateB\003\340A\003\022\026\n" + + "\tmtu_limit\030\r" + + " \001(\005B\003\340A\003\022\032\n\r" + + "admin_enabled\030\016 \001(\010B\003\340A\001\0227\n" + + "\007network\030\017 \001(\tB&\340A\001\372A \n" + + "\036compute.googleapis.com/Network\022\036\n" + + "\021advertised_routes\030\020 \003(\tB\003\340A\001\022\036\n" + + "\021remote_account_id\030\021 \001(\tB\003\340A\001\022\034\n" + + "\017peering_network\030\022 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"\322\001\n" + + "\tBandwidth\022\031\n" + + "\025BANDWIDTH_UNSPECIFIED\020\000\022\013\n" + + "\007BPS_50M\020\001\022\014\n" + + "\010BPS_100M\020\002\022\014\n" + + "\010BPS_200M\020\003\022\014\n" + + "\010BPS_300M\020\004\022\014\n" + + "\010BPS_400M\020\005\022\014\n" + + "\010BPS_500M\020\006\022\n\n" + + "\006BPS_1G\020\007\022\n\n" + + "\006BPS_2G\020\010\022\n\n" + + "\006BPS_5G\020\t\022\013\n" + + "\007BPS_10G\020\n" + + "\022\013\n" + + "\007BPS_20G\020\013\022\013\n" + + "\007BPS_50G\020\014\022\014\n" + + "\010BPS_100G\020\r" + + "\"E\n" + + "\tStackType\022\032\n" + + "\026STACK_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tIPV4_ONLY\020\001\022\r\n" + + "\tIPV4_IPV6\020\002\"~\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\022\n" + + "\016PENDING_CONFIG\020\002\022\017\n" + + "\013PENDING_KEY\020\003\022\n\n" + + "\006ACTIVE\020\004\022\014\n" + + "\010DELETING\020\005\022\021\n\r" + + "DEPROVISIONED\020\006:\211\001\352A\205\001\n" + + ",networkconnectivity.googleapis.com/Transport\022>projects/{pro" + + "ject}/locations/{location}/transports/{transport}*\n" + + "transports2\ttransport\"\272\001\n" + + "\025ListTransportsRequest\022D\n" + + "\006parent\030\001 \001(\tB4\340A\002\372" + + "A.\022,networkconnectivity.googleapis.com/Transport\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\223\001\n" + + "\026ListTransportsResponse\022F\n\n" + + "transports\030\001 \003(\01322.google.cl" + + "oud.networkconnectivity.v1beta.Transport\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\030\n" + + "\013unreachable\030\003 \003(\tB\003\340A\006\"Y\n" + + "\023GetTransportRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",networkconnectivity.googleapis.com/Transport\"V\n" + + "\020GetStatusRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",networkconnectivity.googleapis.com/Transport\"\301\007\n" + + "\021GetStatusResponse\022`\n" + + "\016overall_status\030\001 \001(\0162H.g" + + "oogle.cloud.networkconnectivity.v1beta.GetStatusResponse.OverallStatus\022h\n" + + "\022operational_status\030\002 \001(\0162L.google.cloud.networ" + + "kconnectivity.v1beta.GetStatusResponse.OperationalStatus\022j\n" + + "\023connectivity_status\030\003 \001(\0162M.google.cloud.networkconnectivity" + + ".v1beta.GetStatusResponse.ConnectivityStatus\022_\n" + + "\016mac_sec_status\030\004 \001(\0162G.google.cl" + + "oud.networkconnectivity.v1beta.GetStatusResponse.MacSecStatus\"y\n\r" + + "OverallStatus\022\036\n" + + "\032OVERALL_STATUS_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\017\n" + + "\013PENDING_KEY\020\002\022\017\n" + + "\013CONFIGURING\020\003\022\020\n" + + "\014DISCONNECTED\020\004\022\010\n" + + "\004DOWN\020\005\"s\n" + + "\021OperationalStatus\022\"\n" + + "\036OPERATIONAL_STATUS_UNSPECIFIED\020\000\022\035\n" + + "\031OPERATIONAL_STATUS_ACTIVE\020\001\022\033\n" + + "\027OPERATIONAL_STATUS_DOWN\020\002\"\202\001\n" + + "\022ConnectivityStatus\022#\n" + + "\037CONNECTIVITY_STATUS_UNSPECIFIED\020\000\022!\n" + + "\035CONNECTIVITY_STATUS_CONNECTED\020\001\022$\n" + + " CONNECTIVITY_STATUS_DISCONNECTED\020\002\"\235\001\n" + + "\014MacSecStatus\022\036\n" + + "\032MAC_SEC_STATUS_UNSPECIFIED\020\000\022%\n" + + "!MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED\020\001\022#\n" + + "\037MAC_SEC_STATUS_ACTIVE_FAIL_OPEN\020\002\022!\n" + + "\035MAC_SEC_STATUS_NOT_CONFIGURED\020\003\"\346\001\n" + + "\026CreateTransportRequest\022D\n" + + "\006parent\030\001 \001(\tB4\340" + + "A\002\372A.\022,networkconnectivity.googleapis.com/Transport\022\031\n" + + "\014transport_id\030\002 \001(\tB\003\340A\002\022J\n" + + "\ttransport\030\003" + + " \001(\01322.google.cloud.networkconnectivity.v1beta.TransportB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\273\001\n" + + "\026UpdateTransportRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022J\n" + + "\ttransport\030\002" + + " \001(\01322.google.cloud.networkconnectivity.v1beta.TransportB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"}\n" + + "\026DeleteTransportRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",networkconnectivity.googleapis.com/Transport\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\0012\302\017\n" + + "\020TransportManager\022\212\002\n" + + "\033ListRemoteTransportProfiles\022K.google.cloud.networkconnectivity.v1beta." + + "ListRemoteTransportProfilesRequest\032L.google.cloud.networkconnectivity.v1beta.Lis" + + "tRemoteTransportProfilesResponse\"P\332A\006par" + + "ent\202\323\344\223\002A\022?/v1beta/{parent=projects/*/locations/*}/remoteTransportProfiles\022\367\001\n" + + "\031GetRemoteTransportProfile\022I.google.cloud." + + "networkconnectivity.v1beta.GetRemoteTransportProfileRequest\032?.google.cloud.netwo" + + "rkconnectivity.v1beta.RemoteTransportPro" + + "file\"N\332A\004name\202\323\344\223\002A\022?/v1beta/{name=proje" + + "cts/*/locations/*/remoteTransportProfiles/*}\022\326\001\n" + + "\016ListTransports\022>.google.cloud.networkconnectivity.v1beta.ListTransports" + + "Request\032?.google.cloud.networkconnectivi" + + "ty.v1beta.ListTransportsResponse\"C\332A\006par" + + "ent\202\323\344\223\0024\0222/v1beta/{parent=projects/*/locations/*}/transports\022\303\001\n" + + "\014GetTransport\022<.google.cloud.networkconnectivity.v1beta" + + ".GetTransportRequest\0322.google.cloud.netw" + + "orkconnectivity.v1beta.Transport\"A\332A\004nam" + + "e\202\323\344\223\0024\0222/v1beta/{name=projects/*/locations/*/transports/*}\022\317\001\n" + + "\tGetStatus\0229.google.cloud.networkconnectivity.v1beta.GetS" + + "tatusRequest\032:.google.cloud.networkconne" + + "ctivity.v1beta.GetStatusResponse\"K\332A\004nam" + + "e\202\323\344\223\002>\022 fieldValuesMap; + private final String project; + private final String location; + private final String transport; + + @Deprecated + protected TransportName() { + project = null; + location = null; + transport = null; + } + + private TransportName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + transport = Preconditions.checkNotNull(builder.getTransport()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTransport() { + return transport; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TransportName of(String project, String location, String transport) { + return newBuilder().setProject(project).setLocation(location).setTransport(transport).build(); + } + + public static String format(String project, String location, String transport) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTransport(transport) + .build() + .toString(); + } + + public static TransportName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TRANSPORT.validatedMatch( + formattedString, "TransportName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("transport")); + } + + 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 (TransportName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TRANSPORT.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 (transport != null) { + fieldMapBuilder.put("transport", transport); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TRANSPORT.instantiate( + "project", project, "location", location, "transport", transport); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TransportName that = ((TransportName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.transport, that.transport); + } + 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(transport); + return h; + } + + /** Builder for projects/{project}/locations/{location}/transports/{transport}. */ + public static class Builder { + private String project; + private String location; + private String transport; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTransport() { + return transport; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTransport(String transport) { + this.transport = transport; + return this; + } + + private Builder(TransportName transportName) { + this.project = transportName.project; + this.location = transportName.location; + this.transport = transportName.transport; + } + + public TransportName build() { + return new TransportName(this); + } + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportOrBuilder.java new file mode 100644 index 000000000000..c8ac35dcfd9c --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/TransportOrBuilder.java @@ -0,0 +1,594 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface TransportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.Transport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the resource.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Create time stamp.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Update time stamp.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs.
+   * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Description of the Transport.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. Description of the Transport.
+   * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Name of the remoteTransportProfile that this Transport is
+   * connecting to.
+   * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The remoteProfile. + */ + java.lang.String getRemoteProfile(); + + /** + * + * + *
+   * Optional. Name of the remoteTransportProfile that this Transport is
+   * connecting to.
+   * 
+ * + * + * string remote_profile = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for remoteProfile. + */ + com.google.protobuf.ByteString getRemoteProfileBytes(); + + /** + * + * + *
+   * Optional. Key used for establishing a connection with the remote transport.
+   * This key can only be provided if the profile supports an INPUT key flow and
+   * the resource is in the PENDING_KEY state.
+   * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The providedActivationKey. + */ + java.lang.String getProvidedActivationKey(); + + /** + * + * + *
+   * Optional. Key used for establishing a connection with the remote transport.
+   * This key can only be provided if the profile supports an INPUT key flow and
+   * the resource is in the PENDING_KEY state.
+   * 
+ * + * string provided_activation_key = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for providedActivationKey. + */ + com.google.protobuf.ByteString getProvidedActivationKeyBytes(); + + /** + * + * + *
+   * Output only. Google-generated activation key. This is only output if the
+   * selected profile supports an OUTPUT key flow. Inputting this to the
+   * provider is only valid while the resource is in a PENDING_KEY state. Once
+   * the provider has accepted the key, the resource will move to the
+   * CONFIGURING state.
+   * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The generatedActivationKey. + */ + java.lang.String getGeneratedActivationKey(); + + /** + * + * + *
+   * Output only. Google-generated activation key. This is only output if the
+   * selected profile supports an OUTPUT key flow. Inputting this to the
+   * provider is only valid while the resource is in a PENDING_KEY state. Once
+   * the provider has accepted the key, the resource will move to the
+   * CONFIGURING state.
+   * 
+ * + * string generated_activation_key = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for generatedActivationKey. + */ + com.google.protobuf.ByteString getGeneratedActivationKeyBytes(); + + /** + * + * + *
+   * Optional. Bandwidth of the Transport. This must be one of the supported
+   * bandwidths for the remote profile, and must be set when no activation key
+   * is being provided.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for bandwidth. + */ + int getBandwidthValue(); + + /** + * + * + *
+   * Optional. Bandwidth of the Transport. This must be one of the supported
+   * bandwidths for the remote profile, and must be set when no activation key
+   * is being provided.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.Bandwidth bandwidth = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bandwidth. + */ + com.google.cloud.networkconnectivity.v1beta.Transport.Bandwidth getBandwidth(); + + /** + * + * + *
+   * Optional. IP version stack for the established connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for stackType. + */ + int getStackTypeValue(); + + /** + * + * + *
+   * Optional. IP version stack for the established connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.StackType stack_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The stackType. + */ + com.google.cloud.networkconnectivity.v1beta.Transport.StackType getStackType(); + + /** + * + * + *
+   * Output only. State of the underlying connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. State of the underlying connectivity.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.networkconnectivity.v1beta.Transport.State getState(); + + /** + * + * + *
+   * Output only. The maximum transmission unit (MTU) of a packet that can be
+   * sent over this transport.
+   * 
+ * + * int32 mtu_limit = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtuLimit. + */ + int getMtuLimit(); + + /** + * + * + *
+   * Optional. Administrative state of the underlying connectivity. If set to
+   * true (default), connectivity should be available between your environments.
+   * If set to false, the connectivity over these links is disabled. Disabling
+   * your Transport does not affect billing, and retains the underlying network
+   * bandwidth associated with the connectivity.
+   * 
+ * + * bool admin_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adminEnabled. + */ + boolean getAdminEnabled(); + + /** + * + * + *
+   * Optional. Resource URI of the Network that will be peered with this
+   * Transport. This field must be provided during resource creation and cannot
+   * be changed.
+   * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
+   * Optional. Resource URI of the Network that will be peered with this
+   * Transport. This field must be provided during resource creation and cannot
+   * be changed.
+   * 
+ * + * + * string network = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the advertisedRoutes. + */ + java.util.List getAdvertisedRoutesList(); + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of advertisedRoutes. + */ + int getAdvertisedRoutesCount(); + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The advertisedRoutes at the given index. + */ + java.lang.String getAdvertisedRoutes(int index); + + /** + * + * + *
+   * Optional. List of IP Prefixes that will be advertised to the remote
+   * provider. Both IPv4 and IPv6 addresses are supported.
+   * 
+ * + * repeated string advertised_routes = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the advertisedRoutes at the given index. + */ + com.google.protobuf.ByteString getAdvertisedRoutesBytes(int index); + + /** + * + * + *
+   * Optional. The user supplied account id for the CSP associated with the
+   * remote profile.
+   * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The remoteAccountId. + */ + java.lang.String getRemoteAccountId(); + + /** + * + * + *
+   * Optional. The user supplied account id for the CSP associated with the
+   * remote profile.
+   * 
+ * + * string remote_account_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for remoteAccountId. + */ + com.google.protobuf.ByteString getRemoteAccountIdBytes(); + + /** + * + * + *
+   * Output only. VPC Network URI that was created for the VPC Peering
+   * connection to the provided `network`. If VPC Peering is disconnected, this
+   * can be used to re-establish.
+   * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The peeringNetwork. + */ + java.lang.String getPeeringNetwork(); + + /** + * + * + *
+   * Output only. VPC Network URI that was created for the VPC Peering
+   * connection to the provided `network`. If VPC Peering is disconnected, this
+   * can be used to re-establish.
+   * 
+ * + * string peering_network = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for peeringNetwork. + */ + com.google.protobuf.ByteString getPeeringNetworkBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequest.java new file mode 100644 index 000000000000..70a8065b99a0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequest.java @@ -0,0 +1,1357 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to update a `Destination` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest} + */ +@com.google.protobuf.Generated +public final class UpdateDestinationRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) + UpdateDestinationRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateDestinationRequest"); + } + + // Use UpdateDestinationRequest.newBuilder() to construct. + private UpdateDestinationRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateDestinationRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are 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 DESTINATION_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.Destination destination_; + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + @java.lang.Override + public boolean hasDestination() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination() { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder + getDestinationOrBuilder() { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDestination()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDestination()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateDestinationRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDestination() != other.hasDestination()) return false; + if (hasDestination()) { + if (!getDestination().equals(other.getDestination())) 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 (hasDestination()) { + hash = (37 * hash) + DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getDestination().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.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest 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.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest 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.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to update a `Destination` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetDestinationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateDestinationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.destination_ = + destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDestination()) { + mergeDestination(other.getDestination()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDestinationFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask is used to specify the fields to be overwritten in the
+     * `Destination` resource by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Destination destination_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + destinationBuilder_; + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + public boolean hasDestination() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + public com.google.cloud.networkconnectivity.v1beta.Destination getDestination() { + if (destinationBuilder_ == null) { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } else { + return destinationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination(com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + } else { + destinationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDestination( + com.google.cloud.networkconnectivity.v1beta.Destination.Builder builderForValue) { + if (destinationBuilder_ == null) { + destination_ = builderForValue.build(); + } else { + destinationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDestination(com.google.cloud.networkconnectivity.v1beta.Destination value) { + if (destinationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && destination_ != null + && destination_ + != com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance()) { + getDestinationBuilder().mergeFrom(value); + } else { + destination_ = value; + } + } else { + destinationBuilder_.mergeFrom(value); + } + if (destination_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDestination() { + bitField0_ = (bitField0_ & ~0x00000002); + destination_ = null; + if (destinationBuilder_ != null) { + destinationBuilder_.dispose(); + destinationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Destination.Builder getDestinationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDestinationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder + getDestinationOrBuilder() { + if (destinationBuilder_ != null) { + return destinationBuilder_.getMessageOrBuilder(); + } else { + return destination_ == null + ? com.google.cloud.networkconnectivity.v1beta.Destination.getDefaultInstance() + : destination_; + } + } + + /** + * + * + *
+     * Required. The `Destination` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder> + internalGetDestinationFieldBuilder() { + if (destinationBuilder_ == null) { + destinationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Destination, + com.google.cloud.networkconnectivity.v1beta.Destination.Builder, + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder>( + getDestination(), getParentForChildren(), isClean()); + destination_ = null; + } + return destinationBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) + private static final com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDestinationRequest 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.networkconnectivity.v1beta.UpdateDestinationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequestOrBuilder.java new file mode 100644 index 000000000000..4e46807d3fee --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateDestinationRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateDestinationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. `FieldMask is used to specify the fields to be overwritten in the
+   * `Destination` resource by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the destination field is set. + */ + boolean hasDestination(); + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The destination. + */ + com.google.cloud.networkconnectivity.v1beta.Destination getDestination(); + + /** + * + * + *
+   * Required. The `Destination` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Destination destination = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.DestinationOrBuilder getDestinationOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequest.java new file mode 100644 index 000000000000..740d2fe9a7bb --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequest.java @@ -0,0 +1,1454 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * The request for
+ * [HubService.UpdateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.UpdateGatewayAdvertisedRoute].
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest} + */ +@com.google.protobuf.Generated +public final class UpdateGatewayAdvertisedRouteRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + UpdateGatewayAdvertisedRouteRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateGatewayAdvertisedRouteRequest"); + } + + // Use UpdateGatewayAdvertisedRouteRequest.newBuilder() to construct. + private UpdateGatewayAdvertisedRouteRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateGatewayAdvertisedRouteRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest.Builder + .class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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 GATEWAY_ADVERTISED_ROUTE_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + gatewayAdvertisedRoute_; + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + @java.lang.Override + public boolean hasGatewayAdvertisedRoute() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute() { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.getDefaultInstance() + : gatewayAdvertisedRoute_; + } + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder() { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.getDefaultInstance() + : gatewayAdvertisedRoute_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getGatewayAdvertisedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGatewayAdvertisedRoute()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasGatewayAdvertisedRoute() != other.hasGatewayAdvertisedRoute()) return false; + if (hasGatewayAdvertisedRoute()) { + if (!getGatewayAdvertisedRoute().equals(other.getGatewayAdvertisedRoute())) 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 (hasGatewayAdvertisedRoute()) { + hash = (37 * hash) + GATEWAY_ADVERTISED_ROUTE_FIELD_NUMBER; + hash = (53 * hash) + getGatewayAdvertisedRoute().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.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + 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.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * The request for
+   * [HubService.UpdateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.UpdateGatewayAdvertisedRoute].
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetGatewayAdvertisedRouteFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + gatewayAdvertisedRoute_ = null; + if (gatewayAdvertisedRouteBuilder_ != null) { + gatewayAdvertisedRouteBuilder_.dispose(); + gatewayAdvertisedRouteBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGatewayAdvertisedRouteRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.gatewayAdvertisedRoute_ = + gatewayAdvertisedRouteBuilder_ == null + ? gatewayAdvertisedRoute_ + : gatewayAdvertisedRouteBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasGatewayAdvertisedRoute()) { + mergeGatewayAdvertisedRoute(other.getGatewayAdvertisedRoute()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetGatewayAdvertisedRouteFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + gatewayAdvertisedRoute_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + gatewayAdvertisedRouteBuilder_; + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + public boolean hasGatewayAdvertisedRoute() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + getGatewayAdvertisedRoute() { + if (gatewayAdvertisedRouteBuilder_ == null) { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance() + : gatewayAdvertisedRoute_; + } else { + return gatewayAdvertisedRouteBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRouteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gatewayAdvertisedRoute_ = value; + } else { + gatewayAdvertisedRouteBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + builderForValue) { + if (gatewayAdvertisedRouteBuilder_ == null) { + gatewayAdvertisedRoute_ = builderForValue.build(); + } else { + gatewayAdvertisedRouteBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGatewayAdvertisedRoute( + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute value) { + if (gatewayAdvertisedRouteBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && gatewayAdvertisedRoute_ != null + && gatewayAdvertisedRoute_ + != com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance()) { + getGatewayAdvertisedRouteBuilder().mergeFrom(value); + } else { + gatewayAdvertisedRoute_ = value; + } + } else { + gatewayAdvertisedRouteBuilder_.mergeFrom(value); + } + if (gatewayAdvertisedRoute_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGatewayAdvertisedRoute() { + bitField0_ = (bitField0_ & ~0x00000002); + gatewayAdvertisedRoute_ = null; + if (gatewayAdvertisedRouteBuilder_ != null) { + gatewayAdvertisedRouteBuilder_.dispose(); + gatewayAdvertisedRouteBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder + getGatewayAdvertisedRouteBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetGatewayAdvertisedRouteFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder() { + if (gatewayAdvertisedRouteBuilder_ != null) { + return gatewayAdvertisedRouteBuilder_.getMessageOrBuilder(); + } else { + return gatewayAdvertisedRoute_ == null + ? com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute + .getDefaultInstance() + : gatewayAdvertisedRoute_; + } + } + + /** + * + * + *
+     * Required. The gateway advertised route to update.
+     *
+     * The gateway advertised route's `name` field is used to identify the gateway
+     * advertised route to update. Format:
+     * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder> + internalGetGatewayAdvertisedRouteFieldBuilder() { + if (gatewayAdvertisedRouteBuilder_ == null) { + gatewayAdvertisedRouteBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute.Builder, + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder>( + getGatewayAdvertisedRoute(), getParentForChildren(), isClean()); + gatewayAdvertisedRoute_ = null; + } + return gatewayAdvertisedRouteBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID, with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .UpdateGatewayAdvertisedRouteRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGatewayAdvertisedRouteRequest 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.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequestOrBuilder.java new file mode 100644 index 000000000000..1e57af6e6006 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGatewayAdvertisedRouteRequestOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateGatewayAdvertisedRouteRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the gatewayAdvertisedRoute field is set. + */ + boolean hasGatewayAdvertisedRoute(); + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The gatewayAdvertisedRoute. + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute getGatewayAdvertisedRoute(); + + /** + * + * + *
+   * Required. The gateway advertised route to update.
+   *
+   * The gateway advertised route's `name` field is used to identify the gateway
+   * advertised route to update. Format:
+   * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute gateway_advertised_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteOrBuilder + getGatewayAdvertisedRouteOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID, with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequest.java new file mode 100644 index 000000000000..bfea35d6c5d0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequest.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.UpdateGroup][google.cloud.networkconnectivity.v1beta.HubService.UpdateGroup]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateGroupRequest} + */ +@com.google.protobuf.Generated +public final class UpdateGroupRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) + UpdateGroupRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateGroupRequest"); + } + + // Use UpdateGroupRequest.newBuilder() to construct. + private UpdateGroupRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateGroupRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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 GROUP_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.Group group_; + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + @java.lang.Override + public boolean hasGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Group getGroup() { + return group_ == null + ? com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance() + : group_; + } + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupOrBuilder() { + return group_ == null + ? com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance() + : group_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getGroup()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGroup()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateGroupRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasGroup() != other.hasGroup()) return false; + if (hasGroup()) { + if (!getGroup().equals(other.getGroup())) 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 (hasGroup()) { + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().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.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest 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.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest 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.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.UpdateGroup][google.cloud.networkconnectivity.v1beta.HubService.UpdateGroup]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateGroupRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetGroupFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateGroupRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.group_ = groupBuilder_ == null ? group_ : groupBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasGroup()) { + mergeGroup(other.getGroup()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetGroupFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing group, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Group group_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder> + groupBuilder_; + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + public boolean hasGroup() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + public com.google.cloud.networkconnectivity.v1beta.Group getGroup() { + if (groupBuilder_ == null) { + return group_ == null + ? com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance() + : group_; + } else { + return groupBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup(com.google.cloud.networkconnectivity.v1beta.Group value) { + if (groupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + group_ = value; + } else { + groupBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setGroup( + com.google.cloud.networkconnectivity.v1beta.Group.Builder builderForValue) { + if (groupBuilder_ == null) { + group_ = builderForValue.build(); + } else { + groupBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeGroup(com.google.cloud.networkconnectivity.v1beta.Group value) { + if (groupBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && group_ != null + && group_ != com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance()) { + getGroupBuilder().mergeFrom(value); + } else { + group_ = value; + } + } else { + groupBuilder_.mergeFrom(value); + } + if (group_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearGroup() { + bitField0_ = (bitField0_ & ~0x00000002); + group_ = null; + if (groupBuilder_ != null) { + groupBuilder_.dispose(); + groupBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Group.Builder getGroupBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetGroupFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupOrBuilder() { + if (groupBuilder_ != null) { + return groupBuilder_.getMessageOrBuilder(); + } else { + return group_ == null + ? com.google.cloud.networkconnectivity.v1beta.Group.getDefaultInstance() + : group_; + } + } + + /** + * + * + *
+     * Required. The state that the group should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder> + internalGetGroupFieldBuilder() { + if (groupBuilder_ == null) { + groupBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Group, + com.google.cloud.networkconnectivity.v1beta.Group.Builder, + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder>( + getGroup(), getParentForChildren(), isClean()); + group_ = null; + } + return groupBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) + private static final com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateGroupRequest 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.networkconnectivity.v1beta.UpdateGroupRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequestOrBuilder.java new file mode 100644 index 000000000000..e3ea66eb0f98 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateGroupRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateGroupRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateGroupRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing group, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the group field is set. + */ + boolean hasGroup(); + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The group. + */ + com.google.cloud.networkconnectivity.v1beta.Group getGroup(); + + /** + * + * + *
+   * Required. The state that the group should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.GroupOrBuilder getGroupOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequest.java new file mode 100644 index 000000000000..10c0f2c7f293 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequest.java @@ -0,0 +1,1348 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.UpdateHub][google.cloud.networkconnectivity.v1beta.HubService.UpdateHub]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateHubRequest} + */ +@com.google.protobuf.Generated +public final class UpdateHubRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateHubRequest) + UpdateHubRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateHubRequest"); + } + + // Use UpdateHubRequest.newBuilder() to construct. + private UpdateHubRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateHubRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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 HUB_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.Hub hub_; + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + @java.lang.Override + public boolean hasHub() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Hub getHub() { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder() { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getHub()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHub()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateHubRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasHub() != other.hasHub()) return false; + if (hasHub()) { + if (!getHub().equals(other.getHub())) 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 (hasHub()) { + hash = (37 * hash) + HUB_FIELD_NUMBER; + hash = (53 * hash) + getHub().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.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest 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.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest 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.networkconnectivity.v1beta.UpdateHubRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.UpdateHub][google.cloud.networkconnectivity.v1beta.HubService.UpdateHub]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateHubRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateHubRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetHubFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + hub_ = null; + if (hubBuilder_ != null) { + hubBuilder_.dispose(); + hubBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateHubRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.hub_ = hubBuilder_ == null ? hub_ : hubBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasHub()) { + mergeHub(other.getHub()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetHubFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing hub, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Hub hub_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + hubBuilder_; + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + public boolean hasHub() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + public com.google.cloud.networkconnectivity.v1beta.Hub getHub() { + if (hubBuilder_ == null) { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } else { + return hubBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHub(com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hub_ = value; + } else { + hubBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setHub(com.google.cloud.networkconnectivity.v1beta.Hub.Builder builderForValue) { + if (hubBuilder_ == null) { + hub_ = builderForValue.build(); + } else { + hubBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeHub(com.google.cloud.networkconnectivity.v1beta.Hub value) { + if (hubBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && hub_ != null + && hub_ != com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance()) { + getHubBuilder().mergeFrom(value); + } else { + hub_ = value; + } + } else { + hubBuilder_.mergeFrom(value); + } + if (hub_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearHub() { + bitField0_ = (bitField0_ & ~0x00000002); + hub_ = null; + if (hubBuilder_ != null) { + hubBuilder_.dispose(); + hubBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Hub.Builder getHubBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetHubFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder() { + if (hubBuilder_ != null) { + return hubBuilder_.getMessageOrBuilder(); + } else { + return hub_ == null + ? com.google.cloud.networkconnectivity.v1beta.Hub.getDefaultInstance() + : hub_; + } + } + + /** + * + * + *
+     * Required. The state that the hub should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder> + internalGetHubFieldBuilder() { + if (hubBuilder_ == null) { + hubBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Hub, + com.google.cloud.networkconnectivity.v1beta.Hub.Builder, + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder>( + getHub(), getParentForChildren(), isClean()); + hub_ = null; + } + return hubBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateHubRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateHubRequest) + private static final com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateHubRequest 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.networkconnectivity.v1beta.UpdateHubRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequestOrBuilder.java new file mode 100644 index 000000000000..b0e737db57a1 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateHubRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateHubRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateHubRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing hub, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the hub field is set. + */ + boolean hasHub(); + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The hub. + */ + com.google.cloud.networkconnectivity.v1beta.Hub getHub(); + + /** + * + * + *
+   * Required. The state that the hub should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.HubOrBuilder getHubOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequest.java new file mode 100644 index 000000000000..5a25f29cf5f3 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequest.java @@ -0,0 +1,1433 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request message to update a `MulticloudDataTransferConfig` resource.
+ * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest} + */ +@com.google.protobuf.Generated +public final class UpdateMulticloudDataTransferConfigRequest + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + UpdateMulticloudDataTransferConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateMulticloudDataTransferConfigRequest"); + } + + // Use UpdateMulticloudDataTransferConfigRequest.newBuilder() to construct. + private UpdateMulticloudDataTransferConfigRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateMulticloudDataTransferConfigRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are 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 MULTICLOUD_DATA_TRANSFER_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + multicloudDataTransferConfig_; + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + @java.lang.Override + public boolean hasMulticloudDataTransferConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig() { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder() { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getMulticloudDataTransferConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMulticloudDataTransferConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasMulticloudDataTransferConfig() != other.hasMulticloudDataTransferConfig()) return false; + if (hasMulticloudDataTransferConfig()) { + if (!getMulticloudDataTransferConfig().equals(other.getMulticloudDataTransferConfig())) + 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 (hasMulticloudDataTransferConfig()) { + hash = (37 * hash) + MULTICLOUD_DATA_TRANSFER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMulticloudDataTransferConfig().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.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + 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.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message to update a `MulticloudDataTransferConfig` resource.
+   * 
+ * + * Protobuf type {@code + * google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .class, + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetMulticloudDataTransferConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + multicloudDataTransferConfig_ = null; + if (multicloudDataTransferConfigBuilder_ != null) { + multicloudDataTransferConfigBuilder_.dispose(); + multicloudDataTransferConfigBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.DataTransferProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateMulticloudDataTransferConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + build() { + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.multicloudDataTransferConfig_ = + multicloudDataTransferConfigBuilder_ == null + ? multicloudDataTransferConfig_ + : multicloudDataTransferConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasMulticloudDataTransferConfig()) { + mergeMulticloudDataTransferConfig(other.getMulticloudDataTransferConfig()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMulticloudDataTransferConfigFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are 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. `FieldMask` is used to specify the fields in the
+     * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+     * The fields specified in `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If you
+     * don't specify a mask, all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + multicloudDataTransferConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + multicloudDataTransferConfigBuilder_; + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + public boolean hasMulticloudDataTransferConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig() { + if (multicloudDataTransferConfigBuilder_ == null) { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } else { + return multicloudDataTransferConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + multicloudDataTransferConfig_ = value; + } else { + multicloudDataTransferConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + builderForValue) { + if (multicloudDataTransferConfigBuilder_ == null) { + multicloudDataTransferConfig_ = builderForValue.build(); + } else { + multicloudDataTransferConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeMulticloudDataTransferConfig( + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig value) { + if (multicloudDataTransferConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && multicloudDataTransferConfig_ != null + && multicloudDataTransferConfig_ + != com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance()) { + getMulticloudDataTransferConfigBuilder().mergeFrom(value); + } else { + multicloudDataTransferConfig_ = value; + } + } else { + multicloudDataTransferConfigBuilder_.mergeFrom(value); + } + if (multicloudDataTransferConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearMulticloudDataTransferConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + multicloudDataTransferConfig_ = null; + if (multicloudDataTransferConfigBuilder_ != null) { + multicloudDataTransferConfigBuilder_.dispose(); + multicloudDataTransferConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder + getMulticloudDataTransferConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetMulticloudDataTransferConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder() { + if (multicloudDataTransferConfigBuilder_ != null) { + return multicloudDataTransferConfigBuilder_.getMessageOrBuilder(); + } else { + return multicloudDataTransferConfig_ == null + ? com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + .getDefaultInstance() + : multicloudDataTransferConfig_; + } + } + + /** + * + * + *
+     * Required. The `MulticloudDataTransferConfig` resource to update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder> + internalGetMulticloudDataTransferConfigFieldBuilder() { + if (multicloudDataTransferConfigBuilder_ == null) { + multicloudDataTransferConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig.Builder, + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder>( + getMulticloudDataTransferConfig(), getParentForChildren(), isClean()); + multicloudDataTransferConfig_ = null; + } + return multicloudDataTransferConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server waits
+     * 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, can ignore the second request. This prevents
+     * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+     * resources.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID
+     * (00000000-0000-0000-0000-000000000000) isn't supported.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + private static final com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta + .UpdateMulticloudDataTransferConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateMulticloudDataTransferConfigRequest 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.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequestOrBuilder.java new file mode 100644 index 000000000000..34ea80e50994 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateMulticloudDataTransferConfigRequestOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/data_transfer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateMulticloudDataTransferConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. `FieldMask` is used to specify the fields in the
+   * `MulticloudDataTransferConfig` resource to be overwritten by the update.
+   * The fields specified in `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If you
+   * don't specify a mask, all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the multicloudDataTransferConfig field is set. + */ + boolean hasMulticloudDataTransferConfig(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The multicloudDataTransferConfig. + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig + getMulticloudDataTransferConfig(); + + /** + * + * + *
+   * Required. The `MulticloudDataTransferConfig` resource to update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig multicloud_data_transfer_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigOrBuilder + getMulticloudDataTransferConfigOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server waits
+   * 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, can ignore the second request. This prevents
+   * clients from accidentally creating duplicate `MulticloudDataTransferConfig`
+   * resources.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID
+   * (00000000-0000-0000-0000-000000000000) isn't supported.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequest.java new file mode 100644 index 000000000000..a2ed19f7860e --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequest.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Request for
+ * [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1beta.HubService.UpdateSpoke]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest} + */ +@com.google.protobuf.Generated +public final class UpdateSpokeRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) + UpdateSpokeRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateSpokeRequest"); + } + + // Use UpdateSpokeRequest.newBuilder() to construct. + private UpdateSpokeRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateSpokeRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are 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 SPOKE_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + @java.lang.Override + public boolean hasSpoke() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSpoke()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpoke()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateSpokeRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasSpoke() != other.hasSpoke()) return false; + if (hasSpoke()) { + if (!getSpoke().equals(other.getSpoke())) 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 (hasSpoke()) { + hash = (37 * hash) + SPOKE_FIELD_NUMBER; + hash = (53 * hash) + getSpoke().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.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest 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.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest 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.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for
+   * [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1beta.HubService.UpdateSpoke]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.Builder.class); + } + + // Construct using com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetSpokeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.HubProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateSpokeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.spoke_ = spokeBuilder_ == null ? spoke_ : spokeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) { + return mergeFrom((com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasSpoke()) { + mergeSpoke(other.getSpoke()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetSpokeFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are 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. In the case of an update to an existing spoke, field mask is used
+     * to specify the fields to be overwritten. The fields specified in the
+     * update_mask are relative to the resource, not the full request. A field is
+     * overwritten if it is in the mask. If the user does not provide a mask, then
+     * all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Spoke spoke_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + spokeBuilder_; + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + public boolean hasSpoke() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke() { + if (spokeBuilder_ == null) { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } else { + return spokeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spoke_ = value; + } else { + spokeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSpoke( + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder builderForValue) { + if (spokeBuilder_ == null) { + spoke_ = builderForValue.build(); + } else { + spokeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSpoke(com.google.cloud.networkconnectivity.v1beta.Spoke value) { + if (spokeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && spoke_ != null + && spoke_ != com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance()) { + getSpokeBuilder().mergeFrom(value); + } else { + spoke_ = value; + } + } else { + spokeBuilder_.mergeFrom(value); + } + if (spoke_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSpoke() { + bitField0_ = (bitField0_ & ~0x00000002); + spoke_ = null; + if (spokeBuilder_ != null) { + spokeBuilder_.dispose(); + spokeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Spoke.Builder getSpokeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSpokeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder() { + if (spokeBuilder_ != null) { + return spokeBuilder_.getMessageOrBuilder(); + } else { + return spoke_ == null + ? com.google.cloud.networkconnectivity.v1beta.Spoke.getDefaultInstance() + : spoke_; + } + } + + /** + * + * + *
+     * Required. The state that the spoke should be in after the update.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder> + internalGetSpokeFieldBuilder() { + if (spokeBuilder_ == null) { + spokeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Spoke, + com.google.cloud.networkconnectivity.v1beta.Spoke.Builder, + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder>( + getSpoke(), getParentForChildren(), isClean()); + spoke_ = null; + } + return spokeBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server knows to ignore the request
+     * if it has already been completed. The server guarantees that a request
+     * doesn't result in creation of duplicate commitments for at least 60
+     * minutes.
+     *
+     * 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 to see whether the original operation
+     * was received. If it was, the server ignores the second request. This
+     * behavior prevents clients from mistakenly 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) + private static final com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSpokeRequest 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.networkconnectivity.v1beta.UpdateSpokeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequestOrBuilder.java new file mode 100644 index 000000000000..28de4e93a903 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateSpokeRequestOrBuilder.java @@ -0,0 +1,175 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/hub.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateSpokeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. In the case of an update to an existing spoke, field mask is used
+   * to specify the fields to be overwritten. The fields specified in the
+   * update_mask are relative to the resource, not the full request. A field is
+   * overwritten if it is in the mask. If the user does not provide a mask, then
+   * all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the spoke field is set. + */ + boolean hasSpoke(); + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The spoke. + */ + com.google.cloud.networkconnectivity.v1beta.Spoke getSpoke(); + + /** + * + * + *
+   * Required. The state that the spoke should be in after the update.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.SpokeOrBuilder getSpokeOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server knows to ignore the request
+   * if it has already been completed. The server guarantees that a request
+   * doesn't result in creation of duplicate commitments for at least 60
+   * minutes.
+   *
+   * 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 to see whether the original operation
+   * was received. If it was, the server ignores the second request. This
+   * behavior prevents clients from mistakenly 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-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequest.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequest.java new file mode 100644 index 000000000000..0873e5eaf714 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequest.java @@ -0,0 +1,1373 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +/** + * + * + *
+ * Message for updating a Transport.
+ * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateTransportRequest} + */ +@com.google.protobuf.Generated +public final class UpdateTransportRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) + UpdateTransportRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateTransportRequest"); + } + + // Use UpdateTransportRequest.newBuilder() to construct. + private UpdateTransportRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateTransportRequest() { + requestId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request 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 TRANSPORT_FIELD_NUMBER = 2; + private com.google.cloud.networkconnectivity.v1beta.Transport transport_; + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + @java.lang.Override + public boolean hasTransport() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport() { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder() { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getTransport()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, requestId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTransport()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.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.networkconnectivity.v1beta.UpdateTransportRequest)) { + return super.equals(obj); + } + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest other = + (com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasTransport() != other.hasTransport()) return false; + if (hasTransport()) { + if (!getTransport().equals(other.getTransport())) 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 (hasTransport()) { + hash = (37 * hash) + TRANSPORT_FIELD_NUMBER; + hash = (53 * hash) + getTransport().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.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest 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.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest 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.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a Transport.
+   * 
+ * + * Protobuf type {@code google.cloud.networkconnectivity.v1beta.UpdateTransportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.class, + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetTransportFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + transport_ = null; + if (transportBuilder_ != null) { + transportBuilder_.dispose(); + transportBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkconnectivity.v1beta.TransportManagerProto + .internal_static_google_cloud_networkconnectivity_v1beta_UpdateTransportRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + getDefaultInstanceForType() { + return com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest build() { + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest buildPartial() { + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest result = + new com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.transport_ = transportBuilder_ == null ? transport_ : transportBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) { + return mergeFrom( + (com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest other) { + if (other + == com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasTransport()) { + mergeTransport(other.getTransport()); + } + 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( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTransportFieldBuilder().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.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request 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 internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Field mask is used to specify the fields to be overwritten in the
+     * Transport 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 present in the request will be
+     * overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkconnectivity.v1beta.Transport transport_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + transportBuilder_; + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + public boolean hasTransport() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + public com.google.cloud.networkconnectivity.v1beta.Transport getTransport() { + if (transportBuilder_ == null) { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } else { + return transportBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransport(com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transport_ = value; + } else { + transportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransport( + com.google.cloud.networkconnectivity.v1beta.Transport.Builder builderForValue) { + if (transportBuilder_ == null) { + transport_ = builderForValue.build(); + } else { + transportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTransport(com.google.cloud.networkconnectivity.v1beta.Transport value) { + if (transportBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && transport_ != null + && transport_ + != com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance()) { + getTransportBuilder().mergeFrom(value); + } else { + transport_ = value; + } + } else { + transportBuilder_.mergeFrom(value); + } + if (transport_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTransport() { + bitField0_ = (bitField0_ & ~0x00000002); + transport_ = null; + if (transportBuilder_ != null) { + transportBuilder_.dispose(); + transportBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.Transport.Builder getTransportBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTransportFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder() { + if (transportBuilder_ != null) { + return transportBuilder_.getMessageOrBuilder(); + } else { + return transport_ == null + ? com.google.cloud.networkconnectivity.v1beta.Transport.getDefaultInstance() + : transport_; + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder> + internalGetTransportFieldBuilder() { + if (transportBuilder_ == null) { + transportBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkconnectivity.v1beta.Transport, + com.google.cloud.networkconnectivity.v1beta.Transport.Builder, + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder>( + getTransport(), getParentForChildren(), isClean()); + transport_ = null; + } + return transportBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) + private static final com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest(); + } + + public static com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTransportRequest 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.networkconnectivity.v1beta.UpdateTransportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequestOrBuilder.java b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequestOrBuilder.java new file mode 100644 index 000000000000..27ea069e3939 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/java/com/google/cloud/networkconnectivity/v1beta/UpdateTransportRequestOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkconnectivity/v1beta/transport_manager.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkconnectivity.v1beta; + +@com.google.protobuf.Generated +public interface UpdateTransportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkconnectivity.v1beta.UpdateTransportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Field mask is used to specify the fields to be overwritten in the
+   * Transport 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 present in the request will be
+   * overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transport field is set. + */ + boolean hasTransport(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transport. + */ + com.google.cloud.networkconnectivity.v1beta.Transport getTransport(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.networkconnectivity.v1beta.Transport transport = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkconnectivity.v1beta.TransportOrBuilder getTransportOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/common.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/common.proto new file mode 100644 index 000000000000..4ef2fe359f67 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/common.proto @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkconnectivity.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1Beta"; +option go_package = "cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectivitypb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.networkconnectivity.v1beta"; +option php_namespace = "Google\\Cloud\\NetworkConnectivity\\V1beta"; +option ruby_package = "Google::Cloud::NetworkConnectivity::V1beta"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/InterconnectAttachment" + pattern: "projects/{project}/regions/{region}/interconnectAttachments/{resource_id}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{resource_id}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Subnetwork" + pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/ServiceAttachment" + pattern: "projects/{project}/regions/{region}/serviceAttachments/{service_attachment}" +}; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/data_transfer.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/data_transfer.proto new file mode 100644 index 000000000000..4a477481c4ee --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/data_transfer.proto @@ -0,0 +1,825 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkconnectivity.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkconnectivity/v1beta/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1Beta"; +option go_package = "cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectivitypb"; +option java_multiple_files = true; +option java_outer_classname = "DataTransferProto"; +option java_package = "com.google.cloud.networkconnectivity.v1beta"; +option php_namespace = "Google\\Cloud\\NetworkConnectivity\\V1beta"; +option ruby_package = "Google::Cloud::NetworkConnectivity::V1beta"; + +// DataTransferService is the service for the Data Transfer API. +service DataTransferService { + option (google.api.default_host) = "networkconnectivity.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the `MulticloudDataTransferConfig` resources in a specified project + // and location. + rpc ListMulticloudDataTransferConfigs( + ListMulticloudDataTransferConfigsRequest) + returns (ListMulticloudDataTransferConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/multicloudDataTransferConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a `MulticloudDataTransferConfig` resource. + rpc GetMulticloudDataTransferConfig(GetMulticloudDataTransferConfigRequest) + returns (MulticloudDataTransferConfig) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/multicloudDataTransferConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a `MulticloudDataTransferConfig` resource in a specified project + // and location. + rpc CreateMulticloudDataTransferConfig( + CreateMulticloudDataTransferConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/multicloudDataTransferConfigs" + body: "multicloud_data_transfer_config" + }; + option (google.api.method_signature) = + "parent,multicloud_data_transfer_config,multicloud_data_transfer_config_id"; + option (google.longrunning.operation_info) = { + response_type: "MulticloudDataTransferConfig" + metadata_type: "OperationMetadata" + }; + } + + // Updates a `MulticloudDataTransferConfig` resource in a specified project + // and location. + rpc UpdateMulticloudDataTransferConfig( + UpdateMulticloudDataTransferConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{multicloud_data_transfer_config.name=projects/*/locations/*/multicloudDataTransferConfigs/*}" + body: "multicloud_data_transfer_config" + }; + option (google.api.method_signature) = + "multicloud_data_transfer_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MulticloudDataTransferConfig" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a `MulticloudDataTransferConfig` resource. + rpc DeleteMulticloudDataTransferConfig( + DeleteMulticloudDataTransferConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/multicloudDataTransferConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists the `Destination` resources in a specified project and location. + rpc ListDestinations(ListDestinationsRequest) + returns (ListDestinationsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/multicloudDataTransferConfigs/*}/destinations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a `Destination` resource. + rpc GetDestination(GetDestinationRequest) returns (Destination) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/multicloudDataTransferConfigs/*/destinations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a `Destination` resource in a specified project and location. + rpc CreateDestination(CreateDestinationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/multicloudDataTransferConfigs/*}/destinations" + body: "destination" + }; + option (google.api.method_signature) = "parent,destination,destination_id"; + option (google.longrunning.operation_info) = { + response_type: "Destination" + metadata_type: "OperationMetadata" + }; + } + + // Updates a `Destination` resource in a specified project and location. + rpc UpdateDestination(UpdateDestinationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{destination.name=projects/*/locations/*/multicloudDataTransferConfigs/*/destinations/*}" + body: "destination" + }; + option (google.api.method_signature) = "destination,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Destination" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a `Destination` resource. + rpc DeleteDestination(DeleteDestinationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/multicloudDataTransferConfigs/*/destinations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets the details of a service that is supported for Data Transfer + // Essentials. + rpc GetMulticloudDataTransferSupportedService( + GetMulticloudDataTransferSupportedServiceRequest) + returns (MulticloudDataTransferSupportedService) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/multicloudDataTransferSupportedServices/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists the services in the project for a region that are supported for + // Data Transfer Essentials. + rpc ListMulticloudDataTransferSupportedServices( + ListMulticloudDataTransferSupportedServicesRequest) + returns (ListMulticloudDataTransferSupportedServicesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/multicloudDataTransferSupportedServices" + }; + option (google.api.method_signature) = "parent"; + } +} + +// The `MulticloudDataTransferConfig` resource. It lists the services that you +// configure for Data Transfer Essentials billing and metering. +message MulticloudDataTransferConfig { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferConfig" + pattern: "projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}" + plural: "multicloudDataTransferConfigs" + singular: "multicloudDataTransferConfig" + }; + + // Identifier. The name of the `MulticloudDataTransferConfig` resource. + // Format: + // `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when the `MulticloudDataTransferConfig` resource was + // created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the `MulticloudDataTransferConfig` resource was + // updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // The etag is computed by the server, and might be sent with update and + // delete requests so that the client has an up-to-date value before + // proceeding. + string etag = 5; + + // Optional. A description of this resource. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of `Destination` resources configured for the + // `MulticloudDataTransferConfig` resource. + int32 destinations_count = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of `Destination` resources in use with the + // `MulticloudDataTransferConfig` resource. + int32 destinations_active_count = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Maps services to their current or planned states. Service names + // are keys, and the associated values describe the state of the service. If a + // state change is expected, the value is either `ADDING` or `DELETING`, + // depending on the actions taken. + // + // Sample output: + // "services": { + // "big-query": { + // "states": [ + // { + // "effectiveTime": "2024-12-12T08:00:00Z" + // "state": "ADDING", + // }, + // ] + // }, + // "cloud-storage": { + // "states": [ + // { + // "state": "ACTIVE", + // } + // ] + // } + // } + map services = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Google-generated unique ID for the + // `MulticloudDataTransferConfig` resource. This value is unique across all + // `MulticloudDataTransferConfig` resources. If a resource is deleted and + // another with the same name is created, the new resource is assigned a + // different and unique ID. + string uid = 10 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} + +// Request message to list `MulticloudDataTransferConfig` resources. +message ListMulticloudDataTransferConfigsRequest { + // Required. The name of the parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of results listed per page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that filters the results listed in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sort order of the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If `true`, allows partial responses for multi-regional aggregated + // list requests. + bool return_partial_success = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message to list `MulticloudDataTransferConfig` resources. +message ListMulticloudDataTransferConfigsResponse { + // The list of `MulticloudDataTransferConfig` resources to be listed. + repeated MulticloudDataTransferConfig multicloud_data_transfer_configs = 1; + + // The next page token. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message to get the details of a `MulticloudDataTransferConfig` +// resource. +message GetMulticloudDataTransferConfigRequest { + // Required. The name of the `MulticloudDataTransferConfig` resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferConfig" + } + ]; +} + +// Request message to create a `MulticloudDataTransferConfig` resource. +message CreateMulticloudDataTransferConfigRequest { + // Required. The name of the parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ID to use for the `MulticloudDataTransferConfig` resource, + // which becomes the final component of the `MulticloudDataTransferConfig` + // resource name. + string multicloud_data_transfer_config_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `MulticloudDataTransferConfig` resource to create. + MulticloudDataTransferConfig multicloud_data_transfer_config = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. This prevents + // clients from accidentally creating duplicate `MulticloudDataTransferConfig` + // resources. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to update a `MulticloudDataTransferConfig` resource. +message UpdateMulticloudDataTransferConfigRequest { + // Optional. `FieldMask` is used to specify the fields in the + // `MulticloudDataTransferConfig` resource to be overwritten by the update. + // The fields specified in `update_mask` are relative to the resource, not + // the full request. A field is overwritten if it is in the mask. If you + // don't specify a mask, all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The `MulticloudDataTransferConfig` resource to update. + MulticloudDataTransferConfig multicloud_data_transfer_config = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. This prevents + // clients from accidentally creating duplicate `MulticloudDataTransferConfig` + // resources. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to delete a `MulticloudDataTransferConfig` resource. +message DeleteMulticloudDataTransferConfigRequest { + // Required. The name of the `MulticloudDataTransferConfig` resource to + // delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferConfig" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. This prevents + // clients from accidentally creating duplicate `MulticloudDataTransferConfig` + // resources. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The etag is computed by the server, and might be sent with update + // and delete requests so that the client has an up-to-date value before + // proceeding. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `Destination` resource. It specifies the IP prefix and the associated +// autonomous system numbers (ASN) that you want to include in a +// `MulticloudDataTransferConfig` resource. +message Destination { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Destination" + pattern: "projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}" + plural: "destinations" + singular: "destination" + }; + + // The metadata for a `DestinationEndpoint` resource. + message DestinationEndpoint { + // The state of the `DestinationEndpoint` resource. + enum State { + // An invalid state, which is the default case. + STATE_UNSPECIFIED = 0; + + // The `DestinationEndpoint` resource is valid. + VALID = 1; + + // The `DestinationEndpoint` resource is invalid. + INVALID = 2; + } + + // Required. The ASN of the remote IP prefix. + int64 asn = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The CSP of the remote IP prefix. + string csp = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The state of the `DestinationEndpoint` resource. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the `DestinationEndpoint` resource was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. The name of the `Destination` resource. + // Format: + // `projects/{project}/locations/{location}/multicloudDataTransferConfigs/{multicloud_data_transfer_config}/destinations/{destination}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Time when the `Destination` resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the `Destination` resource was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // The etag is computed by the server, and might be sent with update and + // delete requests so that the client has an up-to-date value before + // proceeding. + string etag = 5; + + // Optional. A description of this resource. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The IP prefix that represents your workload on another + // CSP. + string ip_prefix = 7 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Unordered list. The list of `DestinationEndpoint` resources + // configured for the IP prefix. + repeated DestinationEndpoint endpoints = 8 [ + (google.api.field_behavior) = UNORDERED_LIST, + (google.api.field_behavior) = REQUIRED + ]; + + // Output only. The timeline of the expected `Destination` states or the + // current rest state. If a state change is expected, the value is `ADDING`, + // `DELETING` or `SUSPENDING`, depending on the action specified. + // + // Example: + // "state_timeline": { + // "states": [ + // { + // // The time when the `Destination` resource will be activated. + // "effectiveTime": "2024-12-01T08:00:00Z", + // "state": "ADDING" + // }, + // { + // // The time when the `Destination` resource will be suspended. + // "effectiveTime": "2024-12-01T20:00:00Z", + // "state": "SUSPENDING" + // } + // ] + // } + StateTimeline state_timeline = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Google-generated unique ID for the `Destination` resource. + // This value is unique across all `Destination` resources. + // If a resource is deleted and another with the same name is + // created, the new resource is assigned a different and unique ID. + string uid = 10 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; +} + +// Request message to list `Destination` resources. +message ListDestinationsRequest { + // Required. The name of the parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferConfig" + } + ]; + + // Optional. The maximum number of results listed per page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that filters the results listed in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The sort order of the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If `true`, allow partial responses for multi-regional aggregated + // list requests. + bool return_partial_success = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message to list `Destination` resources. +message ListDestinationsResponse { + // The list of `Destination` resources to be listed. + repeated Destination destinations = 1; + + // The next page token. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message to get the details of a `Destination` resource. +message GetDestinationRequest { + // Required. The name of the `Destination` resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Destination" + } + ]; +} + +// Request message to create a `Destination` resource. +message CreateDestinationRequest { + // Required. The name of the parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferConfig" + } + ]; + + // Required. The ID to use for the `Destination` resource, which becomes the + // final component of the `Destination` resource name. + string destination_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Destination` resource to create. + Destination destination = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. This prevents + // clients from accidentally creating duplicate `Destination` + // resources. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to update a `Destination` resource. +message UpdateDestinationRequest { + // Optional. `FieldMask is used to specify the fields to be overwritten in the + // `Destination` resource by the update. + // The fields specified in `update_mask` are relative to the resource, not + // the full request. A field is overwritten if it is in the mask. If you + // don't specify a mask, all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The `Destination` resource to update. + Destination destination = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to delete a `Destination` resource. +message DeleteDestinationRequest { + // Required. The name of the `Destination` resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Destination" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server waits + // 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, can ignore the second request. + // + // The request ID must be a valid UUID with the exception that zero UUID + // (00000000-0000-0000-0000-000000000000) isn't supported. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The etag is computed by the server, and might be sent with update + // and delete requests so that the client has an up-to-date value before + // proceeding. + string etag = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The timeline of the pending states for a resource. +message StateTimeline { + // The state and activation time details of the resource state. + message StateMetadata { + // The state of the resource. + enum State { + // An invalid state, which is the default case. + STATE_UNSPECIFIED = 0; + + // The resource is being added. + ADDING = 1; + + // The resource is in use. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource is being suspended. + SUSPENDING = 4; + + // The resource is suspended and not in use. + SUSPENDED = 5; + } + + // Output only. The state of the resource. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Accompanies only the transient states, which include + // `ADDING`, `DELETING`, and `SUSPENDING`, to denote the time until which + // the transient state of the resource will be effective. For instance, if + // the state is `ADDING`, this field shows the time when the resource state + // transitions to `ACTIVE`. + google.protobuf.Timestamp effective_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The state and activation time details of the resource state. + repeated StateMetadata states = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A service in your project in a region that is eligible for Data Transfer +// Essentials configuration. +message MulticloudDataTransferSupportedService { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferSupportedService" + pattern: "projects/{project}/locations/{location}/multicloudDataTransferSupportedServices/{multicloud_data_transfer_supported_service}" + plural: "multicloudDataTransferSupportedServices" + singular: "multicloudDataTransferSupportedService" + }; + + // Identifier. The name of the service. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The network service tier or regional endpoint supported for + // the service. + repeated ServiceConfig service_configs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Specifies eligibility information for the service. +message ServiceConfig { + // The eligibility information for the service. + enum EligibilityCriteria { + // The service is not eligible for Data Transfer Essentials configuration. + // This is the default case. + ELIGIBILITY_CRITERIA_UNSPECIFIED = 0; + + // The service is eligible for Data Transfer Essentials configuration only + // for Premium Tier. + NETWORK_SERVICE_TIER_PREMIUM_ONLY = 1; + + // The service is eligible for Data Transfer Essentials configuration only + // for Standard Tier. + NETWORK_SERVICE_TIER_STANDARD_ONLY = 2; + + // The service is eligible for Data Transfer Essentials configuration only + // for the regional endpoint. + REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY = 3; + } + + // Output only. The eligibility criteria for the service. + EligibilityCriteria eligibility_criteria = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The end time for eligibility criteria support. If not + // specified, no planned end time is set. + google.protobuf.Timestamp support_end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message to check if a service in your project in a region is +// eligible for Data Transfer Essentials configuration. +message GetMulticloudDataTransferSupportedServiceRequest { + // Required. The name of the service. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/MulticloudDataTransferSupportedService" + } + ]; +} + +// Request message to list the services in your project that are eligible for +// Data Transfer Essentials configuration. +message ListMulticloudDataTransferSupportedServicesRequest { + // Required. The name of the parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The maximum number of results listed per page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message to list the services in your project in regions that are +// eligible for Data Transfer Essentials configuration. +message ListMulticloudDataTransferSupportedServicesResponse { + // The list of supported services. + repeated MulticloudDataTransferSupportedService + multicloud_data_transfer_supported_services = 1; + + // The next page token. + string next_page_token = 2; +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/hub.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/hub.proto new file mode 100644 index 000000000000..0c4190b4b4b0 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/hub.proto @@ -0,0 +1,2420 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkconnectivity.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkconnectivity/v1beta/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1Beta"; +option go_package = "cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectivitypb"; +option java_multiple_files = true; +option java_outer_classname = "HubProto"; +option java_package = "com.google.cloud.networkconnectivity.v1beta"; +option php_namespace = "Google\\Cloud\\NetworkConnectivity\\V1beta"; +option ruby_package = "Google::Cloud::NetworkConnectivity::V1beta"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/VpnTunnel" + pattern: "projects/{project}/regions/{region}/vpnTunnels/{resource_id}" +}; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Instance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; +option (google.api.resource_definition) = { + type: "networksecurity.googleapis.com/SACAttachment" + pattern: "projects/{project}/locations/{location}/sacAttachments/{sac_attachment}" +}; + +// Network Connectivity Center is a hub-and-spoke abstraction for network +// connectivity management in Google Cloud. It reduces operational complexity +// through a simple, centralized connectivity management model. +service HubService { + option (google.api.default_host) = "networkconnectivity.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists the Network Connectivity Center hubs associated with a given project. + rpc ListHubs(ListHubsRequest) returns (ListHubsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/global}/hubs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a Network Connectivity Center hub. + rpc GetHub(GetHubRequest) returns (Hub) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Network Connectivity Center hub in the specified project. + rpc CreateHub(CreateHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/global}/hubs" + body: "hub" + }; + option (google.api.method_signature) = "parent,hub,hub_id"; + option (google.longrunning.operation_info) = { + response_type: "Hub" + metadata_type: "OperationMetadata" + }; + } + + // Updates the description and/or labels of a Network Connectivity Center + // hub. + rpc UpdateHub(UpdateHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{hub.name=projects/*/locations/global/hubs/*}" + body: "hub" + }; + option (google.api.method_signature) = "hub,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Hub" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Network Connectivity Center hub. + rpc DeleteHub(DeleteHubRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/global/hubs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists the Network Connectivity Center spokes associated with a + // specified hub and location. The list includes both spokes that are attached + // to the hub and spokes that have been proposed but not yet accepted. + rpc ListHubSpokes(ListHubSpokesRequest) returns (ListHubSpokesResponse) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*}:listSpokes" + }; + option (google.api.method_signature) = "name"; + } + + // Query the Private Service Connect propagation status of a Network + // Connectivity Center hub. + rpc QueryHubStatus(QueryHubStatusRequest) returns (QueryHubStatusResponse) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*}:queryStatus" + }; + option (google.api.method_signature) = "name"; + } + + // Lists the Network Connectivity Center spokes in a specified project and + // location. + rpc ListSpokes(ListSpokesRequest) returns (ListSpokesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/spokes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a Network Connectivity Center spoke. + rpc GetSpoke(GetSpokeRequest) returns (Spoke) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/spokes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a Network Connectivity Center spoke. + rpc CreateSpoke(CreateSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/spokes" + body: "spoke" + }; + option (google.api.method_signature) = "parent,spoke,spoke_id"; + option (google.longrunning.operation_info) = { + response_type: "Spoke" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a Network Connectivity Center spoke. + rpc UpdateSpoke(UpdateSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{spoke.name=projects/*/locations/*/spokes/*}" + body: "spoke" + }; + option (google.api.method_signature) = "spoke,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Spoke" + metadata_type: "OperationMetadata" + }; + } + + // Rejects a Network Connectivity Center spoke from being attached to a hub. + // If the spoke was previously in the `ACTIVE` state, it + // transitions to the `INACTIVE` state and is no longer able to + // connect to other spokes that are attached to the hub. + rpc RejectHubSpoke(RejectHubSpokeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/global/hubs/*}:rejectSpoke" + body: "*" + }; + option (google.api.method_signature) = "name,spoke_uri"; + option (google.longrunning.operation_info) = { + response_type: "RejectHubSpokeResponse" + metadata_type: "OperationMetadata" + }; + } + + // Accepts a proposal to attach a Network Connectivity Center spoke + // to a hub. + rpc AcceptHubSpoke(AcceptHubSpokeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/global/hubs/*}:acceptSpoke" + body: "*" + }; + option (google.api.method_signature) = "name,spoke_uri"; + option (google.longrunning.operation_info) = { + response_type: "AcceptHubSpokeResponse" + metadata_type: "OperationMetadata" + }; + } + + // Accepts a proposal to update a Network Connectivity Center spoke in a hub. + rpc AcceptSpokeUpdate(AcceptSpokeUpdateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/global/hubs/*}:acceptSpokeUpdate" + body: "*" + }; + option (google.api.method_signature) = "name,spoke_uri,spoke_etag"; + option (google.longrunning.operation_info) = { + response_type: "AcceptSpokeUpdateResponse" + metadata_type: "OperationMetadata" + }; + } + + // Rejects a proposal to update a Network Connectivity Center spoke in a hub. + rpc RejectSpokeUpdate(RejectSpokeUpdateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/global/hubs/*}:rejectSpokeUpdate" + body: "*" + }; + option (google.api.method_signature) = "name,spoke_uri,spoke_etag"; + option (google.longrunning.operation_info) = { + response_type: "RejectSpokeUpdateResponse" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Network Connectivity Center spoke. + rpc DeleteSpoke(DeleteSpokeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/spokes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details about a Network Connectivity Center route table. + rpc GetRouteTable(GetRouteTableRequest) returns (RouteTable) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*/routeTables/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets details about the specified route. + rpc GetRoute(GetRouteRequest) returns (Route) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*/routeTables/*/routes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists routes in a given route table. + rpc ListRoutes(ListRoutesRequest) returns (ListRoutesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/global/hubs/*/routeTables/*}/routes" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists route tables in a given hub. + rpc ListRouteTables(ListRouteTablesRequest) + returns (ListRouteTablesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/global/hubs/*}/routeTables" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details about a Network Connectivity Center group. + rpc GetGroup(GetGroupRequest) returns (Group) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/hubs/*/groups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists groups in a given hub. + rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/global/hubs/*}/groups" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the parameters of a Network Connectivity Center group. + rpc UpdateGroup(UpdateGroupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{group.name=projects/*/locations/global/hubs/*/groups/*}" + body: "group" + }; + option (google.api.method_signature) = "group,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Group" + metadata_type: "OperationMetadata" + }; + } + + // Create a GatewayAdvertisedRoute + rpc CreateGatewayAdvertisedRoute(CreateGatewayAdvertisedRouteRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/spokes/*}/gatewayAdvertisedRoutes" + body: "gateway_advertised_route" + }; + option (google.api.method_signature) = + "parent,gateway_advertised_route,gateway_advertised_route_id"; + option (google.longrunning.operation_info) = { + response_type: "GatewayAdvertisedRoute" + metadata_type: "OperationMetadata" + }; + } + + // Get a GatewayAdvertisedRoute + rpc GetGatewayAdvertisedRoute(GetGatewayAdvertisedRouteRequest) + returns (GatewayAdvertisedRoute) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/spokes/*/gatewayAdvertisedRoutes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List GatewayAdvertisedRoutes + rpc ListGatewayAdvertisedRoutes(ListGatewayAdvertisedRoutesRequest) + returns (ListGatewayAdvertisedRoutesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/spokes/*}/gatewayAdvertisedRoutes" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a GatewayAdvertisedRoute + rpc UpdateGatewayAdvertisedRoute(UpdateGatewayAdvertisedRouteRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{gateway_advertised_route.name=projects/*/locations/*/spokes/*/gatewayAdvertisedRoutes/*}" + body: "gateway_advertised_route" + }; + option (google.api.method_signature) = + "gateway_advertised_route,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "GatewayAdvertisedRoute" + metadata_type: "OperationMetadata" + }; + } + + // Delete a GatewayAdvertisedRoute + rpc DeleteGatewayAdvertisedRoute(DeleteGatewayAdvertisedRouteRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/spokes/*/gatewayAdvertisedRoutes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// The route's type +enum RouteType { + // No route type information specified + ROUTE_TYPE_UNSPECIFIED = 0; + + // The route leads to a destination within the primary address range of the + // VPC network's subnet. + VPC_PRIMARY_SUBNET = 1; + + // The route leads to a destination within the secondary address range of the + // VPC network's subnet. + VPC_SECONDARY_SUBNET = 2; + + // The route leads to a destination in a dynamic route. Dynamic routes are + // derived from Border Gateway Protocol (BGP) advertisements received from an + // NCC hybrid spoke. + DYNAMIC_ROUTE = 3; +} + +// The State enum represents the lifecycle stage of a Network Connectivity +// Center resource. +enum State { + // No state information available + STATE_UNSPECIFIED = 0; + + // The resource's create operation is in progress. + CREATING = 1; + + // The resource is active + ACTIVE = 2; + + // The resource's delete operation is in progress. + DELETING = 3; + + // The resource's accept operation is in progress. + ACCEPTING = 8; + + // The resource's reject operation is in progress. + REJECTING = 9; + + // The resource's update operation is in progress. + UPDATING = 6; + + // The resource is inactive. + INACTIVE = 7; + + // The hub associated with this spoke resource has been deleted. + // This state applies to spoke resources only. + OBSOLETE = 10; + + // The resource is in an undefined state due to resource creation or deletion + // failure. You can try to delete the resource later or contact support for + // help. + FAILED = 11; +} + +// The SpokeType enum represents the type of spoke. The type +// reflects the kind of resource that a spoke is associated with. +enum SpokeType { + // Unspecified spoke type. + SPOKE_TYPE_UNSPECIFIED = 0; + + // Spokes associated with VPN tunnels. + VPN_TUNNEL = 1; + + // Spokes associated with VLAN attachments. + INTERCONNECT_ATTACHMENT = 2; + + // Spokes associated with router appliance instances. + ROUTER_APPLIANCE = 3; + + // Spokes associated with VPC networks. + VPC_NETWORK = 4; + + // Spokes that are NCC gateways. + GATEWAY = 5; + + // Spokes that are backed by a producer VPC network. + PRODUCER_VPC_NETWORK = 7; +} + +// This enum controls the policy mode used in a hub. +enum PolicyMode { + // Policy mode is unspecified. It defaults to PRESET + // with preset_topology = MESH. + POLICY_MODE_UNSPECIFIED = 0; + + // Hub uses one of the preset topologies. + PRESET = 1; +} + +// The list of available preset topologies. +enum PresetTopology { + // Preset topology is unspecified. When policy_mode = PRESET, + // it defaults to MESH. + PRESET_TOPOLOGY_UNSPECIFIED = 0; + + // Mesh topology is implemented. Group `default` is automatically created. + // All spokes in the hub are added to group `default`. + MESH = 2; + + // Star topology is implemented. Two groups, `center` and `edge`, are + // automatically created along with hub creation. Spokes have to join one of + // the groups during creation. + STAR = 3; + + // Hybrid inspection has 4 groups ('non-prod', 'prod', 'services', and + // 'untrusted') that are automatically created along with hub creation. + HYBRID_INSPECTION = 4; +} + +// Supported features for a location +enum LocationFeature { + // No publicly supported feature in this location + LOCATION_FEATURE_UNSPECIFIED = 0; + + // Site-to-cloud spokes are supported in this location + SITE_TO_CLOUD_SPOKES = 1; + + // Site-to-site spokes are supported in this location + SITE_TO_SITE_SPOKES = 2; + + // Gateway spokes are supported in this location. + GATEWAY_SPOKES = 3; +} + +// A Network Connectivity Center hub is a global management resource to which +// you attach spokes. A single hub can contain spokes from multiple regions. +// However, if any of a hub's spokes use the site-to-site data transfer feature, +// the resources associated with those spokes must all be in the same VPC +// network. Spokes that do not use site-to-site data transfer can be associated +// with any VPC network in your project. +message Hub { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Hub" + pattern: "projects/{project}/locations/global/hubs/{hub}" + }; + + // Immutable. The name of the hub. Hub names must be unique. They use the + // following form: + // `projects/{project_number}/locations/global/hubs/{hub_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time the hub was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the hub was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 4; + + // Optional. An optional description of the hub. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Google-generated UUID for the hub. This value is unique + // across all hub resources. If a hub is deleted and another with the same + // name is created, the new hub is assigned a different unique_id. + string unique_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this hub. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The VPC networks associated with this hub's spokes. + // + // This field is read-only. Network Connectivity Center automatically + // populates it based on the set of spokes attached to the hub. + repeated RoutingVPC routing_vpcs = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The route tables that belong to this hub. They use the + // following form: + // `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + // + // This field is read-only. Network Connectivity Center automatically + // populates it based on the route tables nested under the hub. + repeated string route_tables = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A summary of the spokes associated with a hub. The + // summary includes a count of spokes according to type + // and according to state. If any spokes are inactive, + // the summary also lists the reasons they are inactive, + // including a count for each reason. + SpokeSummary spoke_summary = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The policy mode of this hub. This field can be either + // PRESET or CUSTOM. If unspecified, the + // policy_mode defaults to PRESET. + PolicyMode policy_mode = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The topology implemented in this hub. Currently, this field is + // only used when policy_mode = PRESET. The available preset topologies are + // MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, + // the preset_topology defaults to MESH. When policy_mode = CUSTOM, + // the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + PresetTopology preset_topology = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether Private Service Connect connection propagation is enabled + // for the hub. If true, Private Service Connect endpoints in VPC spokes + // attached to the hub are made accessible to other VPC spokes attached to the + // hub. The default value is false. + optional bool export_psc = 15 [(google.api.field_behavior) = OPTIONAL]; +} + +// RoutingVPC contains information about the VPC networks associated +// with the spokes of a Network Connectivity Center hub. +message RoutingVPC { + // The URI of the VPC network. + string uri = 1 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. If true, indicates that this VPC network is currently + // associated with spokes that use the data transfer feature (spokes where the + // site_to_site_data_transfer field is set to true). If you create new spokes + // that use data transfer, they must be associated with this VPC network. At + // most, one VPC network will have this field set to true. + bool required_for_new_site_to_site_data_transfer_spokes = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A Network Connectivity Center spoke represents one or more network +// connectivity resources. +// +// When you create a spoke, you associate it with a hub. You must also +// identify a value for exactly one of the following fields: +// +// * linked_vpn_tunnels +// * linked_interconnect_attachments +// * linked_router_appliance_instances +// * linked_vpc_network +message Spoke { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Spoke" + pattern: "projects/{project}/locations/{location}/spokes/{spoke}" + }; + + // The reason for the current state of the spoke. + message StateReason { + // The Code enum represents the various reasons for the state of the spoke. + enum Code { + // No information available. + CODE_UNSPECIFIED = 0; + + // The proposed spoke is pending review. + PENDING_REVIEW = 1; + + // The proposed spoke has been rejected by the hub administrator. + REJECTED = 2; + + // The spoke has been deactivated internally. + PAUSED = 3; + + // Network Connectivity Center encountered errors while accepting + // the spoke. + FAILED = 4; + + // The proposed spoke update is pending review. + UPDATE_PENDING_REVIEW = 5; + + // The proposed spoke update has been rejected by the hub administrator. + UPDATE_REJECTED = 6; + + // Network Connectivity Center encountered errors while accepting + // the spoke update. + UPDATE_FAILED = 7; + } + + // The code associated with this reason. + Code code = 1; + + // Human-readable details about this reason. + string message = 2; + + // Additional information provided by the user in the RejectSpoke call. + string user_details = 3; + } + + // Immutable. The name of the spoke. Spoke names must be unique. They use the + // following form: + // `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time the spoke was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the spoke was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 4; + + // Optional. An optional description of the spoke. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Immutable. The name of the hub that this spoke is attached to. + string hub = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Optional. The name of the group that this spoke is associated with. + string group = 23 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Group" + } + ]; + + // Optional. VPN tunnels that are associated with the spoke. + LinkedVpnTunnels linked_vpn_tunnels = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. VLAN attachments that are associated with the spoke. + LinkedInterconnectAttachments linked_interconnect_attachments = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Router appliance instances that are associated with the spoke. + LinkedRouterApplianceInstances linked_router_appliance_instances = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. VPC network that is associated with the spoke. + LinkedVpcNetwork linked_vpc_network = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is a gateway that can apply specialized processing to + // traffic going through it. + Gateway gateway = 24 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The linked producer VPC that is associated with the spoke. + LinkedProducerVpcNetwork linked_producer_vpc_network = 26 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Google-generated UUID for the spoke. This value is unique + // across all spoke resources. If a spoke is deleted and another with the same + // name is created, the new spoke is assigned a different `unique_id`. + string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this spoke. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reasons for current state of the spoke. + repeated StateReason reasons = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of resource associated with the spoke. + SpokeType spoke_type = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 27 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of fields waiting for hub administrator's approval. + repeated string field_paths_pending_update = 28 + [(google.api.field_behavior) = OPTIONAL]; +} + +message RouteTable { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/RouteTable" + pattern: "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}" + }; + + // Immutable. The name of the route table. Route table names must be unique. + // They use the following form: + // `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time the route table was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the route table was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 4; + + // An optional description of the route table. + string description = 5; + + // Output only. The Google-generated UUID for the route table. This value is + // unique across all route table resources. If a route table is deleted and + // another with the same name is created, the new route table is assigned + // a different `uid`. + string uid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this route table. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A route defines a path from VM instances within a spoke to a specific +// destination resource. Only VPC spokes have routes. +message Route { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/HubRoute" + pattern: "projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}" + }; + + // Immutable. The name of the route. Route names must be unique. Route names + // use the following form: + // `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + string name = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time the route was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the route was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The destination IP address range. + string ip_cidr_range = 1; + + // Output only. The route's type. Its type is determined by the properties of + // its IP address range. + RouteType type = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The destination VPC network for packets on this route. + NextHopVpcNetwork next_hop_vpc_network = 2 + [(google.api.field_behavior) = IMMUTABLE]; + + // Optional labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 6; + + // An optional description of the route. + string description = 7; + + // Output only. The Google-generated UUID for the route. This value is unique + // across all Network Connectivity Center route resources. If a + // route is deleted and another with the same name is created, + // the new route is assigned a different `uid`. + string uid = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of the route. + State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The spoke that this route leads to. + // Example: projects/12345/locations/global/spokes/SPOKE + string spoke = 11 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Output only. The origin location of the route. + // Uses the following form: "projects/{project}/locations/{location}" + // Example: projects/1234/locations/us-central1 + string location = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The priority of this route. Priority is used to break ties in + // cases where a destination matches more than one route. In these cases the + // route with the lowest-numbered priority value wins. + int64 priority = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The next-hop VPN tunnel for packets on this route. + NextHopVPNTunnel next_hop_vpn_tunnel = 14 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The next-hop Router appliance instance for packets on this + // route. + NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The next-hop VLAN attachment for packets on this route. + NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 + [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The next-hop spoke for packets on this route. + NextHopSpoke next_hop_spoke = 18 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A group represents a subset of spokes attached to a hub. +message Group { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Group" + pattern: "projects/{project}/locations/global/hubs/{hub}/groups/{group}" + }; + + // Immutable. The name of the group. Group names must be unique. They + // use the following form: + // `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The time the group was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the group was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the group. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Google-generated UUID for the group. This value is unique + // across all group resources. If a group is deleted and + // another with the same name is created, the new route table is assigned + // a different unique_id. + string uid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this group. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The auto-accept setting for this group. + AutoAccept auto_accept = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The name of the route table that corresponds to this group. + // They use the following form: + // `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + string route_table = 9 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/RouteTable" + } + ]; +} + +// The auto-accept setting for a group controls whether +// proposed spokes are automatically attached to the hub. If auto-accept is +// enabled, the spoke immediately is attached to the hub and becomes part of the +// group. In this case, the new spoke is in the ACTIVE state. +// If auto-accept is disabled, the spoke goes to the INACTIVE +// state, and it must be reviewed and accepted by a hub +// administrator. +message AutoAccept { + // Optional. A list of project ids or project numbers for which you want + // to enable auto-accept. The auto-accept setting is applied to + // spokes being created or updated in these projects. + repeated string auto_accept_projects = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for +// [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs] +// method. +message ListHubsRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results per page to return. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [HubService.ListHubs][google.cloud.networkconnectivity.v1beta.HubService.ListHubs] +// method. +message ListHubsResponse { + // The requested hubs. + repeated Hub hubs = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for +// [HubService.GetHub][google.cloud.networkconnectivity.v1beta.HubService.GetHub] +// method. +message GetHubRequest { + // Required. The name of the hub resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; +} + +// Request for +// [HubService.CreateHub][google.cloud.networkconnectivity.v1beta.HubService.CreateHub] +// method. +message CreateHubRequest { + // Required. The parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. A unique identifier for the hub. + string hub_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The initial values for a new hub. + Hub hub = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// Request for +// [HubService.UpdateHub][google.cloud.networkconnectivity.v1beta.HubService.UpdateHub] +// method. +message UpdateHubRequest { + // Optional. In the case of an update to an existing hub, field mask is used + // to specify the fields to be overwritten. The fields specified in the + // update_mask are relative to the resource, not the full request. A field is + // overwritten if it is in the mask. If the user does not provide a mask, then + // all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state that the hub should be in after the update. + Hub hub = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// The request for +// [HubService.DeleteHub][google.cloud.networkconnectivity.v1beta.HubService.DeleteHub]. +message DeleteHubRequest { + // Required. The name of the hub to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// The request for +// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes]. +// +message ListHubSpokesRequest { + // Enum that controls which spoke fields are included in the response. + enum SpokeView { + // The spoke view is unspecified. When the spoke view is unspecified, the + // API returns the same fields as the `BASIC` view. + SPOKE_VIEW_UNSPECIFIED = 0; + + // Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`, + // and `spoke_type`. This is the default value. + BASIC = 1; + + // Includes all spoke fields except `labels`. + // You can use the `DETAILED` view only when you set the `spoke_locations` + // field to `[global]`. + DETAILED = 2; + } + + // Required. The name of the hub. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // A list of locations. + // Specify one of the following: `[global]`, a single region (for + // example, `[us-central1]`), or a combination of + // values (for example, `[global, us-central1, us-west1]`). + // If the spoke_locations field is populated, the list of results + // includes only spokes in the specified location. + // If the spoke_locations field is not populated, the list of results + // includes spokes in all locations. + repeated string spoke_locations = 2; + + // The maximum number of results to return per page. + int32 page_size = 3; + + // The page token. + string page_token = 4; + + // An expression that filters the list of results. + string filter = 5; + + // Sort the results by name or create_time. + string order_by = 6; + + // The view of the spoke to return. + // The view that you use determines which spoke fields are included in the + // response. + SpokeView view = 7; +} + +// The response for +// [HubService.ListHubSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListHubSpokes]. +message ListHubSpokesResponse { + // The requested spokes. + // The spoke fields can be partially populated based on the `view` field in + // the request message. + repeated Spoke spokes = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request for +// [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus]. +message QueryHubStatusRequest { + // Required. The name of the hub. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Optional. The maximum number of results to return per page. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression that filters the list of results. + // The filter can be used to filter the results by the following fields: + // * `psc_propagation_status.source_spoke` + // * `psc_propagation_status.source_group` + // * `psc_propagation_status.source_forwarding_rule` + // * `psc_propagation_status.target_spoke` + // * `psc_propagation_status.target_group` + // * `psc_propagation_status.code` + // * `psc_propagation_status.message` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sort the results in ascending order by the specified fields. + // A comma-separated list of any of these fields: + // * `psc_propagation_status.source_spoke` + // * `psc_propagation_status.source_group` + // * `psc_propagation_status.source_forwarding_rule` + // * `psc_propagation_status.target_spoke` + // * `psc_propagation_status.target_group` + // * `psc_propagation_status.code` + // If `group_by` is set, the value of the `order_by` field must be the + // same as or a subset of the `group_by` field. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Aggregate the results by the specified fields. + // A comma-separated list of any of these fields: + // * `psc_propagation_status.source_spoke` + // * `psc_propagation_status.source_group` + // * `psc_propagation_status.source_forwarding_rule` + // * `psc_propagation_status.target_spoke` + // * `psc_propagation_status.target_group` + // * `psc_propagation_status.code` + string group_by = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [HubService.QueryHubStatus][google.cloud.networkconnectivity.v1beta.HubService.QueryHubStatus]. +message QueryHubStatusResponse { + // The list of hub status. + repeated HubStatusEntry hub_status_entries = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; +} + +// A hub status entry represents the status of a set of propagated Private +// Service Connect connections grouped by certain fields. +message HubStatusEntry { + // The number of propagated Private Service Connect connections with this + // status. If the `group_by` field was not set in the request message, the + // value of this field is 1. + int32 count = 1; + + // The fields that this entry is grouped by. This has the same value as the + // `group_by` field in the request message. + string group_by = 2; + + // The Private Service Connect propagation status. + PscPropagationStatus psc_propagation_status = 3; +} + +// The status of one or more propagated Private Service Connect connections in a +// hub. +message PscPropagationStatus { + // The Code enum represents the state of the Private Service Connect + // propagation. + enum Code { + // The code is unspecified. + CODE_UNSPECIFIED = 0; + + // The propagated Private Service Connect connection is ready. + READY = 1; + + // The Private Service Connect connection is propagating. This is a + // transient state. + PROPAGATING = 2; + + // The Private Service Connect connection propagation failed because the VPC + // network or the project of the target spoke has exceeded the connection + // limit set by the producer. + ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; + + // The Private Service Connect connection propagation failed because the NAT + // IP subnet space has been exhausted. It is equivalent to the `Needs + // attention` status of the Private Service Connect connection. See + // https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses. + ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; + + // The Private Service Connect connection propagation failed because the + // `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the + // producer VPC network has been exceeded. + ERROR_PRODUCER_QUOTA_EXCEEDED = 5; + + // The Private Service Connect connection propagation failed because the + // `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer + // VPC network has been exceeded. + ERROR_CONSUMER_QUOTA_EXCEEDED = 6; + } + + // The name of the spoke that the source forwarding rule belongs to. + string source_spoke = 1; + + // The name of the group that the source spoke belongs to. + string source_group = 2; + + // The name of the forwarding rule exported to the hub. + string source_forwarding_rule = 3; + + // The name of the spoke that the source forwarding rule propagates to. + string target_spoke = 4; + + // The name of the group that the target spoke belongs to. + string target_group = 5; + + // The propagation status. + Code code = 6; + + // The human-readable summary of the Private Service Connect connection + // propagation status. + string message = 7; +} + +// The request for +// [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes]. +message ListSpokesRequest { + // Required. The parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results to return per page. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// The response for +// [HubService.ListSpokes][google.cloud.networkconnectivity.v1beta.HubService.ListSpokes]. +message ListSpokesResponse { + // The requested spokes. + repeated Spoke spokes = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request for +// [HubService.GetSpoke][google.cloud.networkconnectivity.v1beta.HubService.GetSpoke]. +message GetSpokeRequest { + // Required. The name of the spoke resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; +} + +// The request for +// [HubService.CreateSpoke][google.cloud.networkconnectivity.v1beta.HubService.CreateSpoke]. +message CreateSpokeRequest { + // Required. The parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Unique id for the spoke to create. + string spoke_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The initial values for a new spoke. + Spoke spoke = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// Request for +// [HubService.UpdateSpoke][google.cloud.networkconnectivity.v1beta.HubService.UpdateSpoke] +// method. +message UpdateSpokeRequest { + // Optional. In the case of an update to an existing spoke, field mask is used + // to specify the fields to be overwritten. The fields specified in the + // update_mask are relative to the resource, not the full request. A field is + // overwritten if it is in the mask. If the user does not provide a mask, then + // all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state that the spoke should be in after the update. + Spoke spoke = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// The request for +// [HubService.DeleteSpoke][google.cloud.networkconnectivity.v1beta.HubService.DeleteSpoke]. +message DeleteSpokeRequest { + // Required. The name of the spoke to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// The request for +// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke]. +message AcceptHubSpokeRequest { + // Required. The name of the hub into which to accept the spoke. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Required. The URI of the spoke to accept into the hub. + string spoke_uri = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} + +// The response for +// [HubService.AcceptHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.AcceptHubSpoke]. +message AcceptHubSpokeResponse { + // The spoke that was operated on. + Spoke spoke = 1; +} + +// The request for +// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke]. +message RejectHubSpokeRequest { + // Required. The name of the hub from which to reject the spoke. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Required. The URI of the spoke to reject from the hub. + string spoke_uri = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; + + // Optional. Additional information provided by the hub administrator. + string details = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response for +// [HubService.RejectHubSpoke][google.cloud.networkconnectivity.v1beta.HubService.RejectHubSpoke]. +message RejectHubSpokeResponse { + // The spoke that was operated on. + Spoke spoke = 1; +} + +// The request for +// [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate]. +message AcceptSpokeUpdateRequest { + // Required. The name of the hub to accept spoke update. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Required. The URI of the spoke to accept update. + string spoke_uri = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Required. The etag of the spoke to accept update. + string spoke_etag = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly creating duplicate commitments. + // + // The request ID must be a valid UUID, with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The response for +// [HubService.AcceptSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.AcceptSpokeUpdate]. +message AcceptSpokeUpdateResponse { + // The spoke that was operated on. + Spoke spoke = 1; +} + +// The request for +// [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate]. +message RejectSpokeUpdateRequest { + // Required. The name of the hub to reject spoke update. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // Required. The URI of the spoke to reject update. + string spoke_uri = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Required. The etag of the spoke to reject update. + string spoke_etag = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional information provided by the hub administrator. + string details = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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 = 5 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The response for +// [HubService.RejectSpokeUpdate][google.cloud.networkconnectivity.v1beta.HubService.RejectSpokeUpdate]. +message RejectSpokeUpdateResponse { + // The spoke that was operated on. + Spoke spoke = 1; +} + +// The request for +// [HubService.GetRouteTable][google.cloud.networkconnectivity.v1beta.HubService.GetRouteTable]. +message GetRouteTableRequest { + // Required. The name of the route table resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/RouteTable" + } + ]; +} + +// The request for +// [HubService.GetRoute][google.cloud.networkconnectivity.v1beta.HubService.GetRoute]. +message GetRouteRequest { + // Required. The name of the route resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/HubRoute" + } + ]; +} + +// Request for +// [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes] +// method. +message ListRoutesRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/RouteTable" + } + ]; + + // The maximum number of results to return per page. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [HubService.ListRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListRoutes] +// method. +message ListRoutesResponse { + // The requested routes. + repeated Route routes = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // RouteTables that could not be reached. + repeated string unreachable = 3; +} + +// Request for +// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables] +// method. +message ListRouteTablesRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // The maximum number of results to return per page. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [HubService.ListRouteTables][google.cloud.networkconnectivity.v1beta.HubService.ListRouteTables] +// method. +message ListRouteTablesResponse { + // The requested route tables. + repeated RouteTable route_tables = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Hubs that could not be reached. + repeated string unreachable = 3; +} + +// Request for +// [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups] +// method. +message ListGroupsRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Hub" + } + ]; + + // The maximum number of results to return per page. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [HubService.ListGroups][google.cloud.networkconnectivity.v1beta.HubService.ListGroups] +// method. +message ListGroupsResponse { + // The requested groups. + repeated Group groups = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Hubs that could not be reached. + repeated string unreachable = 3; +} + +// A collection of Cloud VPN tunnel resources. These resources should be +// redundant HA VPN tunnels that all advertise the same prefixes to Google +// Cloud. Alternatively, in a passive/active configuration, all tunnels +// should be capable of advertising the same prefixes. +message LinkedVpnTunnels { + // The URIs of linked VPN tunnel resources. + repeated string uris = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/VpnTunnel" + }]; + + // A value that controls whether site-to-site data transfer is enabled for + // these resources. Data transfer is available only in [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 2; + + // Output only. The VPC network where these VPN tunnels are located. + string vpc_network = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Hub routes fully encompassed by include import ranges are + // included during import from hub. + repeated string include_import_ranges = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A collection of VLAN attachment resources. These resources should +// be redundant attachments that all advertise the same prefixes to Google +// Cloud. Alternatively, in active/passive configurations, all attachments +// should be capable of advertising the same prefixes. +message LinkedInterconnectAttachments { + // The URIs of linked interconnect attachment resources + repeated string uris = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/InterconnectAttachment" + }]; + + // A value that controls whether site-to-site data transfer is enabled for + // these resources. Data transfer is available only in [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 2; + + // Output only. The VPC network where these VLAN attachments are located. + string vpc_network = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Hub routes fully encompassed by include import ranges are + // included during import from hub. + repeated string include_import_ranges = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A collection of router appliance instances. If you configure multiple router +// appliance instances to receive data from the same set of sites outside of +// Google Cloud, we recommend that you associate those instances with the same +// spoke. +message LinkedRouterApplianceInstances { + // The list of router appliance instances. + repeated RouterApplianceInstance instances = 1; + + // A value that controls whether site-to-site data transfer is enabled for + // these resources. Data transfer is available only in [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 2; + + // Output only. The VPC network where these router appliance instances are + // located. + string vpc_network = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. Hub routes fully encompassed by include import ranges are + // included during import from hub. + repeated string include_import_ranges = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An existing VPC network. +message LinkedVpcNetwork { + // Required. The URI of the VPC network resource. + string uri = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. IP ranges encompassing the subnets to be excluded from peering. + repeated string exclude_export_ranges = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IP ranges allowed to be included from peering. + repeated string include_export_ranges = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The proposed include export IP ranges waiting for hub + // administrator's approval. + repeated string proposed_include_export_ranges = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proposed exclude export IP ranges waiting for hub + // administrator's approval. + repeated string proposed_exclude_export_ranges = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of Producer VPC spokes that this VPC spoke is a + // service consumer VPC spoke for. These producer VPCs are connected through + // VPC peering to this spoke's backing VPC network. Because they are directly + // connected through VPC peering, NCC export filters do not apply between the + // service consumer VPC spoke and any of its producer VPC spokes. This VPC + // spoke cannot be deleted as long as any of these producer VPC spokes are + // connected to the NCC Hub. + repeated string producer_vpc_spokes = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; +} + +// A gateway that can apply specialized traffic processing. +message Gateway { + // A list of IP ranges that are reserved for this gateway's internal + // intfrastructure. + message IpRangeReservation { + // Required. A block of IP addresses used to allocate supporting + // infrastructure for this gateway. This block must not overlap with subnets + // in any spokes or peer VPC networks that the gateway can communicate with. + // Example: "10.1.2.0/24" + string ip_range = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // The aggregate processing capacity of this gateway. + enum GatewayCapacity { + // The gateway capacity is unspecified. + GATEWAY_CAPACITY_UNSPECIFIED = 0; + + // The gateway has 1 Gbps of aggregate processing capacity + CAPACITY_1_GBPS = 5; + + // The gateway has 10 Gbps of aggregate processing capacity + CAPACITY_10_GBPS = 1; + + // The gateway has 100 Gbps of aggregate processing capacity + CAPACITY_100_GBPS = 4; + } + + // Optional. A list of IP ranges that are reserved for this gateway's internal + // intfrastructure. + repeated IpRangeReservation ip_range_reservations = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The aggregate processing capacity of this gateway. + GatewayCapacity capacity = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The list of Cloud Routers that are connected to this gateway. + // Should be in the form: + // https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/routers/{router} + repeated string cloud_routers = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the connected SACAttachment. + // Should be in the form: + // projects/{project}/locations/{location}/sacAttachments/{sac_attachment} + string sac_attachment = 14 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "networksecurity.googleapis.com/SACAttachment" + } + ]; +} + +// A gateway advertised route is a route that a gateway spoke advertises +// somewhere. +message GatewayAdvertisedRoute { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/GatewayAdvertisedRoute" + pattern: "projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route}" + plural: "gatewayAdvertisedRoutes" + singular: "gatewayAdvertisedRoute" + }; + + // The recipient of an advertised route. + enum Recipient { + // No recipient specified. By default routes are advertised to the hub. + RECIPIENT_UNSPECIFIED = 0; + + // Advertises a route toward the hub. Other spokes reachable from this spoke + // will receive the route. + ADVERTISE_TO_HUB = 1; + } + + // Identifier. The name of the gateway advertised route. Route names must be + // unique and use the following form: + // `projects/{project_number}/locations/{region}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The time the gateway advertised route was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the gateway advertised route was last updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional labels in key-value pair format. For more information about + // labels, see [Requirements for + // labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + map labels = 4; + + // An optional description of the gateway advertised route. + string description = 5; + + // Output only. The Google-generated UUID for the gateway advertised route. + // This value is unique across all gateway advertised route resources. If a + // gateway advertised route is deleted and another with the same name is + // created, the new route is assigned a different `unique_id`. + string unique_id = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current lifecycle state of this gateway advertised route. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. This route's advertised IP address range. Must be a valid + // CIDR-formatted prefix. If an IP address is provided without a subnet mask, + // it is interpreted as, for IPv4, a `/32` singular IP address range, and, for + // IPv6, + // `/128`. + string ip_range = 8 [(google.api.field_behavior) = IMMUTABLE]; + + // Optional. The priority of this advertised route. You can choose a value + // from `0` to `65335`. If you don't provide a value, Google Cloud assigns a + // priority of `100` to the ranges. + optional int32 priority = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The recipient of this advertised route. + Recipient recipient = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request for +// [HubService.CreateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.CreateGatewayAdvertisedRoute]. +message CreateGatewayAdvertisedRouteRequest { + // Required. The parent resource. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Required. Unique id for the route to create. + string gateway_advertised_route_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Initial values for the new gateway advertised route. + GatewayAdvertisedRoute gateway_advertised_route = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly creating duplicate commitments. + // + // The request ID must be a valid UUID, with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request for +// [HubService.GetGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.GetGatewayAdvertisedRoute]. +message GetGatewayAdvertisedRouteRequest { + // Required. The name of the gateway advertised route to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/GatewayAdvertisedRoute" + } + ]; +} + +// The request for +// [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes]. +message ListGatewayAdvertisedRoutesRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Optional. The maximum number of results per page that should be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous + // `ListGatewayAdvertisedRoutes` call. Provide this to retrieve the subsequent + // page. + // + // When paginating, all other parameters provided to + // `ListGatewayAdvertisedRoutes` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // An expression that filters the list of results. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [HubService.ListGatewayAdvertisedRoutes][google.cloud.networkconnectivity.v1beta.HubService.ListGatewayAdvertisedRoutes] +// method. +message ListGatewayAdvertisedRoutesResponse { + // The requested gateway advertised routes. + repeated GatewayAdvertisedRoute gateway_advertised_routes = 1; + + // The token for the next page of the response. To see more results, + // use this value as the page_token for your next request. If this value + // is empty, there are no more results. + string next_page_token = 2; + + // Hubs that could not be reached. + repeated string unreachable = 3; +} + +// The request for +// [HubService.UpdateGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.UpdateGatewayAdvertisedRoute]. +message UpdateGatewayAdvertisedRouteRequest { + // Optional. In the case of an update to an existing group, field mask is used + // to specify the fields to be overwritten. The fields specified in the + // update_mask are relative to the resource, not the full request. A field is + // overwritten if it is in the mask. If the user does not provide a mask, then + // all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The gateway advertised route to update. + // + // The gateway advertised route's `name` field is used to identify the gateway + // advertised route to update. Format: + // `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}` + GatewayAdvertisedRoute gateway_advertised_route = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly creating duplicate commitments. + // + // The request ID must be a valid UUID, with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request for +// [HubService.DeleteGatewayAdvertisedRoute][google.cloud.networkconnectivity.v1beta.HubService.DeleteGatewayAdvertisedRoute] +// method. +message DeleteGatewayAdvertisedRouteRequest { + // Required. The name of the gateway advertised route to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/GatewayAdvertisedRoute" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly creating duplicate commitments. + // + // The request ID must be a valid UUID, with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +message LinkedProducerVpcNetwork { + // Immutable. The URI of the Service Consumer VPC that the Producer VPC is + // peered with. + string network = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Output only. The Service Consumer Network spoke. + string service_consumer_vpc_spoke = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + } + ]; + + // Immutable. The name of the VPC peering between the Service Consumer VPC and + // the Producer VPC (defined in the Tenant project) which is added to the NCC + // hub. This peering must be in ACTIVE state. + string peering = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The URI of the Producer VPC. + string producer_network = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. IP ranges encompassing the subnets to be excluded from peering. + repeated string exclude_export_ranges = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IP ranges allowed to be included from peering. + repeated string include_export_ranges = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The proposed include export IP ranges waiting for hub + // administrator's approval. + repeated string proposed_include_export_ranges = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The proposed exclude export IP ranges waiting for hub + // administrator's approval. + repeated string proposed_exclude_export_ranges = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A router appliance instance is a Compute Engine virtual machine (VM) instance +// that acts as a BGP speaker. A router appliance instance is specified by the +// URI of the VM and the internal IP address of one of the VM's network +// interfaces. +message RouterApplianceInstance { + // The URI of the VM. + string virtual_machine = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The IP address on the VM to use for peering. + string ip_address = 3; +} + +// Metadata about locations +message LocationMetadata { + // List of supported features + repeated LocationFeature location_features = 1; +} + +message NextHopVpcNetwork { + // The URI of the VPC network resource + string uri = 1 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; +} + +// A route next hop that leads to a VPN tunnel resource. +message NextHopVPNTunnel { + // The URI of the VPN tunnel resource. + string uri = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/VpnTunnel" + }]; + + // The VPC network where this VPN tunnel is located. + string vpc_network = 2 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Indicates whether site-to-site data transfer is allowed for this VPN tunnel + // resource. Data transfer is available only in [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 3; +} + +// A route next hop that leads to a Router appliance instance. +message NextHopRouterApplianceInstance { + // The URI of the Router appliance instance. + string uri = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/Instance" + }]; + + // The VPC network where this VM is located. + string vpc_network = 2 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Indicates whether site-to-site data transfer is allowed for this Router + // appliance instance resource. Data transfer is available only in [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 3; +} + +// A route next hop that leads to an interconnect attachment resource. +message NextHopInterconnectAttachment { + // The URI of the interconnect attachment resource. + string uri = 1 [(google.api.resource_reference) = { + type: "compute.googleapis.com/InterconnectAttachment" + }]; + + // The VPC network where this interconnect attachment is located. + string vpc_network = 2 [ + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Indicates whether site-to-site data transfer is allowed for this + // interconnect attachment resource. Data transfer is available only in + // [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + bool site_to_site_data_transfer = 3; +} + +// A route next hop that leads to a spoke resource. +message NextHopSpoke { + // The URI of the spoke resource. + string uri = 1 [(google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Spoke" + }]; + + // Indicates whether site-to-site data transfer is allowed for this + // spoke resource. Data transfer is available only in + // [supported + // locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + // Whether this route is accessible to other hybrid spokes with site-to-site + // data transfer enabled. If this is false, the route is only accessible to + // VPC spokes of the connected Hub. + bool site_to_site_data_transfer = 2; +} + +// Summarizes information about the spokes associated with a hub. +// The summary includes a count of spokes according to type +// and according to state. If any spokes are inactive, +// the summary also lists the reasons they are inactive, +// including a count for each reason. +message SpokeSummary { + // The number of spokes of a given type that are associated + // with a specific hub. The type indicates what kind of + // resource is associated with the spoke. + message SpokeTypeCount { + // Output only. The type of the spokes. + SpokeType spoke_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of spokes of this type that are + // associated with the hub. + int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The number of spokes that are in a particular state + // and associated with a given hub. + message SpokeStateCount { + // Output only. The state of the spokes. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of spokes that are in this state + // and associated with a given hub. + int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The number of spokes in the hub that are inactive for this reason. + message SpokeStateReasonCount { + // Output only. The reason that a spoke is inactive. + Spoke.StateReason.Code state_reason_code = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The total number of spokes that are inactive for a + // particular reason and associated with a given hub. + int64 count = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Counts the number of spokes of each type that are + // associated with a specific hub. + repeated SpokeTypeCount spoke_type_counts = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Counts the number of spokes that are in each state + // and associated with a given hub. + repeated SpokeStateCount spoke_state_counts = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Counts the number of spokes that are inactive for each + // possible reason and associated with a given hub. + repeated SpokeStateReasonCount spoke_state_reason_counts = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request for +// [HubService.GetGroup][google.cloud.networkconnectivity.v1beta.HubService.GetGroup]. +message GetGroupRequest { + // Required. The name of the route table resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Group" + } + ]; +} + +// Request for +// [HubService.UpdateGroup][google.cloud.networkconnectivity.v1beta.HubService.UpdateGroup] +// method. +message UpdateGroupRequest { + // Optional. In the case of an update to an existing group, field mask is used + // to specify the fields to be overwritten. The fields specified in the + // update_mask are relative to the resource, not the full request. A field is + // overwritten if it is in the mask. If the user does not provide a mask, then + // all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The state that the group should be in after the update. + Group group = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server knows to ignore the request + // if it has already been completed. The server guarantees that a request + // doesn't result in creation of duplicate commitments for at least 60 + // minutes. + // + // 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 to see whether the original operation + // was received. If it was, the server ignores the second request. This + // behavior prevents clients from mistakenly 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]; +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/policy_based_routing.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/policy_based_routing.proto new file mode 100644 index 000000000000..a1a54e068753 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/policy_based_routing.proto @@ -0,0 +1,391 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkconnectivity.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkconnectivity/v1beta/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1Beta"; +option go_package = "cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectivitypb"; +option java_multiple_files = true; +option java_outer_classname = "PolicyBasedRoutingProto"; +option java_package = "com.google.cloud.networkconnectivity.v1beta"; +option php_namespace = "Google\\Cloud\\NetworkConnectivity\\V1beta"; +option ruby_package = "Google::Cloud::NetworkConnectivity::V1beta"; + +// Policy-Based Routing allows GCP customers to specify flexibile routing +// policies for Layer 4 traffic traversing through the connected service. +service PolicyBasedRoutingService { + option (google.api.default_host) = "networkconnectivity.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists policy-based routes in a given project and location. + rpc ListPolicyBasedRoutes(ListPolicyBasedRoutesRequest) + returns (ListPolicyBasedRoutesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/global}/policyBasedRoutes" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single policy-based route. + rpc GetPolicyBasedRoute(GetPolicyBasedRouteRequest) + returns (PolicyBasedRoute) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/global/policyBasedRoutes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new policy-based route in a given project and location. + rpc CreatePolicyBasedRoute(CreatePolicyBasedRouteRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/global}/policyBasedRoutes" + body: "policy_based_route" + }; + option (google.api.method_signature) = + "parent,policy_based_route,policy_based_route_id"; + option (google.longrunning.operation_info) = { + response_type: "PolicyBasedRoute" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single policy-based route. + rpc DeletePolicyBasedRoute(DeletePolicyBasedRouteRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/global/policyBasedRoutes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Policy-based routes route L4 network traffic based on not just destination IP +// address, but also source IP address, protocol, and more. If a policy-based +// route conflicts with other types of routes, the policy-based route always +// takes precedence. +message PolicyBasedRoute { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/PolicyBasedRoute" + pattern: "projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}" + }; + + // VM instances that this policy-based route applies to. + message VirtualMachine { + // Optional. A list of VM instance tags that this policy-based route applies + // to. VM instances that have ANY of tags specified here installs this PBR. + repeated string tags = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // InterconnectAttachment that this route applies to. + message InterconnectAttachment { + // Optional. Cloud region to install this policy-based route on interconnect + // attachment. Use `all` to install it on all interconnect attachments. + string region = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Filter matches L4 traffic. + message Filter { + // The internet protocol version. + enum ProtocolVersion { + // Default value. + PROTOCOL_VERSION_UNSPECIFIED = 0; + + // The PBR is for IPv4 internet protocol traffic. + IPV4 = 1; + + // The PBR is for IPv6 internet protocol traffic. + IPV6 = 2; + } + + // Optional. The IP protocol that this policy-based route applies to. Valid + // values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + string ip_protocol = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The source IP range of outgoing packets that this policy-based + // route applies to. Default is "0.0.0.0/0" if protocol version is IPv4 and + // "::/0" if protocol version is IPv6. + string src_range = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The destination IP range of outgoing packets that this + // policy-based route applies to. Default is "0.0.0.0/0" if protocol version + // is IPv4 and "::/0" if protocol version is IPv6. + string dest_range = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Internet protocol versions this policy-based route applies to. + // IPV4 and IPV6 is supported. + ProtocolVersion protocol_version = 6 + [(google.api.field_behavior) = REQUIRED]; + } + + // Informational warning message. + message Warnings { + // Warning code for policy-based routing. Expect to add values in the + // future. + enum Code { + // Default value. + WARNING_UNSPECIFIED = 0; + + // The policy-based route is not active and functioning. Common causes are + // that the dependent network was deleted or the resource project was + // turned off. + RESOURCE_NOT_ACTIVE = 1; + + // The policy-based route is being modified (e.g. created/deleted) at this + // time. + RESOURCE_BEING_MODIFIED = 2; + } + + // Output only. A warning code, if applicable. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata about this warning in key: value format. The key + // should provides more detail on the warning being returned. For example, + // for warnings where there are no results in a list request for a + // particular zone, this key might be scope and the key value might be the + // zone name. Other examples might be a key indicating a deprecated resource + // and a suggested replacement. + map data = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A human-readable description of the warning code. + string warning_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The other routing cases. + enum OtherRoutes { + // Default value. + OTHER_ROUTES_UNSPECIFIED = 0; + + // Use the routes from the default routing tables (system-generated routes, + // custom routes, peering route) to determine the next hop. This effectively + // excludes matching packets being applied on other PBRs with a lower + // priority. + DEFAULT_ROUTING = 1; + } + + // Target specifies network endpoints that this policy-based route applies to. + // If no target is specified, the PBR will be installed on all network + // endpoints (e.g. VMs, VPNs, and Interconnects) in the VPC. + oneof target { + // Optional. VM instances that this policy-based route applies to. + VirtualMachine virtual_machine = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The interconnect attachments that this policy-based route + // applies to. + InterconnectAttachment interconnect_attachment = 9 + [(google.api.field_behavior) = OPTIONAL]; + } + + oneof next_hop { + // Optional. The IP address of a global-access-enabled L4 ILB that is the + // next hop for matching packets. For this version, only nextHopIlbIp is + // supported. + string next_hop_ilb_ip = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Other routes that will be referenced to determine the next hop + // of the packet. + OtherRoutes next_hop_other_routes = 21 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Immutable. Identifier. A unique name of the resource in the form of + // `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + string name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. Time when the policy-based route was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the policy-based route was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // User-defined labels. + map labels = 4; + + // Optional. An optional description of this resource. Provide this field when + // you create the resource. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Fully-qualified URL of the network that this route applies to, + // for example: projects/my-project/global/networks/my-network. + string network = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Required. The filter to match L4 traffic. + Filter filter = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The priority of this policy-based route. Priority is used to + // break ties in cases where there are more than one matching policy-based + // routes found. In cases where multiple policy-based routes are matched, the + // one with the lowest-numbered priority value wins. The default value is + // 1000. The priority value must be from 1 to 65535, inclusive. + int32 priority = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. If potential misconfigurations are detected for this route, + // this field will be populated with warning messages. + repeated Warnings warnings = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined fully-qualified URL for this resource. + string self_link = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of this resource. Always + // networkconnectivity#policyBasedRoute for policy-based Route resources. + string kind = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request for +// [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes] +// method. +message ListPolicyBasedRoutesRequest { + // Required. The parent resource's name. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of results per page that should be returned. + int32 page_size = 2; + + // The page token. + string page_token = 3; + + // A filter expression that filters the results listed in the response. + string filter = 4; + + // Sort the results by a certain order. + string order_by = 5; +} + +// Response for +// [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes] +// method. +message ListPolicyBasedRoutesResponse { + // Policy-based routes to be returned. + repeated PolicyBasedRoute policy_based_routes = 1; + + // The next pagination token in the List response. It should be used as + // page_token for the following request. An empty value means no more result. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request for +// [PolicyBasedRoutingService.GetPolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.GetPolicyBasedRoute] +// method. +message GetPolicyBasedRouteRequest { + // Required. Name of the PolicyBasedRoute resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/PolicyBasedRoute" + } + ]; +} + +// Request for +// [PolicyBasedRoutingService.CreatePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.CreatePolicyBasedRoute] +// method. +message CreatePolicyBasedRouteRequest { + // Required. The parent resource's name of the PolicyBasedRoute. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Unique id for the policy-based route to create. Provided by the + // client when the resource is created. The name must comply with + // https://google.aip.dev/122#resource-id-segments. Specifically, the name + // must be 1-63 characters long and match the regular expression + // [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter, + // and all following characters (except for the last character) must be a + // dash, lowercase letter, or digit. The last character must be a lowercase + // letter or digit. + string policy_based_route_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Initial values for a new policy-based route. + PolicyBasedRoute policy_based_route = 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 knows to + // ignore the request if it has already been completed. The server guarantees + // 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, ignores 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]; +} + +// Request for +// [PolicyBasedRoutingService.DeletePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.DeletePolicyBasedRoute] +// method. +message DeletePolicyBasedRouteRequest { + // Required. Name of the policy-based route resource to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/PolicyBasedRoute" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server knows to + // ignore the request if it has already been completed. The server guarantees + // 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, ignores 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]; +} diff --git a/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/transport_manager.proto b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/transport_manager.proto new file mode 100644 index 000000000000..8568b81a0ce9 --- /dev/null +++ b/java-networkconnectivity/proto-google-cloud-networkconnectivity-v1beta/src/main/proto/google/cloud/networkconnectivity/v1beta/transport_manager.proto @@ -0,0 +1,738 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkconnectivity.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkconnectivity/v1beta/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkConnectivity.V1Beta"; +option go_package = "cloud.google.com/go/networkconnectivity/apiv1beta/networkconnectivitypb;networkconnectivitypb"; +option java_multiple_files = true; +option java_outer_classname = "TransportManagerProto"; +option java_package = "com.google.cloud.networkconnectivity.v1beta"; +option php_namespace = "Google\\Cloud\\NetworkConnectivity\\V1beta"; +option ruby_package = "Google::Cloud::NetworkConnectivity::V1beta"; + +// The CLH based service for managing RemoteTransportProfiles and Transports. +service TransportManager { + option (google.api.default_host) = "networkconnectivity.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists RemoteTransportProfiles in a given project and location. + rpc ListRemoteTransportProfiles(ListRemoteTransportProfilesRequest) + returns (ListRemoteTransportProfilesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/remoteTransportProfiles" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single RemoteTransportProfile. + rpc GetRemoteTransportProfile(GetRemoteTransportProfileRequest) + returns (RemoteTransportProfile) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/remoteTransportProfiles/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Transports in a given project and location. + rpc ListTransports(ListTransportsRequest) returns (ListTransportsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/transports" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Transport. + rpc GetTransport(GetTransportRequest) returns (Transport) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/transports/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the operational status of a single Transport. + rpc GetStatus(GetStatusRequest) returns (GetStatusResponse) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/transports/*}:getStatus" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Transport in a given project and location. + rpc CreateTransport(CreateTransportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/transports" + body: "transport" + }; + option (google.api.method_signature) = "parent,transport,transport_id"; + option (google.longrunning.operation_info) = { + response_type: "Transport" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Transport. + rpc UpdateTransport(UpdateTransportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{transport.name=projects/*/locations/*/transports/*}" + body: "transport" + }; + option (google.api.method_signature) = "transport,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Transport" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Transport. + rpc DeleteTransport(DeleteTransportRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/transports/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Message describing RemoteTransportProfile object. +message RemoteTransportProfile { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/RemoteTransportProfile" + pattern: "projects/{project}/locations/{location}/remoteTransportProfiles/{remote_transport_profile}" + plural: "remoteTransportProfiles" + singular: "remoteTransportProfile" + }; + + // Bandwidth values that may be supported for a specific profile. + enum Bandwidth { + // Unspecified bandwidth. + BANDWIDTH_UNSPECIFIED = 0; + + // 50 Megabits per second. + BPS_50M = 1; + + // 100 Megabits per second. + BPS_100M = 2; + + // 200 Megabits per second. + BPS_200M = 3; + + // 300 Megabits per second. + BPS_300M = 4; + + // 400 Megabits per second. + BPS_400M = 5; + + // 500 Megabits per second. + BPS_500M = 6; + + // 1 Gigabit per second. + BPS_1G = 7; + + // 2 Gigabits per second. + BPS_2G = 8; + + // 5 Gigabits per second. + BPS_5G = 9; + + // 10 Gigabits per second. + BPS_10G = 10; + + // 20 Gigabits per second. + BPS_20G = 11; + + // 50 Gigabits per second. + BPS_50G = 12; + + // 100 Gigabits per second. + BPS_100G = 13; + } + + // Availability class options. + enum ServiceLevelAvailability { + // Unspecified service level availability. + SERVICE_LEVEL_AVAILABILITY_UNSPECIFIED = 0; + + // This represents a 99.9% service level on the availability of the + // configured connectivity. + HIGH = 1; + + // This represents a 99.99% service level on the availability of the + // configured connectivity. + MAXIMUM = 2; + } + + // Type of provisioning flows supported. + enum KeyProvisioningFlow { + // Unspecified key provisioning flow. + KEY_PROVISIONING_FLOW_UNSPECIFIED = 0; + + // The activationKey field on the Transport must be included in a create or + // patch request to establish connectivity. + INPUT_ONLY = 1; + + // The generatedActivationKey field is populated and must be read from the + // resource and passed into the other provider. + OUTPUT_ONLY = 2; + + // Both activation key fields are allowed for establishing connectivity. If + // a key is input, the generated key is still present after provisioning is + // finished. + INPUT_OR_OUTPUT = 3; + } + + // State of the RemoteTransportProfile. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Not enough capacity for customers to order. + CLOSED = 1; + + // Enough capacity to fulfill an order. + OPEN = 2; + } + + // Identifier. Name of the resource in the format of $provider-$site. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Labels as key value pairs. + map labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the profile. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the provider on the other end of this profile. E.g. + // “Amazon Web Services” or “Microsoft Azure”. + string provider = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the profile is a Cloud Service Provider with compute + // resources, this is populated with the region where connectivity is being + // established. If the profile provides facility-level selection, this is an + // identity of the facility any connections on this profile are going through. + string provider_site = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of bandwidth enum values that are supported by this + // profile. + repeated Bandwidth supported_bandwidths = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Availability class that will be configured for this + // particular RemoteTransportProfile. + ServiceLevelAvailability sla = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of provisioning flows supported by this profile. + KeyProvisioningFlow flow = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Order state for this profile. + State order_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human readable name of this profile, used to identify this + // profile in the UI. + string display_name = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting list of RemoteTransportProfiles. +message ListRemoteTransportProfilesRequest { + // Required. Parent value for ListRemoteTransportProfilesRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkconnectivity.googleapis.com/RemoteTransportProfile" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing RemoteTransportProfiles +message ListRemoteTransportProfilesResponse { + // The list of RemoteTransportProfiles. + repeated RemoteTransportProfile remote_transport_profiles = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a RemoteTransportProfile. +message GetRemoteTransportProfileRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/RemoteTransportProfile" + } + ]; +} + +// Message describing Transport object. +message Transport { + option (google.api.resource) = { + type: "networkconnectivity.googleapis.com/Transport" + pattern: "projects/{project}/locations/{location}/transports/{transport}" + plural: "transports" + singular: "transport" + }; + + // Supported bandwidth options. + enum Bandwidth { + // Unspecified bandwidth. + BANDWIDTH_UNSPECIFIED = 0; + + // 50 Megabits per second. + BPS_50M = 1; + + // 100 Megabits per second. + BPS_100M = 2; + + // 200 Megabits per second. + BPS_200M = 3; + + // 300 Megabits per second. + BPS_300M = 4; + + // 400 Megabits per second. + BPS_400M = 5; + + // 500 Megabits per second. + BPS_500M = 6; + + // 1 Gigabit per second. + BPS_1G = 7; + + // 2 Gigabits per second. + BPS_2G = 8; + + // 5 Gigabits per second. + BPS_5G = 9; + + // 10 Gigabits per second. + BPS_10G = 10; + + // 20 Gigabits per second. + BPS_20G = 11; + + // 50 Gigabits per second. + BPS_50G = 12; + + // 100 Gigabits per second. + BPS_100G = 13; + } + + // IP version stack for the established connectivity. + enum StackType { + // Unspecified stack type. + STACK_TYPE_UNSPECIFIED = 0; + + // Only IPv4 is supported. (default) + IPV4_ONLY = 1; + + // Both IPv4 and IPv6 are supported. + IPV4_IPV6 = 2; + } + + // Represents the status of the underlying connectivity. One of + // the following states, depending on who has initiated the Transport request. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The resource exists locally and is being created / associated with the + // resource on the remote provider’s end of the underlying connectivity. + CREATING = 1; + + // The Transport exists on both sides of the connection, and is waiting for + // configuration to finalize and be verified as operational. + PENDING_CONFIG = 2; + + // The Transport was created in GCP. Depending on the profile’s key + // provisioning flow, this is either waiting for an activation key to be + // input (the key will be validated that it uses remote resources that match + // the Transport), or for the generated key to be input to the provider for + // finalizing. The configured bandwidth is not yet guaranteed. + PENDING_KEY = 3; + + // The Transport is configured and the underlying connectivity is considered + // operational. + ACTIVE = 4; + + // The Transport is being deleted from GCP. The underlying connectivity is + // no longer operational. + DELETING = 5; + + // The Transport was deleted on the remote provider's end and is no longer + // operational. GCP has insufficient information to move the resource back + // to PENDING_KEY state. + DEPROVISIONED = 6; + } + + // Identifier. Name of the resource. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Create time stamp. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Update time stamp. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the Transport. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Name of the remoteTransportProfile that this Transport is + // connecting to. + string remote_profile = 7 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/RemoteTransportProfile" + } + ]; + + // Optional. Key used for establishing a connection with the remote transport. + // This key can only be provided if the profile supports an INPUT key flow and + // the resource is in the PENDING_KEY state. + string provided_activation_key = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Google-generated activation key. This is only output if the + // selected profile supports an OUTPUT key flow. Inputting this to the + // provider is only valid while the resource is in a PENDING_KEY state. Once + // the provider has accepted the key, the resource will move to the + // CONFIGURING state. + string generated_activation_key = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Bandwidth of the Transport. This must be one of the supported + // bandwidths for the remote profile, and must be set when no activation key + // is being provided. + Bandwidth bandwidth = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. IP version stack for the established connectivity. + StackType stack_type = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the underlying connectivity. + State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The maximum transmission unit (MTU) of a packet that can be + // sent over this transport. + int32 mtu_limit = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Administrative state of the underlying connectivity. If set to + // true (default), connectivity should be available between your environments. + // If set to false, the connectivity over these links is disabled. Disabling + // your Transport does not affect billing, and retains the underlying network + // bandwidth associated with the connectivity. + bool admin_enabled = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource URI of the Network that will be peered with this + // Transport. This field must be provided during resource creation and cannot + // be changed. + string network = 15 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } + ]; + + // Optional. List of IP Prefixes that will be advertised to the remote + // provider. Both IPv4 and IPv6 addresses are supported. + repeated string advertised_routes = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The user supplied account id for the CSP associated with the + // remote profile. + string remote_account_id = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. VPC Network URI that was created for the VPC Peering + // connection to the provided `network`. If VPC Peering is disconnected, this + // can be used to re-establish. + string peering_network = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for requesting list of Transports. +message ListTransportsRequest { + // Required. Parent value for ListTransportsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkconnectivity.googleapis.com/Transport" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Transports. +message ListTransportsResponse { + // The list of Transport. + repeated Transport transports = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Unordered list. Locations that could not be reached. + repeated string unreachable = 3 + [(google.api.field_behavior) = UNORDERED_LIST]; +} + +// Message for getting a Transport. +message GetTransportRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Transport" + } + ]; +} + +// Message for getting a Transport's operational status. +message GetStatusRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Transport" + } + ]; +} + +// Message for the response to getting a Transport's operational status. +message GetStatusResponse { + // The overall status of the Transport. + enum OverallStatus { + // Unspecified status. + OVERALL_STATUS_UNSPECIFIED = 0; + + // Resource is active and operational. + ACTIVE = 1; + + // Resource is waiting for an activation key to be exchanged. + PENDING_KEY = 2; + + // Activation keys have been exchanged and connectivity is being + // established. + CONFIGURING = 3; + + // VPC Peering has been taken down, or the NCC Spoke has been rejected. + DISCONNECTED = 4; + + // User configuration is correct, but the configured capacity is + // operationally down. + DOWN = 5; + } + + // The operational status of the underlying networking components. + enum OperationalStatus { + // Unspecified status. + OPERATIONAL_STATUS_UNSPECIFIED = 0; + + // Protected capacity is available and networking components show as up. + OPERATIONAL_STATUS_ACTIVE = 1; + + // Protected capacity is showing as operationally down. + OPERATIONAL_STATUS_DOWN = 2; + } + + // Current status of connectivity to the local GCP resource. This reflects + // whether the VPC Peering or NCC Hub appears correctly configured. + enum ConnectivityStatus { + // Unspecified status. + CONNECTIVITY_STATUS_UNSPECIFIED = 0; + + // VPC Peering or the NCC Hub appear to be correctly established. + CONNECTIVITY_STATUS_CONNECTED = 1; + + // VPC Peering has been taken down, or the NCC Spoke has been rejected. + CONNECTIVITY_STATUS_DISCONNECTED = 2; + } + + // Current status of MACSec on the underlying network connectivity between GC + // and the partner. + enum MacSecStatus { + // Unspecified status. + MAC_SEC_STATUS_UNSPECIFIED = 0; + + // MACSec is protecting the links and configured in fail closed. + MAC_SEC_STATUS_ACTIVE_FAIL_CLOSED = 1; + + // MACSec is protecting the links and configured to fail open on at least + // one of the redundant links. + MAC_SEC_STATUS_ACTIVE_FAIL_OPEN = 2; + + // MACSec is not configured on at least one of the underlying links. + MAC_SEC_STATUS_NOT_CONFIGURED = 3; + } + + // The overall status of the Transport. This field will always output the most + // critical status of the Transport. For example, if the connectivity is + // DISCONNECTED, and the underlying networking components are DOWN, then + // the overall status will be DOWN. + OverallStatus overall_status = 1; + + // The operational status of the underlying networking components. + OperationalStatus operational_status = 2; + + // Current status of connectivity to the local GCP resource. This reflects + // whether the VPC Peering or NCC Hub appears correctly configured. + ConnectivityStatus connectivity_status = 3; + + // Current status of MACSec on the underlying network connectivity between GC + // and the partner. + MacSecStatus mac_sec_status = 4; +} + +// Message for creating a Transport +message CreateTransportRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkconnectivity.googleapis.com/Transport" + } + ]; + + // Required. Id of the requesting object + string transport_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Transport transport = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a Transport. +message UpdateTransportRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Transport 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 present in the request will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated. + Transport transport = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Transport. +message DeleteTransportRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkconnectivity.googleapis.com/Transport" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetCredentialsProvider.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c522b50ae239 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + DataTransferServiceSettings dataTransferServiceSettings = + DataTransferServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DataTransferServiceClient dataTransferServiceClient = + DataTransferServiceClient.create(dataTransferServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_Create_SetCredentialsProvider_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetEndpoint.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..d8dd89e44f88 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_Create_SetEndpoint_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + DataTransferServiceSettings dataTransferServiceSettings = + DataTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DataTransferServiceClient dataTransferServiceClient = + DataTransferServiceClient.create(dataTransferServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_Create_SetEndpoint_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestination.java new file mode 100644 index 000000000000..b9e4647dcfcf --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestination.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.longrunning.Operation; + +public class AsyncCreateDestination { + + public static void main(String[] args) throws Exception { + asyncCreateDestination(); + } + + public static void asyncCreateDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateDestinationRequest request = + CreateDestinationRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setDestinationId("destinationId306545097") + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataTransferServiceClient.createDestinationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestinationLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestinationLRO.java new file mode 100644 index 000000000000..f6be4319c3a9 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/AsyncCreateDestinationLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; + +public class AsyncCreateDestinationLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDestinationLRO(); + } + + public static void asyncCreateDestinationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateDestinationRequest request = + CreateDestinationRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setDestinationId("destinationId306545097") + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataTransferServiceClient.createDestinationOperationCallable().futureCall(request); + // Do something. + Destination response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestination.java new file mode 100644 index 000000000000..ffa5499e982a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestination.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncCreateDestination { + + public static void main(String[] args) throws Exception { + syncCreateDestination(); + } + + public static void syncCreateDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateDestinationRequest request = + CreateDestinationRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setDestinationId("destinationId306545097") + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Destination response = dataTransferServiceClient.createDestinationAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationMulticlouddatatransferconfignameDestinationString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationMulticlouddatatransferconfignameDestinationString.java new file mode 100644 index 000000000000..79b76476fbc0 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationMulticlouddatatransferconfignameDestinationString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_MulticlouddatatransferconfignameDestinationString_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncCreateDestinationMulticlouddatatransferconfignameDestinationString { + + public static void main(String[] args) throws Exception { + syncCreateDestinationMulticlouddatatransferconfignameDestinationString(); + } + + public static void syncCreateDestinationMulticlouddatatransferconfignameDestinationString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + Destination response = + dataTransferServiceClient + .createDestinationAsync(parent, destination, destinationId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_MulticlouddatatransferconfignameDestinationString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationStringDestinationString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationStringDestinationString.java new file mode 100644 index 000000000000..c67efd3450b8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createdestination/SyncCreateDestinationStringDestinationString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_StringDestinationString_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncCreateDestinationStringDestinationString { + + public static void main(String[] args) throws Exception { + syncCreateDestinationStringDestinationString(); + } + + public static void syncCreateDestinationStringDestinationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString(); + Destination destination = Destination.newBuilder().build(); + String destinationId = "destinationId306545097"; + Destination response = + dataTransferServiceClient + .createDestinationAsync(parent, destination, destinationId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateDestination_StringDestinationString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..f0fb0bc09834 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfig.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.longrunning.Operation; + +public class AsyncCreateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + asyncCreateMulticloudDataTransferConfig(); + } + + public static void asyncCreateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateMulticloudDataTransferConfigRequest request = + CreateMulticloudDataTransferConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178") + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataTransferServiceClient + .createMulticloudDataTransferConfigCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfigLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfigLRO.java new file mode 100644 index 000000000000..5b3a86e82681 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/AsyncCreateMulticloudDataTransferConfigLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; + +public class AsyncCreateMulticloudDataTransferConfigLRO { + + public static void main(String[] args) throws Exception { + asyncCreateMulticloudDataTransferConfigLRO(); + } + + public static void asyncCreateMulticloudDataTransferConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateMulticloudDataTransferConfigRequest request = + CreateMulticloudDataTransferConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178") + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataTransferServiceClient + .createMulticloudDataTransferConfigOperationCallable() + .futureCall(request); + // Do something. + MulticloudDataTransferConfig response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..5a405d99bd1a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncCreateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncCreateMulticloudDataTransferConfig(); + } + + public static void syncCreateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + CreateMulticloudDataTransferConfigRequest request = + CreateMulticloudDataTransferConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178") + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + MulticloudDataTransferConfig response = + dataTransferServiceClient.createMulticloudDataTransferConfigAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString.java new file mode 100644 index 000000000000..f0c4b443c9fe --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_LocationnameMulticlouddatatransferconfigString_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString { + + public static void main(String[] args) throws Exception { + syncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString(); + } + + public static void + syncCreateMulticloudDataTransferConfigLocationnameMulticlouddatatransferconfigString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + MulticloudDataTransferConfig response = + dataTransferServiceClient + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_LocationnameMulticlouddatatransferconfigString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString.java new file mode 100644 index 000000000000..2203b28123ea --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_StringMulticlouddatatransferconfigString_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString { + + public static void main(String[] args) throws Exception { + syncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString(); + } + + public static void + syncCreateMulticloudDataTransferConfigStringMulticlouddatatransferconfigString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178"; + MulticloudDataTransferConfig response = + dataTransferServiceClient + .createMulticloudDataTransferConfigAsync( + parent, multicloudDataTransferConfig, multicloudDataTransferConfigId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_CreateMulticloudDataTransferConfig_StringMulticlouddatatransferconfigString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestination.java new file mode 100644 index 000000000000..35326fd2c679 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestination.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.longrunning.Operation; + +public class AsyncDeleteDestination { + + public static void main(String[] args) throws Exception { + asyncDeleteDestination(); + } + + public static void asyncDeleteDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteDestinationRequest request = + DeleteDestinationRequest.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + ApiFuture future = + dataTransferServiceClient.deleteDestinationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestinationLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestinationLRO.java new file mode 100644 index 000000000000..a52a4b7271e5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/AsyncDeleteDestinationLRO.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteDestinationLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDestinationLRO(); + } + + public static void asyncDeleteDestinationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteDestinationRequest request = + DeleteDestinationRequest.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + OperationFuture future = + dataTransferServiceClient.deleteDestinationOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestination.java new file mode 100644 index 000000000000..599e42670e68 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestination.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteDestinationRequest; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.protobuf.Empty; + +public class SyncDeleteDestination { + + public static void main(String[] args) throws Exception { + syncDeleteDestination(); + } + + public static void syncDeleteDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteDestinationRequest request = + DeleteDestinationRequest.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + dataTransferServiceClient.deleteDestinationAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationDestinationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationDestinationname.java new file mode 100644 index 000000000000..aa76f8bd7d45 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationDestinationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_Destinationname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.protobuf.Empty; + +public class SyncDeleteDestinationDestinationname { + + public static void main(String[] args) throws Exception { + syncDeleteDestinationDestinationname(); + } + + public static void syncDeleteDestinationDestinationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + dataTransferServiceClient.deleteDestinationAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_Destinationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationString.java new file mode 100644 index 000000000000..81f82e22544e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletedestination/SyncDeleteDestinationString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.protobuf.Empty; + +public class SyncDeleteDestinationString { + + public static void main(String[] args) throws Exception { + syncDeleteDestinationString(); + } + + public static void syncDeleteDestinationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]") + .toString(); + dataTransferServiceClient.deleteDestinationAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteDestination_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..163e7e040e61 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfig.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.longrunning.Operation; + +public class AsyncDeleteMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + asyncDeleteMulticloudDataTransferConfig(); + } + + public static void asyncDeleteMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteMulticloudDataTransferConfigRequest request = + DeleteMulticloudDataTransferConfigRequest.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + ApiFuture future = + dataTransferServiceClient + .deleteMulticloudDataTransferConfigCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfigLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfigLRO.java new file mode 100644 index 000000000000..5088d00dcc1b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/AsyncDeleteMulticloudDataTransferConfigLRO.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteMulticloudDataTransferConfigLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteMulticloudDataTransferConfigLRO(); + } + + public static void asyncDeleteMulticloudDataTransferConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteMulticloudDataTransferConfigRequest request = + DeleteMulticloudDataTransferConfigRequest.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + OperationFuture future = + dataTransferServiceClient + .deleteMulticloudDataTransferConfigOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..306102952401 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfig.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.DeleteMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncDeleteMulticloudDataTransferConfig(); + } + + public static void syncDeleteMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteMulticloudDataTransferConfigRequest request = + DeleteMulticloudDataTransferConfigRequest.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setRequestId("requestId693933066") + .setEtag("etag3123477") + .build(); + dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname.java new file mode 100644 index 000000000000..2ba59638aae7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_Multiclouddatatransferconfigname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname { + + public static void main(String[] args) throws Exception { + syncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname(); + } + + public static void syncDeleteMulticloudDataTransferConfigMulticlouddatatransferconfigname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_Multiclouddatatransferconfigname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigString.java new file mode 100644 index 000000000000..1c07ab062883 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/deletemulticlouddatatransferconfig/SyncDeleteMulticloudDataTransferConfigString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.protobuf.Empty; + +public class SyncDeleteMulticloudDataTransferConfigString { + + public static void main(String[] args) throws Exception { + syncDeleteMulticloudDataTransferConfigString(); + } + + public static void syncDeleteMulticloudDataTransferConfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString(); + dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_DeleteMulticloudDataTransferConfig_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/AsyncGetDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/AsyncGetDestination.java new file mode 100644 index 000000000000..aa7673c7ac5c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/AsyncGetDestination.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetDestination_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest; + +public class AsyncGetDestination { + + public static void main(String[] args) throws Exception { + asyncGetDestination(); + } + + public static void asyncGetDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetDestinationRequest request = + GetDestinationRequest.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .build(); + ApiFuture future = + dataTransferServiceClient.getDestinationCallable().futureCall(request); + // Do something. + Destination response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetDestination_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestination.java new file mode 100644 index 000000000000..9872b46ac446 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestination.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetDestination_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; +import com.google.cloud.networkconnectivity.v1beta.GetDestinationRequest; + +public class SyncGetDestination { + + public static void main(String[] args) throws Exception { + syncGetDestination(); + } + + public static void syncGetDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetDestinationRequest request = + GetDestinationRequest.newBuilder() + .setName( + DestinationName.of( + "[PROJECT]", + "[LOCATION]", + "[MULTICLOUD_DATA_TRANSFER_CONFIG]", + "[DESTINATION]") + .toString()) + .build(); + Destination response = dataTransferServiceClient.getDestination(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetDestination_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationDestinationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationDestinationname.java new file mode 100644 index 000000000000..22ba6ec5b1a2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationDestinationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetDestination_Destinationname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; + +public class SyncGetDestinationDestinationname { + + public static void main(String[] args) throws Exception { + syncGetDestinationDestinationname(); + } + + public static void syncGetDestinationDestinationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DestinationName name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]"); + Destination response = dataTransferServiceClient.getDestination(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetDestination_Destinationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationString.java new file mode 100644 index 000000000000..9e237ef80bf7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getdestination/SyncGetDestinationString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetDestination_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.DestinationName; + +public class SyncGetDestinationString { + + public static void main(String[] args) throws Exception { + syncGetDestinationString(); + } + + public static void syncGetDestinationString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String name = + DestinationName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]") + .toString(); + Destination response = dataTransferServiceClient.getDestination(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetDestination_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..2531881faeff --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + dataTransferServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..70c36cbba469 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = dataTransferServiceClient.getIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..623c1f12d9c6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; + +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataTransferServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetLocation_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..d39aca345824 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; + +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataTransferServiceClient.getLocation(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetLocation_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/AsyncGetMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/AsyncGetMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..cf115cf30100 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/AsyncGetMulticloudDataTransferConfig.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class AsyncGetMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + asyncGetMulticloudDataTransferConfig(); + } + + public static void asyncGetMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetMulticloudDataTransferConfigRequest request = + GetMulticloudDataTransferConfigRequest.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .build(); + ApiFuture future = + dataTransferServiceClient.getMulticloudDataTransferConfigCallable().futureCall(request); + // Do something. + MulticloudDataTransferConfig response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..f7adab4f7599 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferConfigRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncGetMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferConfig(); + } + + public static void syncGetMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetMulticloudDataTransferConfigRequest request = + GetMulticloudDataTransferConfigRequest.newBuilder() + .setName( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .build(); + MulticloudDataTransferConfig response = + dataTransferServiceClient.getMulticloudDataTransferConfig(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname.java new file mode 100644 index 000000000000..ef0e29ce7b07 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_Multiclouddatatransferconfigname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname(); + } + + public static void syncGetMulticloudDataTransferConfigMulticlouddatatransferconfigname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferConfigName name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + MulticloudDataTransferConfig response = + dataTransferServiceClient.getMulticloudDataTransferConfig(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_Multiclouddatatransferconfigname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigString.java new file mode 100644 index 000000000000..4e683bfc4404 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfigString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncGetMulticloudDataTransferConfigString { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferConfigString(); + } + + public static void syncGetMulticloudDataTransferConfigString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String name = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString(); + MulticloudDataTransferConfig response = + dataTransferServiceClient.getMulticloudDataTransferConfig(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferConfig_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/AsyncGetMulticloudDataTransferSupportedService.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/AsyncGetMulticloudDataTransferSupportedService.java new file mode 100644 index 000000000000..8361e29c0b12 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/AsyncGetMulticloudDataTransferSupportedService.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceName; + +public class AsyncGetMulticloudDataTransferSupportedService { + + public static void main(String[] args) throws Exception { + asyncGetMulticloudDataTransferSupportedService(); + } + + public static void asyncGetMulticloudDataTransferSupportedService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetMulticloudDataTransferSupportedServiceRequest request = + GetMulticloudDataTransferSupportedServiceRequest.newBuilder() + .setName( + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]") + .toString()) + .build(); + ApiFuture future = + dataTransferServiceClient + .getMulticloudDataTransferSupportedServiceCallable() + .futureCall(request); + // Do something. + MulticloudDataTransferSupportedService response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedService.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedService.java new file mode 100644 index 000000000000..119e2d079117 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedService.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GetMulticloudDataTransferSupportedServiceRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceName; + +public class SyncGetMulticloudDataTransferSupportedService { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferSupportedService(); + } + + public static void syncGetMulticloudDataTransferSupportedService() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + GetMulticloudDataTransferSupportedServiceRequest request = + GetMulticloudDataTransferSupportedServiceRequest.newBuilder() + .setName( + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]") + .toString()) + .build(); + MulticloudDataTransferSupportedService response = + dataTransferServiceClient.getMulticloudDataTransferSupportedService(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename.java new file mode 100644 index 000000000000..8165d7dd720e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_Multiclouddatatransfersupportedservicename_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceName; + +public +class SyncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename(); + } + + public static void + syncGetMulticloudDataTransferSupportedServiceMulticlouddatatransfersupportedservicename() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferSupportedServiceName name = + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]"); + MulticloudDataTransferSupportedService response = + dataTransferServiceClient.getMulticloudDataTransferSupportedService(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_Multiclouddatatransfersupportedservicename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceString.java new file mode 100644 index 000000000000..b9b3c0ece55c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/getmulticlouddatatransfersupportedservice/SyncGetMulticloudDataTransferSupportedServiceString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedServiceName; + +public class SyncGetMulticloudDataTransferSupportedServiceString { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferSupportedServiceString(); + } + + public static void syncGetMulticloudDataTransferSupportedServiceString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String name = + MulticloudDataTransferSupportedServiceName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]") + .toString(); + MulticloudDataTransferSupportedService response = + dataTransferServiceClient.getMulticloudDataTransferSupportedService(name); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_GetMulticloudDataTransferSupportedService_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinations.java new file mode 100644 index 000000000000..0c6ab09ede02 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinations.java @@ -0,0 +1,60 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class AsyncListDestinations { + + public static void main(String[] args) throws Exception { + asyncListDestinations(); + } + + public static void asyncListDestinations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListDestinationsRequest request = + ListDestinationsRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + dataTransferServiceClient.listDestinationsPagedCallable().futureCall(request); + // Do something. + for (Destination element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinationsPaged.java new file mode 100644 index 000000000000..10d2d0b5eda3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/AsyncListDestinationsPaged.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsResponse; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; +import com.google.common.base.Strings; + +public class AsyncListDestinationsPaged { + + public static void main(String[] args) throws Exception { + asyncListDestinationsPaged(); + } + + public static void asyncListDestinationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListDestinationsRequest request = + ListDestinationsRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ListDestinationsResponse response = + dataTransferServiceClient.listDestinationsCallable().call(request); + for (Destination element : response.getDestinationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinations.java new file mode 100644 index 000000000000..872e92719657 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinations.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.ListDestinationsRequest; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncListDestinations { + + public static void main(String[] args) throws Exception { + syncListDestinations(); + } + + public static void syncListDestinations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListDestinationsRequest request = + ListDestinationsRequest.newBuilder() + .setParent( + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + for (Destination element : dataTransferServiceClient.listDestinations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsMulticlouddatatransferconfigname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsMulticlouddatatransferconfigname.java new file mode 100644 index 000000000000..8dde6f6cf9d3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsMulticlouddatatransferconfigname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_Multiclouddatatransferconfigname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncListDestinationsMulticlouddatatransferconfigname { + + public static void main(String[] args) throws Exception { + syncListDestinationsMulticlouddatatransferconfigname(); + } + + public static void syncListDestinationsMulticlouddatatransferconfigname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferConfigName parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]"); + for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_Multiclouddatatransferconfigname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsString.java new file mode 100644 index 000000000000..9ac9974a3753 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listdestinations/SyncListDestinationsString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfigName; + +public class SyncListDestinationsString { + + public static void main(String[] args) throws Exception { + syncListDestinationsString(); + } + + public static void syncListDestinationsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String parent = + MulticloudDataTransferConfigName.of( + "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]") + .toString(); + for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListDestinations_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..d3d87a986d24 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; + +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataTransferServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListLocations_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..109dfb5c1326 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataTransferServiceClient.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 networkconnectivity_v1beta_generated_DataTransferService_ListLocations_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..c128b79e4805 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; + +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataTransferServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListLocations_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigs.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigs.java new file mode 100644 index 000000000000..fb402c71956a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigs.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class AsyncListMulticloudDataTransferConfigs { + + public static void main(String[] args) throws Exception { + asyncListMulticloudDataTransferConfigs(); + } + + public static void asyncListMulticloudDataTransferConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferConfigsRequest request = + ListMulticloudDataTransferConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + dataTransferServiceClient + .listMulticloudDataTransferConfigsPagedCallable() + .futureCall(request); + // Do something. + for (MulticloudDataTransferConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigsPaged.java new file mode 100644 index 000000000000..c51c96f99afa --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/AsyncListMulticloudDataTransferConfigsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.common.base.Strings; + +public class AsyncListMulticloudDataTransferConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListMulticloudDataTransferConfigsPaged(); + } + + public static void asyncListMulticloudDataTransferConfigsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferConfigsRequest request = + ListMulticloudDataTransferConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ListMulticloudDataTransferConfigsResponse response = + dataTransferServiceClient.listMulticloudDataTransferConfigsCallable().call(request); + for (MulticloudDataTransferConfig element : + response.getMulticloudDataTransferConfigsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigs.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigs.java new file mode 100644 index 000000000000..287689a2ef85 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigs.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferConfigsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncListMulticloudDataTransferConfigs { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferConfigs(); + } + + public static void syncListMulticloudDataTransferConfigs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferConfigsRequest request = + ListMulticloudDataTransferConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setReturnPartialSuccess(true) + .build(); + for (MulticloudDataTransferConfig element : + dataTransferServiceClient.listMulticloudDataTransferConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsLocationname.java new file mode 100644 index 000000000000..f73bc5b8b421 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncListMulticloudDataTransferConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferConfigsLocationname(); + } + + public static void syncListMulticloudDataTransferConfigsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (MulticloudDataTransferConfig element : + dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsString.java new file mode 100644 index 000000000000..246ab9cd6335 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransferconfigs/SyncListMulticloudDataTransferConfigsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; + +public class SyncListMulticloudDataTransferConfigsString { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferConfigsString(); + } + + public static void syncListMulticloudDataTransferConfigsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (MulticloudDataTransferConfig element : + dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferConfigs_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServices.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServices.java new file mode 100644 index 000000000000..f78381eaada6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServices.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; + +public class AsyncListMulticloudDataTransferSupportedServices { + + public static void main(String[] args) throws Exception { + asyncListMulticloudDataTransferSupportedServices(); + } + + public static void asyncListMulticloudDataTransferSupportedServices() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferSupportedServicesRequest request = + ListMulticloudDataTransferSupportedServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataTransferServiceClient + .listMulticloudDataTransferSupportedServicesPagedCallable() + .futureCall(request); + // Do something. + for (MulticloudDataTransferSupportedService element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServicesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServicesPaged.java new file mode 100644 index 000000000000..b50381fe6a28 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/AsyncListMulticloudDataTransferSupportedServicesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; +import com.google.common.base.Strings; + +public class AsyncListMulticloudDataTransferSupportedServicesPaged { + + public static void main(String[] args) throws Exception { + asyncListMulticloudDataTransferSupportedServicesPaged(); + } + + public static void asyncListMulticloudDataTransferSupportedServicesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferSupportedServicesRequest request = + ListMulticloudDataTransferSupportedServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListMulticloudDataTransferSupportedServicesResponse response = + dataTransferServiceClient + .listMulticloudDataTransferSupportedServicesCallable() + .call(request); + for (MulticloudDataTransferSupportedService element : + response.getMulticloudDataTransferSupportedServicesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServices.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServices.java new file mode 100644 index 000000000000..2f0801e728e8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServices.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListMulticloudDataTransferSupportedServicesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; + +public class SyncListMulticloudDataTransferSupportedServices { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferSupportedServices(); + } + + public static void syncListMulticloudDataTransferSupportedServices() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ListMulticloudDataTransferSupportedServicesRequest request = + ListMulticloudDataTransferSupportedServicesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (MulticloudDataTransferSupportedService element : + dataTransferServiceClient + .listMulticloudDataTransferSupportedServices(request) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesLocationname.java new file mode 100644 index 000000000000..8bf6f55bc771 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesLocationname.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; + +public class SyncListMulticloudDataTransferSupportedServicesLocationname { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferSupportedServicesLocationname(); + } + + public static void syncListMulticloudDataTransferSupportedServicesLocationname() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (MulticloudDataTransferSupportedService element : + dataTransferServiceClient + .listMulticloudDataTransferSupportedServices(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesString.java new file mode 100644 index 000000000000..eb870177af3f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/listmulticlouddatatransfersupportedservices/SyncListMulticloudDataTransferSupportedServicesString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_String_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferSupportedService; + +public class SyncListMulticloudDataTransferSupportedServicesString { + + public static void main(String[] args) throws Exception { + syncListMulticloudDataTransferSupportedServicesString(); + } + + public static void syncListMulticloudDataTransferSupportedServicesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (MulticloudDataTransferSupportedService element : + dataTransferServiceClient + .listMulticloudDataTransferSupportedServices(parent) + .iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_ListMulticloudDataTransferSupportedServices_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..51f670526f7a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + dataTransferServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_SetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..71e72a5e7830 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_SetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = dataTransferServiceClient.setIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_SetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..f20388715473 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + dataTransferServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_TestIamPermissions_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..0a3bb60292ad --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_TestIamPermissions_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = dataTransferServiceClient.testIamPermissions(request); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_TestIamPermissions_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestination.java new file mode 100644 index 000000000000..1e2e741aa431 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestination.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDestination { + + public static void main(String[] args) throws Exception { + asyncUpdateDestination(); + } + + public static void asyncUpdateDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateDestinationRequest request = + UpdateDestinationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataTransferServiceClient.updateDestinationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestinationLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestinationLRO.java new file mode 100644 index 000000000000..db98151d8b11 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/AsyncUpdateDestinationLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDestinationLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDestinationLRO(); + } + + public static void asyncUpdateDestinationLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateDestinationRequest request = + UpdateDestinationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataTransferServiceClient.updateDestinationOperationCallable().futureCall(request); + // Do something. + Destination response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestination.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestination.java new file mode 100644 index 000000000000..0a97854120c4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestination.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.cloud.networkconnectivity.v1beta.UpdateDestinationRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDestination { + + public static void main(String[] args) throws Exception { + syncUpdateDestination(); + } + + public static void syncUpdateDestination() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateDestinationRequest request = + UpdateDestinationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDestination(Destination.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Destination response = dataTransferServiceClient.updateDestinationAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestinationDestinationFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestinationDestinationFieldmask.java new file mode 100644 index 000000000000..957605553ab9 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatedestination/SyncUpdateDestinationDestinationFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_DestinationFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Destination; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDestinationDestinationFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDestinationDestinationFieldmask(); + } + + public static void syncUpdateDestinationDestinationFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + Destination destination = Destination.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Destination response = + dataTransferServiceClient.updateDestinationAsync(destination, updateMask).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateDestination_DestinationFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..7b42bb40175c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfig.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateMulticloudDataTransferConfig(); + } + + public static void asyncUpdateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateMulticloudDataTransferConfigRequest request = + UpdateMulticloudDataTransferConfigRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + dataTransferServiceClient + .updateMulticloudDataTransferConfigCallable() + .futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfigLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfigLRO.java new file mode 100644 index 000000000000..56dd0c03d221 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/AsyncUpdateMulticloudDataTransferConfigLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateMulticloudDataTransferConfigLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateMulticloudDataTransferConfigLRO(); + } + + public static void asyncUpdateMulticloudDataTransferConfigLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateMulticloudDataTransferConfigRequest request = + UpdateMulticloudDataTransferConfigRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + dataTransferServiceClient + .updateMulticloudDataTransferConfigOperationCallable() + .futureCall(request); + // Do something. + MulticloudDataTransferConfig response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..95f5311bdc6a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfig.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.cloud.networkconnectivity.v1beta.UpdateMulticloudDataTransferConfigRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncUpdateMulticloudDataTransferConfig(); + } + + public static void syncUpdateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateMulticloudDataTransferConfigRequest request = + UpdateMulticloudDataTransferConfigRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + MulticloudDataTransferConfig response = + dataTransferServiceClient.updateMulticloudDataTransferConfigAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask.java new file mode 100644 index 000000000000..0e1db7744132 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservice/updatemulticlouddatatransferconfig/SyncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_MulticlouddatatransferconfigFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceClient; +import com.google.cloud.networkconnectivity.v1beta.MulticloudDataTransferConfig; +import com.google.protobuf.FieldMask; + +public class SyncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask(); + } + + public static void syncUpdateMulticloudDataTransferConfigMulticlouddatatransferconfigFieldmask() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + MulticloudDataTransferConfig multicloudDataTransferConfig = + MulticloudDataTransferConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + MulticloudDataTransferConfig response = + dataTransferServiceClient + .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, updateMask) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_DataTransferService_UpdateMulticloudDataTransferConfig_MulticlouddatatransferconfigFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..d4c5b9075119 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferServiceSettings_CreateMulticloudDataTransferConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceSettings; +import java.time.Duration; + +public class SyncCreateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncCreateMulticloudDataTransferConfig(); + } + + public static void syncCreateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder = + DataTransferServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataTransferServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferServiceSettings_CreateMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..07b4a66072cb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/datatransferservicesettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferServiceSettings_GetMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.DataTransferServiceSettings; +import java.time.Duration; + +public class SyncGetMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferConfig(); + } + + public static void syncGetMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder = + DataTransferServiceSettings.newBuilder(); + dataTransferServiceSettingsBuilder + .getMulticloudDataTransferConfigSettings() + .setRetrySettings( + dataTransferServiceSettingsBuilder + .getMulticloudDataTransferConfigSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataTransferServiceSettings dataTransferServiceSettings = + dataTransferServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferServiceSettings_GetMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java new file mode 100644 index 000000000000..5967da0615d8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpoke.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncAcceptHubSpoke { + + public static void main(String[] args) throws Exception { + asyncAcceptHubSpoke(); + } + + public static void asyncAcceptHubSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.acceptHubSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java new file mode 100644 index 000000000000..be1fc9b94a24 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/AsyncAcceptHubSpokeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncAcceptHubSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncAcceptHubSpokeLRO(); + } + + public static void asyncAcceptHubSpokeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.acceptHubSpokeOperationCallable().futureCall(request); + // Do something. + AcceptHubSpokeResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpoke.java new file mode 100644 index 000000000000..97092ff26845 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpoke.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptHubSpoke { + + public static void main(String[] args) throws Exception { + syncAcceptHubSpoke(); + } + + public static void syncAcceptHubSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptHubSpokeRequest request = + AcceptHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java new file mode 100644 index 000000000000..8e5793e262f1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameSpokename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_HubnameSpokename_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptHubSpokeHubnameSpokename { + + public static void main(String[] args) throws Exception { + syncAcceptHubSpokeHubnameSpokename(); + } + + public static void syncAcceptHubSpokeHubnameSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_HubnameSpokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java new file mode 100644 index 000000000000..ef28a285cacd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeHubnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_HubnameString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptHubSpokeHubnameString { + + public static void main(String[] args) throws Exception { + syncAcceptHubSpokeHubnameString(); + } + + public static void syncAcceptHubSpokeHubnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_HubnameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java new file mode 100644 index 000000000000..1ebfff258463 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringSpokename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_StringSpokename_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptHubSpokeStringSpokename { + + public static void main(String[] args) throws Exception { + syncAcceptHubSpokeStringSpokename(); + } + + public static void syncAcceptHubSpokeStringSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_StringSpokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java new file mode 100644 index 000000000000..1bfe88167dbf --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/accepthubspoke/SyncAcceptHubSpokeStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_StringString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptHubSpokeStringString { + + public static void main(String[] args) throws Exception { + syncAcceptHubSpokeStringString(); + } + + public static void syncAcceptHubSpokeStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptHubSpoke_StringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdate.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdate.java new file mode 100644 index 000000000000..cb4cb34515b5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdate.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncAcceptSpokeUpdate { + + public static void main(String[] args) throws Exception { + asyncAcceptSpokeUpdate(); + } + + public static void asyncAcceptSpokeUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + hubServiceClient.acceptSpokeUpdateCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdateLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdateLRO.java new file mode 100644 index 000000000000..1f92448ca2e6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/AsyncAcceptSpokeUpdateLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncAcceptSpokeUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncAcceptSpokeUpdateLRO(); + } + + public static void asyncAcceptSpokeUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.acceptSpokeUpdateOperationCallable().futureCall(request); + // Do something. + AcceptSpokeUpdateResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdate.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdate.java new file mode 100644 index 000000000000..685b618df9ff --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdate.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptSpokeUpdate { + + public static void main(String[] args) throws Exception { + syncAcceptSpokeUpdate(); + } + + public static void syncAcceptSpokeUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + AcceptSpokeUpdateRequest request = + AcceptSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setRequestId("requestId693933066") + .build(); + AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameSpokenameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameSpokenameString.java new file mode 100644 index 000000000000..8fa4ff212ddd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameSpokenameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_HubnameSpokenameString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptSpokeUpdateHubnameSpokenameString { + + public static void main(String[] args) throws Exception { + syncAcceptSpokeUpdateHubnameSpokenameString(); + } + + public static void syncAcceptSpokeUpdateHubnameSpokenameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + AcceptSpokeUpdateResponse response = + hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_HubnameSpokenameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameStringString.java new file mode 100644 index 000000000000..0f3193b174af --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateHubnameStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_HubnameStringString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptSpokeUpdateHubnameStringString { + + public static void main(String[] args) throws Exception { + syncAcceptSpokeUpdateHubnameStringString(); + } + + public static void syncAcceptSpokeUpdateHubnameStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + String spokeEtag = "spokeEtag-1185145407"; + AcceptSpokeUpdateResponse response = + hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_HubnameStringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringSpokenameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringSpokenameString.java new file mode 100644 index 000000000000..1832a236b674 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringSpokenameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_StringSpokenameString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptSpokeUpdateStringSpokenameString { + + public static void main(String[] args) throws Exception { + syncAcceptSpokeUpdateStringSpokenameString(); + } + + public static void syncAcceptSpokeUpdateStringSpokenameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + AcceptSpokeUpdateResponse response = + hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_StringSpokenameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringStringString.java new file mode 100644 index 000000000000..55fbca336d96 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/acceptspokeupdate/SyncAcceptSpokeUpdateStringStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_StringStringString_sync] +import com.google.cloud.networkconnectivity.v1beta.AcceptSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncAcceptSpokeUpdateStringStringString { + + public static void main(String[] args) throws Exception { + syncAcceptSpokeUpdateStringStringString(); + } + + public static void syncAcceptSpokeUpdateStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + String spokeEtag = "spokeEtag-1185145407"; + AcceptSpokeUpdateResponse response = + hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_AcceptSpokeUpdate_StringStringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetCredentialsProvider.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..32a970ab84ea --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_HubService_Create_SetCredentialsProvider_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetEndpoint.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..19a6c55d1ab9 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_Create_SetEndpoint_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + HubServiceSettings hubServiceSettings = + HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_HubService_Create_SetEndpoint_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..81fad57e94b2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRoute.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncCreateGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + asyncCreateGatewayAdvertisedRoute(); + } + + public static void asyncCreateGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateGatewayAdvertisedRouteRequest request = + CreateGatewayAdvertisedRouteRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339") + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + hubServiceClient.createGatewayAdvertisedRouteCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRouteLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRouteLRO.java new file mode 100644 index 000000000000..f8348ef00842 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/AsyncCreateGatewayAdvertisedRouteLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncCreateGatewayAdvertisedRouteLRO { + + public static void main(String[] args) throws Exception { + asyncCreateGatewayAdvertisedRouteLRO(); + } + + public static void asyncCreateGatewayAdvertisedRouteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateGatewayAdvertisedRouteRequest request = + CreateGatewayAdvertisedRouteRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339") + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createGatewayAdvertisedRouteOperationCallable().futureCall(request); + // Do something. + GatewayAdvertisedRoute response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..101db080e17e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRoute.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncCreateGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + syncCreateGatewayAdvertisedRoute(); + } + + public static void syncCreateGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateGatewayAdvertisedRouteRequest request = + CreateGatewayAdvertisedRouteRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339") + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + GatewayAdvertisedRoute response = + hubServiceClient.createGatewayAdvertisedRouteAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString.java new file mode 100644 index 000000000000..ac1bd74cf0ec --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_SpokenameGatewayadvertisedrouteString_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString { + + public static void main(String[] args) throws Exception { + syncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString(); + } + + public static void syncCreateGatewayAdvertisedRouteSpokenameGatewayadvertisedrouteString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + GatewayAdvertisedRoute response = + hubServiceClient + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_SpokenameGatewayadvertisedrouteString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString.java new file mode 100644 index 000000000000..498f8ccee1d6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/creategatewayadvertisedroute/SyncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_StringGatewayadvertisedrouteString_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString { + + public static void main(String[] args) throws Exception { + syncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString(); + } + + public static void syncCreateGatewayAdvertisedRouteStringGatewayadvertisedrouteString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339"; + GatewayAdvertisedRoute response = + hubServiceClient + .createGatewayAdvertisedRouteAsync( + parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateGatewayAdvertisedRoute_StringGatewayadvertisedrouteString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHub.java new file mode 100644 index 000000000000..69e295551fee --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHub.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateHub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateHub { + + public static void main(String[] args) throws Exception { + asyncCreateHub(); + } + + public static void asyncCreateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateHub_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHubLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHubLRO.java new file mode 100644 index 000000000000..d640c7c2bd92 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/AsyncCreateHubLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateHub_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; + +public class AsyncCreateHubLRO { + + public static void main(String[] args) throws Exception { + asyncCreateHubLRO(); + } + + public static void asyncCreateHubLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateHub_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHub.java new file mode 100644 index 000000000000..75b81a4e6b1f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHub.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateHub_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateHubRequest; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncCreateHub { + + public static void main(String[] args) throws Exception { + syncCreateHub(); + } + + public static void syncCreateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateHubRequest request = + CreateHubRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setHubId("hubId99628272") + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.createHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubLocationnameHubString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubLocationnameHubString.java new file mode 100644 index 000000000000..b341399077d2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubLocationnameHubString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateHub_LocationnameHubString_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncCreateHubLocationnameHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubLocationnameHubString(); + } + + public static void syncCreateHubLocationnameHubString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateHub_LocationnameHubString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubStringHubString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubStringHubString.java new file mode 100644 index 000000000000..4b8132e98ae8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createhub/SyncCreateHubStringHubString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateHub_StringHubString_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncCreateHubStringHubString { + + public static void main(String[] args) throws Exception { + syncCreateHubStringHubString(); + } + + public static void syncCreateHubStringHubString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Hub hub = Hub.newBuilder().build(); + String hubId = "hubId99628272"; + Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateHub_StringHubString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpoke.java new file mode 100644 index 000000000000..79afc8c1f519 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpoke.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.longrunning.Operation; + +public class AsyncCreateSpoke { + + public static void main(String[] args) throws Exception { + asyncCreateSpoke(); + } + + public static void asyncCreateSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.createSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpokeLRO.java new file mode 100644 index 000000000000..f446bda712f4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/AsyncCreateSpokeLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateSpoke_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class AsyncCreateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateSpokeLRO(); + } + + public static void asyncCreateSpokeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.createSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateSpoke_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpoke.java new file mode 100644 index 000000000000..4c35685cc711 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpoke.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncCreateSpoke { + + public static void main(String[] args) throws Exception { + syncCreateSpoke(); + } + + public static void syncCreateSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + CreateSpokeRequest request = + CreateSpokeRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setSpokeId("spokeId-1998996281") + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.createSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeLocationnameSpokeString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeLocationnameSpokeString.java new file mode 100644 index 000000000000..752aef6d7ca6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeLocationnameSpokeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateSpoke_LocationnameSpokeString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncCreateSpokeLocationnameSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeLocationnameSpokeString(); + } + + public static void syncCreateSpokeLocationnameSpokeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateSpoke_LocationnameSpokeString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeStringSpokeString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeStringSpokeString.java new file mode 100644 index 000000000000..4bd504f551b3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/createspoke/SyncCreateSpokeStringSpokeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_CreateSpoke_StringSpokeString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncCreateSpokeStringSpokeString { + + public static void main(String[] args) throws Exception { + syncCreateSpokeStringSpokeString(); + } + + public static void syncCreateSpokeStringSpokeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Spoke spoke = Spoke.newBuilder().build(); + String spokeId = "spokeId-1998996281"; + Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_CreateSpoke_StringSpokeString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..64a6bd867210 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRoute.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + asyncDeleteGatewayAdvertisedRoute(); + } + + public static void asyncDeleteGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteGatewayAdvertisedRouteRequest request = + DeleteGatewayAdvertisedRouteRequest.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + hubServiceClient.deleteGatewayAdvertisedRouteCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRouteLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRouteLRO.java new file mode 100644 index 000000000000..2b9b768048b7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/AsyncDeleteGatewayAdvertisedRouteLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteGatewayAdvertisedRouteLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteGatewayAdvertisedRouteLRO(); + } + + public static void asyncDeleteGatewayAdvertisedRouteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteGatewayAdvertisedRouteRequest request = + DeleteGatewayAdvertisedRouteRequest.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteGatewayAdvertisedRouteOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..6a9f05c378d3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRoute.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.DeleteGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + syncDeleteGatewayAdvertisedRoute(); + } + + public static void syncDeleteGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteGatewayAdvertisedRouteRequest request = + DeleteGatewayAdvertisedRouteRequest.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteGatewayAdvertisedRouteAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename.java new file mode 100644 index 000000000000..3628da46ddae --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_Gatewayadvertisedroutename_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename { + + public static void main(String[] args) throws Exception { + syncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename(); + } + + public static void syncDeleteGatewayAdvertisedRouteGatewayadvertisedroutename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_Gatewayadvertisedroutename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteString.java new file mode 100644 index 000000000000..6d7582774858 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletegatewayadvertisedroute/SyncDeleteGatewayAdvertisedRouteString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_String_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteGatewayAdvertisedRouteString { + + public static void main(String[] args) throws Exception { + syncDeleteGatewayAdvertisedRouteString(); + } + + public static void syncDeleteGatewayAdvertisedRouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString(); + hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteGatewayAdvertisedRoute_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHub.java new file mode 100644 index 000000000000..8f360d9e8ae2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHub.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteHub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteHub { + + public static void main(String[] args) throws Exception { + asyncDeleteHub(); + } + + public static void asyncDeleteHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteHubCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteHub_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHubLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHubLRO.java new file mode 100644 index 000000000000..9bb2bebb2150 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/AsyncDeleteHubLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteHub_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteHubLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteHubLRO(); + } + + public static void asyncDeleteHubLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteHubOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteHub_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHub.java new file mode 100644 index 000000000000..68a26bd5ff61 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHub.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteHub_sync] +import com.google.cloud.networkconnectivity.v1beta.DeleteHubRequest; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHub { + + public static void main(String[] args) throws Exception { + syncDeleteHub(); + } + + public static void syncDeleteHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteHubRequest request = + DeleteHubRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubHubname.java new file mode 100644 index 000000000000..0c75252847b2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubHubname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteHub_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubHubname { + + public static void main(String[] args) throws Exception { + syncDeleteHubHubname(); + } + + public static void syncDeleteHubHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteHub_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubString.java new file mode 100644 index 000000000000..8c3b507d98d6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletehub/SyncDeleteHubString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteHub_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteHubString { + + public static void main(String[] args) throws Exception { + syncDeleteHubString(); + } + + public static void syncDeleteHubString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + hubServiceClient.deleteHubAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteHub_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpoke.java new file mode 100644 index 000000000000..647df406ecf4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpoke.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + asyncDeleteSpoke(); + } + + public static void asyncDeleteSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.deleteSpokeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpokeLRO.java new file mode 100644 index 000000000000..c89f2e60b4d5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/AsyncDeleteSpokeLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteSpoke_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.protobuf.Empty; + +public class AsyncDeleteSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSpokeLRO(); + } + + public static void asyncDeleteSpokeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.deleteSpokeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteSpoke_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpoke.java new file mode 100644 index 000000000000..ea97e03242d8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpoke.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.DeleteSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpoke { + + public static void main(String[] args) throws Exception { + syncDeleteSpoke(); + } + + public static void syncDeleteSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + DeleteSpokeRequest request = + DeleteSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .build(); + hubServiceClient.deleteSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeSpokename.java new file mode 100644 index 000000000000..dd1b0d2250f3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeSpokename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteSpoke_Spokename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeSpokename(); + } + + public static void syncDeleteSpokeSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteSpoke_Spokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeString.java new file mode 100644 index 000000000000..c4e334f5e13a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/deletespoke/SyncDeleteSpokeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_DeleteSpoke_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.protobuf.Empty; + +public class SyncDeleteSpokeString { + + public static void main(String[] args) throws Exception { + syncDeleteSpokeString(); + } + + public static void syncDeleteSpokeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + hubServiceClient.deleteSpokeAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_DeleteSpoke_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/AsyncGetGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/AsyncGetGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..4d034ea80e42 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/AsyncGetGatewayAdvertisedRoute.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class AsyncGetGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + asyncGetGatewayAdvertisedRoute(); + } + + public static void asyncGetGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetGatewayAdvertisedRouteRequest request = + GetGatewayAdvertisedRouteRequest.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .build(); + ApiFuture future = + hubServiceClient.getGatewayAdvertisedRouteCallable().futureCall(request); + // Do something. + GatewayAdvertisedRoute response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..e74315ea8923 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRoute.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.GetGatewayAdvertisedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + syncGetGatewayAdvertisedRoute(); + } + + public static void syncGetGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetGatewayAdvertisedRouteRequest request = + GetGatewayAdvertisedRouteRequest.newBuilder() + .setName( + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString()) + .build(); + GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteGatewayadvertisedroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteGatewayadvertisedroutename.java new file mode 100644 index 000000000000..304d895e94c8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteGatewayadvertisedroutename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_Gatewayadvertisedroutename_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGatewayAdvertisedRouteGatewayadvertisedroutename { + + public static void main(String[] args) throws Exception { + syncGetGatewayAdvertisedRouteGatewayadvertisedroutename(); + } + + public static void syncGetGatewayAdvertisedRouteGatewayadvertisedroutename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GatewayAdvertisedRouteName name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]"); + GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_Gatewayadvertisedroutename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteString.java new file mode 100644 index 000000000000..f2b02be7bec6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgatewayadvertisedroute/SyncGetGatewayAdvertisedRouteString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_String_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGatewayAdvertisedRouteString { + + public static void main(String[] args) throws Exception { + syncGetGatewayAdvertisedRouteString(); + } + + public static void syncGetGatewayAdvertisedRouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = + GatewayAdvertisedRouteName.of( + "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]") + .toString(); + GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGatewayAdvertisedRoute_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/AsyncGetGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/AsyncGetGroup.java new file mode 100644 index 000000000000..10a3f802a0fe --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/AsyncGetGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class AsyncGetGroup { + + public static void main(String[] args) throws Exception { + asyncGetGroup(); + } + + public static void asyncGetGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetGroupRequest request = + GetGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .build(); + ApiFuture future = hubServiceClient.getGroupCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGroup_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroup.java new file mode 100644 index 000000000000..cabdfaedbc66 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroup.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGroup_sync] +import com.google.cloud.networkconnectivity.v1beta.GetGroupRequest; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGroup { + + public static void main(String[] args) throws Exception { + syncGetGroup(); + } + + public static void syncGetGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetGroupRequest request = + GetGroupRequest.newBuilder() + .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .build(); + Group response = hubServiceClient.getGroup(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGroup_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupGroupname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupGroupname.java new file mode 100644 index 000000000000..78b3642b570f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupGroupname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGroup_Groupname_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGroupGroupname { + + public static void main(String[] args) throws Exception { + syncGetGroupGroupname(); + } + + public static void syncGetGroupGroupname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); + Group response = hubServiceClient.getGroup(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGroup_Groupname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupString.java new file mode 100644 index 000000000000..3b538fce0b52 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getgroup/SyncGetGroupString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetGroup_String_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetGroupString { + + public static void main(String[] args) throws Exception { + syncGetGroupString(); + } + + public static void syncGetGroupString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString(); + Group response = hubServiceClient.getGroup(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetGroup_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/AsyncGetHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/AsyncGetHub.java new file mode 100644 index 000000000000..c951c8bebf8f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/AsyncGetHub.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetHub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetHubRequest; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class AsyncGetHub { + + public static void main(String[] args) throws Exception { + asyncGetHub(); + } + + public static void asyncGetHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + ApiFuture future = hubServiceClient.getHubCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetHub_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHub.java new file mode 100644 index 000000000000..65a973de5b30 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHub.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetHub_sync] +import com.google.cloud.networkconnectivity.v1beta.GetHubRequest; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetHubRequest request = + GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build(); + Hub response = hubServiceClient.getHub(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubHubname.java new file mode 100644 index 000000000000..67a542f6cd36 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubHubname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetHub_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetHubHubname { + + public static void main(String[] args) throws Exception { + syncGetHubHubname(); + } + + public static void syncGetHubHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetHub_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubString.java new file mode 100644 index 000000000000..ccdd8a3aebcb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/gethub/SyncGetHubString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetHub_String_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncGetHubString { + + public static void main(String[] args) throws Exception { + syncGetHubString(); + } + + public static void syncGetHubString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + Hub response = hubServiceClient.getHub(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetHub_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..9360108845db --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = hubServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..576e52f384ad --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = hubServiceClient.getIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..02e50b9a10f6 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = hubServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetLocation_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..c99bd7517b4f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = hubServiceClient.getLocation(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetLocation_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/AsyncGetRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/AsyncGetRoute.java new file mode 100644 index 000000000000..7bb2ebf20a1f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/AsyncGetRoute.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.HubRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; + +public class AsyncGetRoute { + + public static void main(String[] args) throws Exception { + asyncGetRoute(); + } + + public static void asyncGetRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetRouteRequest request = + GetRouteRequest.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .build(); + ApiFuture future = hubServiceClient.getRouteCallable().futureCall(request); + // Do something. + Route response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRoute.java new file mode 100644 index 000000000000..bdb4e9be9263 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRoute.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.GetRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.HubRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; + +public class SyncGetRoute { + + public static void main(String[] args) throws Exception { + syncGetRoute(); + } + + public static void syncGetRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetRouteRequest request = + GetRouteRequest.newBuilder() + .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString()) + .build(); + Route response = hubServiceClient.getRoute(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteHubroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteHubroutename.java new file mode 100644 index 000000000000..11d13ce2b67d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteHubroutename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRoute_Hubroutename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; + +public class SyncGetRouteHubroutename { + + public static void main(String[] args) throws Exception { + syncGetRouteHubroutename(); + } + + public static void syncGetRouteHubroutename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"); + Route response = hubServiceClient.getRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRoute_Hubroutename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteString.java new file mode 100644 index 000000000000..266a62a15534 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroute/SyncGetRouteString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRoute_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubRouteName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; + +public class SyncGetRouteString { + + public static void main(String[] args) throws Exception { + syncGetRouteString(); + } + + public static void syncGetRouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString(); + Route response = hubServiceClient.getRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRoute_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/AsyncGetRouteTable.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/AsyncGetRouteTable.java new file mode 100644 index 000000000000..78ff64c34e6e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/AsyncGetRouteTable.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRouteTable_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class AsyncGetRouteTable { + + public static void main(String[] args) throws Exception { + asyncGetRouteTable(); + } + + public static void asyncGetRouteTable() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetRouteTableRequest request = + GetRouteTableRequest.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .build(); + ApiFuture future = hubServiceClient.getRouteTableCallable().futureCall(request); + // Do something. + RouteTable response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRouteTable_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTable.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTable.java new file mode 100644 index 000000000000..250bc75da348 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTable.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRouteTable_sync] +import com.google.cloud.networkconnectivity.v1beta.GetRouteTableRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncGetRouteTable { + + public static void main(String[] args) throws Exception { + syncGetRouteTable(); + } + + public static void syncGetRouteTable() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetRouteTableRequest request = + GetRouteTableRequest.newBuilder() + .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .build(); + RouteTable response = hubServiceClient.getRouteTable(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRouteTable_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java new file mode 100644 index 000000000000..ce8133c84586 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableRoutetablename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRouteTable_Routetablename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncGetRouteTableRoutetablename { + + public static void main(String[] args) throws Exception { + syncGetRouteTableRoutetablename(); + } + + public static void syncGetRouteTableRoutetablename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + RouteTable response = hubServiceClient.getRouteTable(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRouteTable_Routetablename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableString.java new file mode 100644 index 000000000000..d680c987439f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getroutetable/SyncGetRouteTableString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetRouteTable_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncGetRouteTableString { + + public static void main(String[] args) throws Exception { + syncGetRouteTableString(); + } + + public static void syncGetRouteTableString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString(); + RouteTable response = hubServiceClient.getRouteTable(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetRouteTable_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/AsyncGetSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/AsyncGetSpoke.java new file mode 100644 index 000000000000..68e88ddaad7b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/AsyncGetSpoke.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncGetSpoke { + + public static void main(String[] args) throws Exception { + asyncGetSpoke(); + } + + public static void asyncGetSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + ApiFuture future = hubServiceClient.getSpokeCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpoke.java new file mode 100644 index 000000000000..0547d51f617e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpoke.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.GetSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncGetSpoke { + + public static void main(String[] args) throws Exception { + syncGetSpoke(); + } + + public static void syncGetSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GetSpokeRequest request = + GetSpokeRequest.newBuilder() + .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .build(); + Spoke response = hubServiceClient.getSpoke(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeSpokename.java new file mode 100644 index 000000000000..f4e907929a0d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeSpokename.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetSpoke_Spokename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncGetSpokeSpokename { + + public static void main(String[] args) throws Exception { + syncGetSpokeSpokename(); + } + + public static void syncGetSpokeSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetSpoke_Spokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeString.java new file mode 100644 index 000000000000..e009f325a7ad --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/getspoke/SyncGetSpokeString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_GetSpoke_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncGetSpokeString { + + public static void main(String[] args) throws Exception { + syncGetSpokeString(); + } + + public static void syncGetSpokeString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + Spoke response = hubServiceClient.getSpoke(name); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_GetSpoke_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutes.java new file mode 100644 index 000000000000..3a3783326c1a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutes.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncListGatewayAdvertisedRoutes { + + public static void main(String[] args) throws Exception { + asyncListGatewayAdvertisedRoutes(); + } + + public static void asyncListGatewayAdvertisedRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGatewayAdvertisedRoutesRequest request = + ListGatewayAdvertisedRoutesRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + hubServiceClient.listGatewayAdvertisedRoutesPagedCallable().futureCall(request); + // Do something. + for (GatewayAdvertisedRoute element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutesPaged.java new file mode 100644 index 000000000000..6d74b19fd43e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/AsyncListGatewayAdvertisedRoutesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.common.base.Strings; + +public class AsyncListGatewayAdvertisedRoutesPaged { + + public static void main(String[] args) throws Exception { + asyncListGatewayAdvertisedRoutesPaged(); + } + + public static void asyncListGatewayAdvertisedRoutesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGatewayAdvertisedRoutesRequest request = + ListGatewayAdvertisedRoutesRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListGatewayAdvertisedRoutesResponse response = + hubServiceClient.listGatewayAdvertisedRoutesCallable().call(request); + for (GatewayAdvertisedRoute element : response.getGatewayAdvertisedRoutesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutes.java new file mode 100644 index 000000000000..b8659e87566e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGatewayAdvertisedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncListGatewayAdvertisedRoutes { + + public static void main(String[] args) throws Exception { + syncListGatewayAdvertisedRoutes(); + } + + public static void syncListGatewayAdvertisedRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGatewayAdvertisedRoutesRequest request = + ListGatewayAdvertisedRoutesRequest.newBuilder() + .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (GatewayAdvertisedRoute element : + hubServiceClient.listGatewayAdvertisedRoutes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesSpokename.java new file mode 100644 index 000000000000..848c837bcfaa --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesSpokename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_Spokename_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncListGatewayAdvertisedRoutesSpokename { + + public static void main(String[] args) throws Exception { + syncListGatewayAdvertisedRoutesSpokename(); + } + + public static void syncListGatewayAdvertisedRoutesSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + for (GatewayAdvertisedRoute element : + hubServiceClient.listGatewayAdvertisedRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_Spokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesString.java new file mode 100644 index 000000000000..dc6ee98f5ded --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgatewayadvertisedroutes/SyncListGatewayAdvertisedRoutesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_String_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncListGatewayAdvertisedRoutesString { + + public static void main(String[] args) throws Exception { + syncListGatewayAdvertisedRoutesString(); + } + + public static void syncListGatewayAdvertisedRoutesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + for (GatewayAdvertisedRoute element : + hubServiceClient.listGatewayAdvertisedRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGatewayAdvertisedRoutes_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroups.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroups.java new file mode 100644 index 000000000000..02035b9492a5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroups.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGroups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; + +public class AsyncListGroups { + + public static void main(String[] args) throws Exception { + asyncListGroups(); + } + + public static void asyncListGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listGroupsPagedCallable().futureCall(request); + // Do something. + for (Group element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGroups_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroupsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroupsPaged.java new file mode 100644 index 000000000000..ae0f2781b095 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/AsyncListGroupsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGroups_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsResponse; +import com.google.common.base.Strings; + +public class AsyncListGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListGroupsPaged(); + } + + public static void asyncListGroupsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListGroupsResponse response = hubServiceClient.listGroupsCallable().call(request); + for (Group element : response.getGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGroups_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroups.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroups.java new file mode 100644 index 000000000000..c6234203066f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroups.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGroups_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListGroupsRequest; + +public class SyncListGroups { + + public static void main(String[] args) throws Exception { + syncListGroups(); + } + + public static void syncListGroups() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListGroupsRequest request = + ListGroupsRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Group element : hubServiceClient.listGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGroups_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsHubname.java new file mode 100644 index 000000000000..a9601fc57eb1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsHubname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGroups_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncListGroupsHubname { + + public static void main(String[] args) throws Exception { + syncListGroupsHubname(); + } + + public static void syncListGroupsHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + for (Group element : hubServiceClient.listGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGroups_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsString.java new file mode 100644 index 000000000000..fc11647695b1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listgroups/SyncListGroupsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListGroups_String_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +public class SyncListGroupsString { + + public static void main(String[] args) throws Exception { + syncListGroupsString(); + } + + public static void syncListGroupsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = HubName.of("[PROJECT]", "[HUB]").toString(); + for (Group element : hubServiceClient.listGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListGroups_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubs.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubs.java new file mode 100644 index 000000000000..d6e75e90db0f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubs.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class AsyncListHubs { + + public static void main(String[] args) throws Exception { + asyncListHubs(); + } + + public static void asyncListHubs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listHubsPagedCallable().futureCall(request); + // Do something. + for (Hub element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubs_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubsPaged.java new file mode 100644 index 000000000000..08813578ec2d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/AsyncListHubsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubs_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubsResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListHubsPaged { + + public static void main(String[] args) throws Exception { + asyncListHubsPaged(); + } + + public static void asyncListHubsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHubsResponse response = hubServiceClient.listHubsCallable().call(request); + for (Hub element : response.getHubsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubs_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubs.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubs.java new file mode 100644 index 000000000000..6303c5c5b957 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubs.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubs_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncListHubs { + + public static void main(String[] args) throws Exception { + syncListHubs(); + } + + public static void syncListHubs() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubsRequest request = + ListHubsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Hub element : hubServiceClient.listHubs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubs_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsLocationname.java new file mode 100644 index 000000000000..1ab1b3877073 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubs_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncListHubsLocationname { + + public static void main(String[] args) throws Exception { + syncListHubsLocationname(); + } + + public static void syncListHubsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubs_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsString.java new file mode 100644 index 000000000000..614bc8f0ba63 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubs/SyncListHubsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubs_String_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; + +public class SyncListHubsString { + + public static void main(String[] args) throws Exception { + syncListHubsString(); + } + + public static void syncListHubsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubs_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokes.java new file mode 100644 index 000000000000..b11d0edc4d89 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokes.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubSpokes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import java.util.ArrayList; + +public class AsyncListHubSpokes { + + public static void main(String[] args) throws Exception { + asyncListHubSpokes(); + } + + public static void asyncListHubSpokes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .addAllSpokeLocations(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request); + // Do something. + for (Spoke element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubSpokes_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokesPaged.java new file mode 100644 index 000000000000..5eb7b0bc4886 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/AsyncListHubSpokesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubSpokes_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.common.base.Strings; +import java.util.ArrayList; + +public class AsyncListHubSpokesPaged { + + public static void main(String[] args) throws Exception { + asyncListHubSpokesPaged(); + } + + public static void asyncListHubSpokesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .addAllSpokeLocations(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request); + for (Spoke element : response.getSpokesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubSpokes_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokes.java new file mode 100644 index 000000000000..cc20c379e1af --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubSpokes_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListHubSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import java.util.ArrayList; + +public class SyncListHubSpokes { + + public static void main(String[] args) throws Exception { + syncListHubSpokes(); + } + + public static void syncListHubSpokes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .addAllSpokeLocations(new ArrayList()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Spoke element : hubServiceClient.listHubSpokes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubSpokes_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesHubname.java new file mode 100644 index 000000000000..85035a361123 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesHubname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubSpokes_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncListHubSpokesHubname { + + public static void main(String[] args) throws Exception { + syncListHubSpokesHubname(); + } + + public static void syncListHubSpokesHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubSpokes_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesString.java new file mode 100644 index 000000000000..6a1831f6fd64 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listhubspokes/SyncListHubSpokesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListHubSpokes_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncListHubSpokesString { + + public static void main(String[] args) throws Exception { + syncListHubSpokesString(); + } + + public static void syncListHubSpokesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListHubSpokes_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..34da08ac046e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + hubServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListLocations_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..d0dc723a441a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = hubServiceClient.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 networkconnectivity_v1beta_generated_HubService_ListLocations_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..4ae3eece169d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; + +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : hubServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListLocations_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutes.java new file mode 100644 index 000000000000..3b50694bc6a4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutes.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRoutes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class AsyncListRoutes { + + public static void main(String[] args) throws Exception { + asyncListRoutes(); + } + + public static void asyncListRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listRoutesPagedCallable().futureCall(request); + // Do something. + for (Route element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRoutes_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutesPaged.java new file mode 100644 index 000000000000..23cc559583a3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/AsyncListRoutesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRoutes_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; +import com.google.common.base.Strings; + +public class AsyncListRoutesPaged { + + public static void main(String[] args) throws Exception { + asyncListRoutesPaged(); + } + + public static void asyncListRoutesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRoutesResponse response = hubServiceClient.listRoutesCallable().call(request); + for (Route element : response.getRoutesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRoutes_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutes.java new file mode 100644 index 000000000000..604755236df1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutes.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRoutes_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncListRoutes { + + public static void main(String[] args) throws Exception { + syncListRoutes(); + } + + public static void syncListRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRoutesRequest request = + ListRoutesRequest.newBuilder() + .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Route element : hubServiceClient.listRoutes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRoutes_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesRoutetablename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesRoutetablename.java new file mode 100644 index 000000000000..f5792b0b21fb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesRoutetablename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRoutes_Routetablename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncListRoutesRoutetablename { + + public static void main(String[] args) throws Exception { + syncListRoutesRoutetablename(); + } + + public static void syncListRoutesRoutetablename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"); + for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRoutes_Routetablename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesString.java new file mode 100644 index 000000000000..6fdbaa72063e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutes/SyncListRoutesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRoutes_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Route; +import com.google.cloud.networkconnectivity.v1beta.RouteTableName; + +public class SyncListRoutesString { + + public static void main(String[] args) throws Exception { + syncListRoutesString(); + } + + public static void syncListRoutesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString(); + for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRoutes_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTables.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTables.java new file mode 100644 index 000000000000..81136a2669c1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTables.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRouteTables_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; + +public class AsyncListRouteTables { + + public static void main(String[] args) throws Exception { + asyncListRouteTables(); + } + + public static void asyncListRouteTables() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRouteTablesRequest request = + ListRouteTablesRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + hubServiceClient.listRouteTablesPagedCallable().futureCall(request); + // Do something. + for (RouteTable element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRouteTables_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTablesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTablesPaged.java new file mode 100644 index 000000000000..2e6df5d0bc91 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/AsyncListRouteTablesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRouteTables_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesResponse; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; +import com.google.common.base.Strings; + +public class AsyncListRouteTablesPaged { + + public static void main(String[] args) throws Exception { + asyncListRouteTablesPaged(); + } + + public static void asyncListRouteTablesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRouteTablesRequest request = + ListRouteTablesRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRouteTablesResponse response = hubServiceClient.listRouteTablesCallable().call(request); + for (RouteTable element : response.getRouteTablesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRouteTables_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTables.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTables.java new file mode 100644 index 000000000000..639d26e8cff1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTables.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRouteTables_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListRouteTablesRequest; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; + +public class SyncListRouteTables { + + public static void main(String[] args) throws Exception { + syncListRouteTables(); + } + + public static void syncListRouteTables() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListRouteTablesRequest request = + ListRouteTablesRequest.newBuilder() + .setParent(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (RouteTable element : hubServiceClient.listRouteTables(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRouteTables_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesHubname.java new file mode 100644 index 000000000000..f49c7ff98502 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesHubname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRouteTables_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; + +public class SyncListRouteTablesHubname { + + public static void main(String[] args) throws Exception { + syncListRouteTablesHubname(); + } + + public static void syncListRouteTablesHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName parent = HubName.of("[PROJECT]", "[HUB]"); + for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRouteTables_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesString.java new file mode 100644 index 000000000000..33aaffd8b764 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listroutetables/SyncListRouteTablesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListRouteTables_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RouteTable; + +public class SyncListRouteTablesString { + + public static void main(String[] args) throws Exception { + syncListRouteTablesString(); + } + + public static void syncListRouteTablesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = HubName.of("[PROJECT]", "[HUB]").toString(); + for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListRouteTables_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokes.java new file mode 100644 index 000000000000..eb4752a63553 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokes.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListSpokes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class AsyncListSpokes { + + public static void main(String[] args) throws Exception { + asyncListSpokes(); + } + + public static void asyncListSpokes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = hubServiceClient.listSpokesPagedCallable().futureCall(request); + // Do something. + for (Spoke element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListSpokes_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokesPaged.java new file mode 100644 index 000000000000..9562d75e820f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/AsyncListSpokesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListSpokes_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.common.base.Strings; + +public class AsyncListSpokesPaged { + + public static void main(String[] args) throws Exception { + asyncListSpokesPaged(); + } + + public static void asyncListSpokesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request); + for (Spoke element : response.getSpokesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListSpokes_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokes.java new file mode 100644 index 000000000000..cd647ce510e1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokes.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListSpokes_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.ListSpokesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncListSpokes { + + public static void main(String[] args) throws Exception { + syncListSpokes(); + } + + public static void syncListSpokes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + ListSpokesRequest request = + ListSpokesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListSpokes_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesLocationname.java new file mode 100644 index 000000000000..086ca369d013 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListSpokes_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncListSpokesLocationname { + + public static void main(String[] args) throws Exception { + syncListSpokesLocationname(); + } + + public static void syncListSpokesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListSpokes_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesString.java new file mode 100644 index 000000000000..9fb1c3b2b0dc --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/listspokes/SyncListSpokesString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_ListSpokes_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Spoke; + +public class SyncListSpokesString { + + public static void main(String[] args) throws Exception { + syncListSpokesString(); + } + + public static void syncListSpokesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_ListSpokes_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatus.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatus.java new file mode 100644 index 000000000000..27eb8ba5fa51 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatus.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_QueryHubStatus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; + +public class AsyncQueryHubStatus { + + public static void main(String[] args) throws Exception { + asyncQueryHubStatus(); + } + + public static void asyncQueryHubStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + QueryHubStatusRequest request = + QueryHubStatusRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setGroupBy("groupBy293428022") + .build(); + ApiFuture future = + hubServiceClient.queryHubStatusPagedCallable().futureCall(request); + // Do something. + for (HubStatusEntry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_QueryHubStatus_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatusPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatusPaged.java new file mode 100644 index 000000000000..fd3997803d5f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/AsyncQueryHubStatusPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_QueryHubStatus_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusResponse; +import com.google.common.base.Strings; + +public class AsyncQueryHubStatusPaged { + + public static void main(String[] args) throws Exception { + asyncQueryHubStatusPaged(); + } + + public static void asyncQueryHubStatusPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + QueryHubStatusRequest request = + QueryHubStatusRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setGroupBy("groupBy293428022") + .build(); + while (true) { + QueryHubStatusResponse response = hubServiceClient.queryHubStatusCallable().call(request); + for (HubStatusEntry element : response.getHubStatusEntriesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_QueryHubStatus_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatus.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatus.java new file mode 100644 index 000000000000..79e894d49d04 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatus.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_QueryHubStatus_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; +import com.google.cloud.networkconnectivity.v1beta.QueryHubStatusRequest; + +public class SyncQueryHubStatus { + + public static void main(String[] args) throws Exception { + syncQueryHubStatus(); + } + + public static void syncQueryHubStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + QueryHubStatusRequest request = + QueryHubStatusRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .setGroupBy("groupBy293428022") + .build(); + for (HubStatusEntry element : hubServiceClient.queryHubStatus(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_QueryHubStatus_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusHubname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusHubname.java new file mode 100644 index 000000000000..1dcd5ae66012 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusHubname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_QueryHubStatus_Hubname_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; + +public class SyncQueryHubStatusHubname { + + public static void main(String[] args) throws Exception { + syncQueryHubStatusHubname(); + } + + public static void syncQueryHubStatusHubname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + for (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_QueryHubStatus_Hubname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusString.java new file mode 100644 index 000000000000..3780ef532a00 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/queryhubstatus/SyncQueryHubStatusString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_QueryHubStatus_String_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.HubStatusEntry; + +public class SyncQueryHubStatusString { + + public static void main(String[] args) throws Exception { + syncQueryHubStatusString(); + } + + public static void syncQueryHubStatusString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + for (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_QueryHubStatus_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java new file mode 100644 index 000000000000..5e11aa1de06b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpoke.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncRejectHubSpoke { + + public static void main(String[] args) throws Exception { + asyncRejectHubSpoke(); + } + + public static void asyncRejectHubSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .setDetails("details1557721666") + .build(); + ApiFuture future = hubServiceClient.rejectHubSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java new file mode 100644 index 000000000000..2366bac7c4cd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/AsyncRejectHubSpokeLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncRejectHubSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncRejectHubSpokeLRO(); + } + + public static void asyncRejectHubSpokeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .setDetails("details1557721666") + .build(); + OperationFuture future = + hubServiceClient.rejectHubSpokeOperationCallable().futureCall(request); + // Do something. + RejectHubSpokeResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpoke.java new file mode 100644 index 000000000000..29dde271738b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpoke.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectHubSpoke { + + public static void main(String[] args) throws Exception { + syncRejectHubSpoke(); + } + + public static void syncRejectHubSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectHubSpokeRequest request = + RejectHubSpokeRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setRequestId("requestId693933066") + .setDetails("details1557721666") + .build(); + RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java new file mode 100644 index 000000000000..23ec7f4ad6b1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameSpokename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_HubnameSpokename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectHubSpokeHubnameSpokename { + + public static void main(String[] args) throws Exception { + syncRejectHubSpokeHubnameSpokename(); + } + + public static void syncRejectHubSpokeHubnameSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_HubnameSpokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java new file mode 100644 index 000000000000..8a9cdd288cb9 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeHubnameString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_HubnameString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectHubSpokeHubnameString { + + public static void main(String[] args) throws Exception { + syncRejectHubSpokeHubnameString(); + } + + public static void syncRejectHubSpokeHubnameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_HubnameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java new file mode 100644 index 000000000000..729eb149aad5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringSpokename.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_StringSpokename_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectHubSpokeStringSpokename { + + public static void main(String[] args) throws Exception { + syncRejectHubSpokeStringSpokename(); + } + + public static void syncRejectHubSpokeStringSpokename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_StringSpokename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java new file mode 100644 index 000000000000..374dffed07db --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejecthubspoke/SyncRejectHubSpokeStringString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_StringString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectHubSpokeResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectHubSpokeStringString { + + public static void main(String[] args) throws Exception { + syncRejectHubSpokeStringString(); + } + + public static void syncRejectHubSpokeStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectHubSpoke_StringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdate.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdate.java new file mode 100644 index 000000000000..6770952748d0 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdate.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; +import com.google.longrunning.Operation; + +public class AsyncRejectSpokeUpdate { + + public static void main(String[] args) throws Exception { + asyncRejectSpokeUpdate(); + } + + public static void asyncRejectSpokeUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setDetails("details1557721666") + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + hubServiceClient.rejectSpokeUpdateCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdateLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdateLRO.java new file mode 100644 index 000000000000..8db3af580d1b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/AsyncRejectSpokeUpdateLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class AsyncRejectSpokeUpdateLRO { + + public static void main(String[] args) throws Exception { + asyncRejectSpokeUpdateLRO(); + } + + public static void asyncRejectSpokeUpdateLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setDetails("details1557721666") + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.rejectSpokeUpdateOperationCallable().futureCall(request); + // Do something. + RejectSpokeUpdateResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdate.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdate.java new file mode 100644 index 000000000000..2416e3401607 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdate.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateRequest; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectSpokeUpdate { + + public static void main(String[] args) throws Exception { + syncRejectSpokeUpdate(); + } + + public static void syncRejectSpokeUpdate() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + RejectSpokeUpdateRequest request = + RejectSpokeUpdateRequest.newBuilder() + .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) + .setSpokeEtag("spokeEtag-1185145407") + .setDetails("details1557721666") + .setRequestId("requestId693933066") + .build(); + RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameSpokenameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameSpokenameString.java new file mode 100644 index 000000000000..a8fb301d1cd4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameSpokenameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_HubnameSpokenameString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectSpokeUpdateHubnameSpokenameString { + + public static void main(String[] args) throws Exception { + syncRejectSpokeUpdateHubnameSpokenameString(); + } + + public static void syncRejectSpokeUpdateHubnameSpokenameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + RejectSpokeUpdateResponse response = + hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_HubnameSpokenameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameStringString.java new file mode 100644 index 000000000000..198362af254a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateHubnameStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_HubnameStringString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectSpokeUpdateHubnameStringString { + + public static void main(String[] args) throws Exception { + syncRejectSpokeUpdateHubnameStringString(); + } + + public static void syncRejectSpokeUpdateHubnameStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + HubName name = HubName.of("[PROJECT]", "[HUB]"); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + String spokeEtag = "spokeEtag-1185145407"; + RejectSpokeUpdateResponse response = + hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_HubnameStringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringSpokenameString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringSpokenameString.java new file mode 100644 index 000000000000..efe4425c4bac --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringSpokenameString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_StringSpokenameString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectSpokeUpdateStringSpokenameString { + + public static void main(String[] args) throws Exception { + syncRejectSpokeUpdateStringSpokenameString(); + } + + public static void syncRejectSpokeUpdateStringSpokenameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]"); + String spokeEtag = "spokeEtag-1185145407"; + RejectSpokeUpdateResponse response = + hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_StringSpokenameString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringStringString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringStringString.java new file mode 100644 index 000000000000..a3054fdb4e54 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/rejectspokeupdate/SyncRejectSpokeUpdateStringStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_StringStringString_sync] +import com.google.cloud.networkconnectivity.v1beta.HubName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.RejectSpokeUpdateResponse; +import com.google.cloud.networkconnectivity.v1beta.SpokeName; + +public class SyncRejectSpokeUpdateStringStringString { + + public static void main(String[] args) throws Exception { + syncRejectSpokeUpdateStringStringString(); + } + + public static void syncRejectSpokeUpdateStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + String name = HubName.of("[PROJECT]", "[HUB]").toString(); + String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString(); + String spokeEtag = "spokeEtag-1185145407"; + RejectSpokeUpdateResponse response = + hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_RejectSpokeUpdate_StringStringString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..c08ae98e8f79 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = hubServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_SetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..626a303f8133 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_SetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = hubServiceClient.setIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_SetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..cb07f8a51471 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + hubServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_TestIamPermissions_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..fa2635f05ddf --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_TestIamPermissions_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = hubServiceClient.testIamPermissions(request); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_TestIamPermissions_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..7eec51ff8c48 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRoute.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + asyncUpdateGatewayAdvertisedRoute(); + } + + public static void asyncUpdateGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGatewayAdvertisedRouteRequest request = + UpdateGatewayAdvertisedRouteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + hubServiceClient.updateGatewayAdvertisedRouteCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRouteLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRouteLRO.java new file mode 100644 index 000000000000..c5908d2e2673 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/AsyncUpdateGatewayAdvertisedRouteLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGatewayAdvertisedRouteLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateGatewayAdvertisedRouteLRO(); + } + + public static void asyncUpdateGatewayAdvertisedRouteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGatewayAdvertisedRouteRequest request = + UpdateGatewayAdvertisedRouteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateGatewayAdvertisedRouteOperationCallable().futureCall(request); + // Do something. + GatewayAdvertisedRoute response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRoute.java new file mode 100644 index 000000000000..266cf18fac30 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRoute.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateGatewayAdvertisedRouteRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGatewayAdvertisedRoute { + + public static void main(String[] args) throws Exception { + syncUpdateGatewayAdvertisedRoute(); + } + + public static void syncUpdateGatewayAdvertisedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGatewayAdvertisedRouteRequest request = + UpdateGatewayAdvertisedRouteRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + GatewayAdvertisedRoute response = + hubServiceClient.updateGatewayAdvertisedRouteAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask.java new file mode 100644 index 000000000000..499ff40f9e12 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategatewayadvertisedroute/SyncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_GatewayadvertisedrouteFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.GatewayAdvertisedRoute; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask(); + } + + public static void syncUpdateGatewayAdvertisedRouteGatewayadvertisedrouteFieldmask() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + GatewayAdvertisedRoute response = + hubServiceClient + .updateGatewayAdvertisedRouteAsync(gatewayAdvertisedRoute, updateMask) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGatewayAdvertisedRoute_GatewayadvertisedrouteFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroup.java new file mode 100644 index 000000000000..1fe6d9333696 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroup.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGroup_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGroup { + + public static void main(String[] args) throws Exception { + asyncUpdateGroup(); + } + + public static void asyncUpdateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateGroupCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGroup_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroupLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroupLRO.java new file mode 100644 index 000000000000..656b8d585a55 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/AsyncUpdateGroupLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGroup_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateGroupLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateGroupLRO(); + } + + public static void asyncUpdateGroupLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateGroupOperationCallable().futureCall(request); + // Do something. + Group response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGroup_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroup.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroup.java new file mode 100644 index 000000000000..94035374e03f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroup.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGroup_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateGroupRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGroup { + + public static void main(String[] args) throws Exception { + syncUpdateGroup(); + } + + public static void syncUpdateGroup() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateGroupRequest request = + UpdateGroupRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setGroup(Group.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Group response = hubServiceClient.updateGroupAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGroup_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroupGroupFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroupGroupFieldmask.java new file mode 100644 index 000000000000..ef280cf423f5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updategroup/SyncUpdateGroupGroupFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateGroup_GroupFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.Group; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateGroupGroupFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateGroupGroupFieldmask(); + } + + public static void syncUpdateGroupGroupFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Group group = Group.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Group response = hubServiceClient.updateGroupAsync(group, updateMask).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateGroup_GroupFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHub.java new file mode 100644 index 000000000000..9494bbcee2e2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHub.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateHub_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHub { + + public static void main(String[] args) throws Exception { + asyncUpdateHub(); + } + + public static void asyncUpdateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateHubCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateHub_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHubLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHubLRO.java new file mode 100644 index 000000000000..27162537ee18 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/AsyncUpdateHubLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateHub_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateHubLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateHubLRO(); + } + + public static void asyncUpdateHubLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateHubOperationCallable().futureCall(request); + // Do something. + Hub response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateHub_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHub.java new file mode 100644 index 000000000000..8e1bc532dd44 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateHub_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateHubRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHub { + + public static void main(String[] args) throws Exception { + syncUpdateHub(); + } + + public static void syncUpdateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateHubRequest request = + UpdateHubRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setHub(Hub.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Hub response = hubServiceClient.updateHubAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHubHubFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHubHubFieldmask.java new file mode 100644 index 000000000000..f52c0efffb9a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatehub/SyncUpdateHubHubFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateHub_HubFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.Hub; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateHubHubFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateHubHubFieldmask(); + } + + public static void syncUpdateHubHubFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Hub hub = Hub.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateHub_HubFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpoke.java new file mode 100644 index 000000000000..44a35cc582fd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpoke.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateSpoke_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + asyncUpdateSpoke(); + } + + public static void asyncUpdateSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = hubServiceClient.updateSpokeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateSpoke_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpokeLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpokeLRO.java new file mode 100644 index 000000000000..1e1a60e11248 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/AsyncUpdateSpokeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateSpoke_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateSpokeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateSpokeLRO(); + } + + public static void asyncUpdateSpokeLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + hubServiceClient.updateSpokeOperationCallable().futureCall(request); + // Do something. + Spoke response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateSpoke_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpoke.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpoke.java new file mode 100644 index 000000000000..0e0f99716c7c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpoke.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateSpoke_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.cloud.networkconnectivity.v1beta.UpdateSpokeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpoke { + + public static void main(String[] args) throws Exception { + syncUpdateSpoke(); + } + + public static void syncUpdateSpoke() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + UpdateSpokeRequest request = + UpdateSpokeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setSpoke(Spoke.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Spoke response = hubServiceClient.updateSpokeAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateSpoke_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpokeSpokeFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpokeSpokeFieldmask.java new file mode 100644 index 000000000000..0d936fa2343f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservice/updatespoke/SyncUpdateSpokeSpokeFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubService_UpdateSpoke_SpokeFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceClient; +import com.google.cloud.networkconnectivity.v1beta.Spoke; +import com.google.protobuf.FieldMask; + +public class SyncUpdateSpokeSpokeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateSpokeSpokeFieldmask(); + } + + public static void syncUpdateSpokeSpokeFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + Spoke spoke = Spoke.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_HubService_UpdateSpoke_SpokeFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/createhub/SyncCreateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/createhub/SyncCreateHub.java new file mode 100644 index 000000000000..56b2fe3d606b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/createhub/SyncCreateHub.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubServiceSettings_CreateHub_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.HubServiceSettings; +import java.time.Duration; + +public class SyncCreateHub { + + public static void main(String[] args) throws Exception { + syncCreateHub(); + } + + public static void syncCreateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + hubServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_HubServiceSettings_CreateHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/gethub/SyncGetHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/gethub/SyncGetHub.java new file mode 100644 index 000000000000..99b1076a1528 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/hubservicesettings/gethub/SyncGetHub.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_HubServiceSettings_GetHub_sync] +import com.google.cloud.networkconnectivity.v1beta.HubServiceSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HubServiceSettings.Builder hubServiceSettingsBuilder = HubServiceSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + HubServiceSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_HubServiceSettings_GetHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetCredentialsProvider.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..72587042305a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings = + PolicyBasedRoutingServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create(policyBasedRoutingServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_Create_SetCredentialsProvider_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetEndpoint.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..59b1b8a20644 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_Create_SetEndpoint_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings = + PolicyBasedRoutingServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create(policyBasedRoutingServiceSettings); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_Create_SetEndpoint_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRoute.java new file mode 100644 index 000000000000..b892a96ea5a5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRoute.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreatePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBasedRoute(); + } + + public static void asyncCreatePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + CreatePolicyBasedRouteRequest request = + CreatePolicyBasedRouteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPolicyBasedRouteId("policyBasedRouteId-18034589") + .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.createPolicyBasedRouteCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRouteLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRouteLRO.java new file mode 100644 index 000000000000..fa5b23f819a4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/AsyncCreatePolicyBasedRouteLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class AsyncCreatePolicyBasedRouteLRO { + + public static void main(String[] args) throws Exception { + asyncCreatePolicyBasedRouteLRO(); + } + + public static void asyncCreatePolicyBasedRouteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + CreatePolicyBasedRouteRequest request = + CreatePolicyBasedRouteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPolicyBasedRouteId("policyBasedRouteId-18034589") + .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + policyBasedRoutingServiceClient + .createPolicyBasedRouteOperationCallable() + .futureCall(request); + // Do something. + PolicyBasedRoute response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRoute.java new file mode 100644 index 000000000000..e92fa7a27ccd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRoute.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.CreatePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncCreatePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBasedRoute(); + } + + public static void syncCreatePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + CreatePolicyBasedRouteRequest request = + CreatePolicyBasedRouteRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPolicyBasedRouteId("policyBasedRouteId-18034589") + .setPolicyBasedRoute(PolicyBasedRoute.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + PolicyBasedRoute response = + policyBasedRoutingServiceClient.createPolicyBasedRouteAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteLocationnamePolicybasedrouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteLocationnamePolicybasedrouteString.java new file mode 100644 index 000000000000..6e39083497ba --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteLocationnamePolicybasedrouteString.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_LocationnamePolicybasedrouteString_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncCreatePolicyBasedRouteLocationnamePolicybasedrouteString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBasedRouteLocationnamePolicybasedrouteString(); + } + + public static void syncCreatePolicyBasedRouteLocationnamePolicybasedrouteString() + throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + PolicyBasedRoute response = + policyBasedRoutingServiceClient + .createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_LocationnamePolicybasedrouteString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteStringPolicybasedrouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteStringPolicybasedrouteString.java new file mode 100644 index 000000000000..991c2680caa7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/createpolicybasedroute/SyncCreatePolicyBasedRouteStringPolicybasedrouteString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_StringPolicybasedrouteString_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncCreatePolicyBasedRouteStringPolicybasedrouteString { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBasedRouteStringPolicybasedrouteString(); + } + + public static void syncCreatePolicyBasedRouteStringPolicybasedrouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + PolicyBasedRoute policyBasedRoute = PolicyBasedRoute.newBuilder().build(); + String policyBasedRouteId = "policyBasedRouteId-18034589"; + PolicyBasedRoute response = + policyBasedRoutingServiceClient + .createPolicyBasedRouteAsync(parent, policyBasedRoute, policyBasedRouteId) + .get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_StringPolicybasedrouteString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRoute.java new file mode 100644 index 000000000000..f14052eec950 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRoute.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeletePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBasedRoute(); + } + + public static void asyncDeletePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + DeletePolicyBasedRouteRequest request = + DeletePolicyBasedRouteRequest.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.deletePolicyBasedRouteCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRouteLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRouteLRO.java new file mode 100644 index 000000000000..6db7579000da --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/AsyncDeletePolicyBasedRouteLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePolicyBasedRouteLRO { + + public static void main(String[] args) throws Exception { + asyncDeletePolicyBasedRouteLRO(); + } + + public static void asyncDeletePolicyBasedRouteLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + DeletePolicyBasedRouteRequest request = + DeletePolicyBasedRouteRequest.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + policyBasedRoutingServiceClient + .deletePolicyBasedRouteOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoute.java new file mode 100644 index 000000000000..7899f7f3b8af --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoute.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.DeletePolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBasedRoute(); + } + + public static void syncDeletePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + DeletePolicyBasedRouteRequest request = + DeletePolicyBasedRouteRequest.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .setRequestId("requestId693933066") + .build(); + policyBasedRoutingServiceClient.deletePolicyBasedRouteAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoutePolicybasedroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoutePolicybasedroutename.java new file mode 100644 index 000000000000..ce6fadd70753 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRoutePolicybasedroutename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_Policybasedroutename_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBasedRoutePolicybasedroutename { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBasedRoutePolicybasedroutename(); + } + + public static void syncDeletePolicyBasedRoutePolicybasedroutename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + policyBasedRoutingServiceClient.deletePolicyBasedRouteAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_Policybasedroutename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRouteString.java new file mode 100644 index 000000000000..7bfdec96c70e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/deletepolicybasedroute/SyncDeletePolicyBasedRouteString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_String_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeletePolicyBasedRouteString { + + public static void main(String[] args) throws Exception { + syncDeletePolicyBasedRouteString(); + } + + public static void syncDeletePolicyBasedRouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + String name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString(); + policyBasedRoutingServiceClient.deletePolicyBasedRouteAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..cd44cf04eac4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..68582b5dc3c3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = policyBasedRoutingServiceClient.getIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..321def428fa8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + policyBasedRoutingServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetLocation_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..7236428ab72f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = policyBasedRoutingServiceClient.getLocation(request); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetLocation_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/AsyncGetPolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/AsyncGetPolicyBasedRoute.java new file mode 100644 index 000000000000..463fb0ec77fb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/AsyncGetPolicyBasedRoute.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class AsyncGetPolicyBasedRoute { + + public static void main(String[] args) throws Exception { + asyncGetPolicyBasedRoute(); + } + + public static void asyncGetPolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetPolicyBasedRouteRequest request = + GetPolicyBasedRouteRequest.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.getPolicyBasedRouteCallable().futureCall(request); + // Do something. + PolicyBasedRoute response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoute.java new file mode 100644 index 000000000000..70ab028a0394 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoute.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.GetPolicyBasedRouteRequest; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncGetPolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncGetPolicyBasedRoute(); + } + + public static void syncGetPolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + GetPolicyBasedRouteRequest request = + GetPolicyBasedRouteRequest.newBuilder() + .setName(PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString()) + .build(); + PolicyBasedRoute response = policyBasedRoutingServiceClient.getPolicyBasedRoute(request); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoutePolicybasedroutename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoutePolicybasedroutename.java new file mode 100644 index 000000000000..ede04b4900af --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRoutePolicybasedroutename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_Policybasedroutename_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncGetPolicyBasedRoutePolicybasedroutename { + + public static void main(String[] args) throws Exception { + syncGetPolicyBasedRoutePolicybasedroutename(); + } + + public static void syncGetPolicyBasedRoutePolicybasedroutename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + PolicyBasedRouteName name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]"); + PolicyBasedRoute response = policyBasedRoutingServiceClient.getPolicyBasedRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_Policybasedroutename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRouteString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRouteString.java new file mode 100644 index 000000000000..f81e3955cf61 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/getpolicybasedroute/SyncGetPolicyBasedRouteString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_String_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRouteName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncGetPolicyBasedRouteString { + + public static void main(String[] args) throws Exception { + syncGetPolicyBasedRouteString(); + } + + public static void syncGetPolicyBasedRouteString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + String name = PolicyBasedRouteName.of("[PROJECT]", "[POLICY_BASED_ROUTE]").toString(); + PolicyBasedRoute response = policyBasedRoutingServiceClient.getPolicyBasedRoute(name); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..1f562d17eaaa --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..3f0268aa1bd8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + policyBasedRoutingServiceClient.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 networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..f06efd1730a8 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : policyBasedRoutingServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListLocations_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutes.java new file mode 100644 index 000000000000..3cde67d6705f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutes.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class AsyncListPolicyBasedRoutes { + + public static void main(String[] args) throws Exception { + asyncListPolicyBasedRoutes(); + } + + public static void asyncListPolicyBasedRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListPolicyBasedRoutesRequest request = + ListPolicyBasedRoutesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.listPolicyBasedRoutesPagedCallable().futureCall(request); + // Do something. + for (PolicyBasedRoute element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutesPaged.java new file mode 100644 index 000000000000..ecbe31243877 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/AsyncListPolicyBasedRoutesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +import com.google.common.base.Strings; + +public class AsyncListPolicyBasedRoutesPaged { + + public static void main(String[] args) throws Exception { + asyncListPolicyBasedRoutesPaged(); + } + + public static void asyncListPolicyBasedRoutesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListPolicyBasedRoutesRequest request = + ListPolicyBasedRoutesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListPolicyBasedRoutesResponse response = + policyBasedRoutingServiceClient.listPolicyBasedRoutesCallable().call(request); + for (PolicyBasedRoute element : response.getPolicyBasedRoutesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutes.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutes.java new file mode 100644 index 000000000000..3d3bca7865fa --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_sync] +import com.google.cloud.networkconnectivity.v1beta.ListPolicyBasedRoutesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncListPolicyBasedRoutes { + + public static void main(String[] args) throws Exception { + syncListPolicyBasedRoutes(); + } + + public static void syncListPolicyBasedRoutes() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + ListPolicyBasedRoutesRequest request = + ListPolicyBasedRoutesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (PolicyBasedRoute element : + policyBasedRoutingServiceClient.listPolicyBasedRoutes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesLocationname.java new file mode 100644 index 000000000000..7a1eca7d287c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesLocationname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncListPolicyBasedRoutesLocationname { + + public static void main(String[] args) throws Exception { + syncListPolicyBasedRoutesLocationname(); + } + + public static void syncListPolicyBasedRoutesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (PolicyBasedRoute element : + policyBasedRoutingServiceClient.listPolicyBasedRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesString.java new file mode 100644 index 000000000000..2bab6137d41d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/listpolicybasedroutes/SyncListPolicyBasedRoutesString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_String_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoute; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; + +public class SyncListPolicyBasedRoutesString { + + public static void main(String[] args) throws Exception { + syncListPolicyBasedRoutesString(); + } + + public static void syncListPolicyBasedRoutesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (PolicyBasedRoute element : + policyBasedRoutingServiceClient.listPolicyBasedRoutes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..66693a8947dd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_SetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..5926373fa76f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_SetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = policyBasedRoutingServiceClient.setIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_SetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..60bcfc1a31a0 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + policyBasedRoutingServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_TestIamPermissions_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..d846da554266 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingService_TestIamPermissions_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceClient; +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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient = + PolicyBasedRoutingServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = + policyBasedRoutingServiceClient.testIamPermissions(request); + } + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingService_TestIamPermissions_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java new file mode 100644 index 000000000000..cc83b805fe08 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceSettings_CreatePolicyBasedRoute_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceSettings; +import java.time.Duration; + +public class SyncCreatePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBasedRoute(); + } + + public static void syncCreatePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBasedRoutingServiceSettings.Builder policyBasedRoutingServiceSettingsBuilder = + PolicyBasedRoutingServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBasedRoutingServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceSettings_CreatePolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java new file mode 100644 index 000000000000..538a3bd9037c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/policybasedroutingservicesettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceSettings_GetPolicyBasedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingServiceSettings; +import java.time.Duration; + +public class SyncGetPolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncGetPolicyBasedRoute(); + } + + public static void syncGetPolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBasedRoutingServiceSettings.Builder policyBasedRoutingServiceSettingsBuilder = + PolicyBasedRoutingServiceSettings.newBuilder(); + policyBasedRoutingServiceSettingsBuilder + .getPolicyBasedRouteSettings() + .setRetrySettings( + policyBasedRoutingServiceSettingsBuilder + .getPolicyBasedRouteSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBasedRoutingServiceSettings policyBasedRoutingServiceSettings = + policyBasedRoutingServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceSettings_GetPolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..96ba468453ed --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/createmulticlouddatatransferconfig/SyncCreateMulticloudDataTransferConfig.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferServiceStubSettings_CreateMulticloudDataTransferConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.stub.DataTransferServiceStubSettings; +import java.time.Duration; + +public class SyncCreateMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncCreateMulticloudDataTransferConfig(); + } + + public static void syncCreateMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataTransferServiceStubSettings.Builder dataTransferServiceSettingsBuilder = + DataTransferServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + dataTransferServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferServiceStubSettings_CreateMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java new file mode 100644 index 000000000000..fe026c972f22 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/datatransferservicestubsettings/getmulticlouddatatransferconfig/SyncGetMulticloudDataTransferConfig.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_DataTransferServiceStubSettings_GetMulticloudDataTransferConfig_sync] +import com.google.cloud.networkconnectivity.v1beta.stub.DataTransferServiceStubSettings; +import java.time.Duration; + +public class SyncGetMulticloudDataTransferConfig { + + public static void main(String[] args) throws Exception { + syncGetMulticloudDataTransferConfig(); + } + + public static void syncGetMulticloudDataTransferConfig() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + DataTransferServiceStubSettings.Builder dataTransferServiceSettingsBuilder = + DataTransferServiceStubSettings.newBuilder(); + dataTransferServiceSettingsBuilder + .getMulticloudDataTransferConfigSettings() + .setRetrySettings( + dataTransferServiceSettingsBuilder + .getMulticloudDataTransferConfigSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + DataTransferServiceStubSettings dataTransferServiceSettings = + dataTransferServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_DataTransferServiceStubSettings_GetMulticloudDataTransferConfig_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/createhub/SyncCreateHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/createhub/SyncCreateHub.java new file mode 100644 index 000000000000..ef2371cfa21c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/createhub/SyncCreateHub.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_HubServiceStubSettings_CreateHub_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.stub.HubServiceStubSettings; +import java.time.Duration; + +public class SyncCreateHub { + + public static void main(String[] args) throws Exception { + syncCreateHub(); + } + + public static void syncCreateHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + hubServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_HubServiceStubSettings_CreateHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/gethub/SyncGetHub.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/gethub/SyncGetHub.java new file mode 100644 index 000000000000..a328e09617d0 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/hubservicestubsettings/gethub/SyncGetHub.java @@ -0,0 +1,55 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_HubServiceStubSettings_GetHub_sync] +import com.google.cloud.networkconnectivity.v1beta.stub.HubServiceStubSettings; +import java.time.Duration; + +public class SyncGetHub { + + public static void main(String[] args) throws Exception { + syncGetHub(); + } + + public static void syncGetHub() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + HubServiceStubSettings.Builder hubServiceSettingsBuilder = HubServiceStubSettings.newBuilder(); + hubServiceSettingsBuilder + .getHubSettings() + .setRetrySettings( + hubServiceSettingsBuilder + .getHubSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + HubServiceStubSettings hubServiceSettings = hubServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_HubServiceStubSettings_GetHub_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java new file mode 100644 index 000000000000..c942d66e8626 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/createpolicybasedroute/SyncCreatePolicyBasedRoute.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceStubSettings_CreatePolicyBasedRoute_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.stub.PolicyBasedRoutingServiceStubSettings; +import java.time.Duration; + +public class SyncCreatePolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncCreatePolicyBasedRoute(); + } + + public static void syncCreatePolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBasedRoutingServiceStubSettings.Builder policyBasedRoutingServiceSettingsBuilder = + PolicyBasedRoutingServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + policyBasedRoutingServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceStubSettings_CreatePolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java new file mode 100644 index 000000000000..1b49e557ca5e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/policybasedroutingservicestubsettings/getpolicybasedroute/SyncGetPolicyBasedRoute.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceStubSettings_GetPolicyBasedRoute_sync] +import com.google.cloud.networkconnectivity.v1beta.stub.PolicyBasedRoutingServiceStubSettings; +import java.time.Duration; + +public class SyncGetPolicyBasedRoute { + + public static void main(String[] args) throws Exception { + syncGetPolicyBasedRoute(); + } + + public static void syncGetPolicyBasedRoute() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + PolicyBasedRoutingServiceStubSettings.Builder policyBasedRoutingServiceSettingsBuilder = + PolicyBasedRoutingServiceStubSettings.newBuilder(); + policyBasedRoutingServiceSettingsBuilder + .getPolicyBasedRouteSettings() + .setRetrySettings( + policyBasedRoutingServiceSettingsBuilder + .getPolicyBasedRouteSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + PolicyBasedRoutingServiceStubSettings policyBasedRoutingServiceSettings = + policyBasedRoutingServiceSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_PolicyBasedRoutingServiceStubSettings_GetPolicyBasedRoute_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/createtransport/SyncCreateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/createtransport/SyncCreateTransport.java new file mode 100644 index 000000000000..af890f77228e --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/createtransport/SyncCreateTransport.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_TransportManagerStubSettings_CreateTransport_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.stub.TransportManagerStubSettings; +import java.time.Duration; + +public class SyncCreateTransport { + + public static void main(String[] args) throws Exception { + syncCreateTransport(); + } + + public static void syncCreateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TransportManagerStubSettings.Builder transportManagerSettingsBuilder = + TransportManagerStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + transportManagerSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_TransportManagerStubSettings_CreateTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java new file mode 100644 index 000000000000..36d818a93f1b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/stub/transportmanagerstubsettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.stub.samples; + +// [START networkconnectivity_v1beta_generated_TransportManagerStubSettings_GetRemoteTransportProfile_sync] +import com.google.cloud.networkconnectivity.v1beta.stub.TransportManagerStubSettings; +import java.time.Duration; + +public class SyncGetRemoteTransportProfile { + + public static void main(String[] args) throws Exception { + syncGetRemoteTransportProfile(); + } + + public static void syncGetRemoteTransportProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TransportManagerStubSettings.Builder transportManagerSettingsBuilder = + TransportManagerStubSettings.newBuilder(); + transportManagerSettingsBuilder + .getRemoteTransportProfileSettings() + .setRetrySettings( + transportManagerSettingsBuilder + .getRemoteTransportProfileSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + TransportManagerStubSettings transportManagerSettings = transportManagerSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_TransportManagerStubSettings_GetRemoteTransportProfile_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetCredentialsProvider.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..85c6e0a762c2 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + TransportManagerSettings transportManagerSettings = + TransportManagerSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + TransportManagerClient transportManagerClient = + TransportManagerClient.create(transportManagerSettings); + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_Create_SetCredentialsProvider_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetEndpoint.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..fb855cdef9fa --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_Create_SetEndpoint_sync] +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerSettings; +import com.google.cloud.networkconnectivity.v1beta.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 + TransportManagerSettings transportManagerSettings = + TransportManagerSettings.newBuilder().setEndpoint(myEndpoint).build(); + TransportManagerClient transportManagerClient = + TransportManagerClient.create(transportManagerSettings); + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_Create_SetEndpoint_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransport.java new file mode 100644 index 000000000000..51c69d2e06cb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransport.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_CreateTransport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.longrunning.Operation; + +public class AsyncCreateTransport { + + public static void main(String[] args) throws Exception { + asyncCreateTransport(); + } + + public static void asyncCreateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + CreateTransportRequest request = + CreateTransportRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTransportId("transportId-1713251804") + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + transportManagerClient.createTransportCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_CreateTransport_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransportLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransportLRO.java new file mode 100644 index 000000000000..4c3fd5694a47 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/AsyncCreateTransportLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_CreateTransport_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class AsyncCreateTransportLRO { + + public static void main(String[] args) throws Exception { + asyncCreateTransportLRO(); + } + + public static void asyncCreateTransportLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + CreateTransportRequest request = + CreateTransportRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTransportId("transportId-1713251804") + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + transportManagerClient.createTransportOperationCallable().futureCall(request); + // Do something. + Transport response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_CreateTransport_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransport.java new file mode 100644 index 000000000000..ce09a25f40d1 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransport.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_CreateTransport_sync] +import com.google.cloud.networkconnectivity.v1beta.CreateTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncCreateTransport { + + public static void main(String[] args) throws Exception { + syncCreateTransport(); + } + + public static void syncCreateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + CreateTransportRequest request = + CreateTransportRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTransportId("transportId-1713251804") + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Transport response = transportManagerClient.createTransportAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_CreateTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportLocationnameTransportString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportLocationnameTransportString.java new file mode 100644 index 000000000000..5cfd398c13ab --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportLocationnameTransportString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_CreateTransport_LocationnameTransportString_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncCreateTransportLocationnameTransportString { + + public static void main(String[] args) throws Exception { + syncCreateTransportLocationnameTransportString(); + } + + public static void syncCreateTransportLocationnameTransportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + Transport response = + transportManagerClient.createTransportAsync(parent, transport, transportId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_CreateTransport_LocationnameTransportString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportStringTransportString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportStringTransportString.java new file mode 100644 index 000000000000..08ffe4f63379 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/createtransport/SyncCreateTransportStringTransportString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_CreateTransport_StringTransportString_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncCreateTransportStringTransportString { + + public static void main(String[] args) throws Exception { + syncCreateTransportStringTransportString(); + } + + public static void syncCreateTransportStringTransportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + Transport transport = Transport.newBuilder().build(); + String transportId = "transportId-1713251804"; + Transport response = + transportManagerClient.createTransportAsync(parent, transport, transportId).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_CreateTransport_StringTransportString_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransport.java new file mode 100644 index 000000000000..4d0f2213772f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransport.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; +import com.google.longrunning.Operation; + +public class AsyncDeleteTransport { + + public static void main(String[] args) throws Exception { + asyncDeleteTransport(); + } + + public static void asyncDeleteTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + DeleteTransportRequest request = + DeleteTransportRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + transportManagerClient.deleteTransportCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransportLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransportLRO.java new file mode 100644 index 000000000000..c3f53e559920 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/AsyncDeleteTransportLRO.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; +import com.google.protobuf.Empty; + +public class AsyncDeleteTransportLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteTransportLRO(); + } + + public static void asyncDeleteTransportLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + DeleteTransportRequest request = + DeleteTransportRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + transportManagerClient.deleteTransportOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransport.java new file mode 100644 index 000000000000..849d8ac0f654 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransport.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_sync] +import com.google.cloud.networkconnectivity.v1beta.DeleteTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; +import com.google.protobuf.Empty; + +public class SyncDeleteTransport { + + public static void main(String[] args) throws Exception { + syncDeleteTransport(); + } + + public static void syncDeleteTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + DeleteTransportRequest request = + DeleteTransportRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .setRequestId("requestId693933066") + .build(); + transportManagerClient.deleteTransportAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportString.java new file mode 100644 index 000000000000..16a23971f5eb --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_String_sync] +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; +import com.google.protobuf.Empty; + +public class SyncDeleteTransportString { + + public static void main(String[] args) throws Exception { + syncDeleteTransportString(); + } + + public static void syncDeleteTransportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString(); + transportManagerClient.deleteTransportAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportTransportname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportTransportname.java new file mode 100644 index 000000000000..cf9c9acd1d69 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/deletetransport/SyncDeleteTransportTransportname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_Transportname_sync] +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; +import com.google.protobuf.Empty; + +public class SyncDeleteTransportTransportname { + + public static void main(String[] args) throws Exception { + syncDeleteTransportTransportname(); + } + + public static void syncDeleteTransportTransportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + transportManagerClient.deleteTransportAsync(name).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_DeleteTransport_Transportname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/AsyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..a6b2e9bc9171 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = transportManagerClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/SyncGetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..c4c6260fa49a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = transportManagerClient.getIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/AsyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..436e88b22cc3 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = transportManagerClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetLocation_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/SyncGetLocation.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..7b7cc9210029 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetLocation_sync] +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = transportManagerClient.getLocation(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetLocation_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/AsyncGetRemoteTransportProfile.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/AsyncGetRemoteTransportProfile.java new file mode 100644 index 000000000000..8ae46c852536 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/AsyncGetRemoteTransportProfile.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class AsyncGetRemoteTransportProfile { + + public static void main(String[] args) throws Exception { + asyncGetRemoteTransportProfile(); + } + + public static void asyncGetRemoteTransportProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetRemoteTransportProfileRequest request = + GetRemoteTransportProfileRequest.newBuilder() + .setName( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .build(); + ApiFuture future = + transportManagerClient.getRemoteTransportProfileCallable().futureCall(request); + // Do something. + RemoteTransportProfile response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfile.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfile.java new file mode 100644 index 000000000000..015be00199ed --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfile.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_sync] +import com.google.cloud.networkconnectivity.v1beta.GetRemoteTransportProfileRequest; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncGetRemoteTransportProfile { + + public static void main(String[] args) throws Exception { + syncGetRemoteTransportProfile(); + } + + public static void syncGetRemoteTransportProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetRemoteTransportProfileRequest request = + GetRemoteTransportProfileRequest.newBuilder() + .setName( + RemoteTransportProfileName.of( + "[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString()) + .build(); + RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileRemotetransportprofilename.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileRemotetransportprofilename.java new file mode 100644 index 000000000000..32dae153400a --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileRemotetransportprofilename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_Remotetransportprofilename_sync] +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncGetRemoteTransportProfileRemotetransportprofilename { + + public static void main(String[] args) throws Exception { + syncGetRemoteTransportProfileRemotetransportprofilename(); + } + + public static void syncGetRemoteTransportProfileRemotetransportprofilename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + RemoteTransportProfileName name = + RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"); + RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_Remotetransportprofilename_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileString.java new file mode 100644 index 000000000000..8442889c81b7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getremotetransportprofile/SyncGetRemoteTransportProfileString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_String_sync] +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfileName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncGetRemoteTransportProfileString { + + public static void main(String[] args) throws Exception { + syncGetRemoteTransportProfileString(); + } + + public static void syncGetRemoteTransportProfileString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String name = + RemoteTransportProfileName.of("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]") + .toString(); + RemoteTransportProfile response = transportManagerClient.getRemoteTransportProfile(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetRemoteTransportProfile_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/AsyncGetStatus.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/AsyncGetStatus.java new file mode 100644 index 000000000000..0305a9f74d86 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/AsyncGetStatus.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetStatus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class AsyncGetStatus { + + public static void main(String[] args) throws Exception { + asyncGetStatus(); + } + + public static void asyncGetStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetStatusRequest request = + GetStatusRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .build(); + ApiFuture future = + transportManagerClient.getStatusCallable().futureCall(request); + // Do something. + GetStatusResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetStatus_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatus.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatus.java new file mode 100644 index 000000000000..3449c0f78669 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatus.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetStatus_sync] +import com.google.cloud.networkconnectivity.v1beta.GetStatusRequest; +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetStatus { + + public static void main(String[] args) throws Exception { + syncGetStatus(); + } + + public static void syncGetStatus() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetStatusRequest request = + GetStatusRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .build(); + GetStatusResponse response = transportManagerClient.getStatus(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetStatus_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusString.java new file mode 100644 index 000000000000..a1390bd3424f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetStatus_String_sync] +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetStatusString { + + public static void main(String[] args) throws Exception { + syncGetStatusString(); + } + + public static void syncGetStatusString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString(); + GetStatusResponse response = transportManagerClient.getStatus(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetStatus_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusTransportname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusTransportname.java new file mode 100644 index 000000000000..fc01857964be --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/getstatus/SyncGetStatusTransportname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetStatus_Transportname_sync] +import com.google.cloud.networkconnectivity.v1beta.GetStatusResponse; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetStatusTransportname { + + public static void main(String[] args) throws Exception { + syncGetStatusTransportname(); + } + + public static void syncGetStatusTransportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + GetStatusResponse response = transportManagerClient.getStatus(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetStatus_Transportname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/AsyncGetTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/AsyncGetTransport.java new file mode 100644 index 000000000000..bf6b94533916 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/AsyncGetTransport.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetTransport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GetTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class AsyncGetTransport { + + public static void main(String[] args) throws Exception { + asyncGetTransport(); + } + + public static void asyncGetTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetTransportRequest request = + GetTransportRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .build(); + ApiFuture future = + transportManagerClient.getTransportCallable().futureCall(request); + // Do something. + Transport response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetTransport_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransport.java new file mode 100644 index 000000000000..96caf35f15ac --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransport.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetTransport_sync] +import com.google.cloud.networkconnectivity.v1beta.GetTransportRequest; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetTransport { + + public static void main(String[] args) throws Exception { + syncGetTransport(); + } + + public static void syncGetTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + GetTransportRequest request = + GetTransportRequest.newBuilder() + .setName(TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString()) + .build(); + Transport response = transportManagerClient.getTransport(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportString.java new file mode 100644 index 000000000000..1542b3fcfbfd --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetTransport_String_sync] +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetTransportString { + + public static void main(String[] args) throws Exception { + syncGetTransportString(); + } + + public static void syncGetTransportString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]").toString(); + Transport response = transportManagerClient.getTransport(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetTransport_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportTransportname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportTransportname.java new file mode 100644 index 000000000000..b68ea9a59d2b --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/gettransport/SyncGetTransportTransportname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_GetTransport_Transportname_sync] +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.TransportName; + +public class SyncGetTransportTransportname { + + public static void main(String[] args) throws Exception { + syncGetTransportTransportname(); + } + + public static void syncGetTransportTransportname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + TransportName name = TransportName.of("[PROJECT]", "[LOCATION]", "[TRANSPORT]"); + Transport response = transportManagerClient.getTransport(name); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_GetTransport_Transportname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..7a52537b4c64 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + transportManagerClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListLocations_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocationsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..ff09dd0e74b0 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListLocations_Paged_async] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + transportManagerClient.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 networkconnectivity_v1beta_generated_TransportManager_ListLocations_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/SyncListLocations.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..c48525852819 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListLocations_sync] +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : transportManagerClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListLocations_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfiles.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfiles.java new file mode 100644 index 000000000000..52ed03d534ca --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfiles.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class AsyncListRemoteTransportProfiles { + + public static void main(String[] args) throws Exception { + asyncListRemoteTransportProfiles(); + } + + public static void asyncListRemoteTransportProfiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListRemoteTransportProfilesRequest request = + ListRemoteTransportProfilesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + transportManagerClient.listRemoteTransportProfilesPagedCallable().futureCall(request); + // Do something. + for (RemoteTransportProfile element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfilesPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfilesPaged.java new file mode 100644 index 000000000000..f6d58ef4a997 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/AsyncListRemoteTransportProfilesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.common.base.Strings; + +public class AsyncListRemoteTransportProfilesPaged { + + public static void main(String[] args) throws Exception { + asyncListRemoteTransportProfilesPaged(); + } + + public static void asyncListRemoteTransportProfilesPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListRemoteTransportProfilesRequest request = + ListRemoteTransportProfilesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListRemoteTransportProfilesResponse response = + transportManagerClient.listRemoteTransportProfilesCallable().call(request); + for (RemoteTransportProfile element : response.getRemoteTransportProfilesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfiles.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfiles.java new file mode 100644 index 000000000000..de9f89849ad5 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfiles.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_sync] +import com.google.cloud.networkconnectivity.v1beta.ListRemoteTransportProfilesRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListRemoteTransportProfiles { + + public static void main(String[] args) throws Exception { + syncListRemoteTransportProfiles(); + } + + public static void syncListRemoteTransportProfiles() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListRemoteTransportProfilesRequest request = + ListRemoteTransportProfilesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (RemoteTransportProfile element : + transportManagerClient.listRemoteTransportProfiles(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesLocationname.java new file mode 100644 index 000000000000..6ebe2fcb6656 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListRemoteTransportProfilesLocationname { + + public static void main(String[] args) throws Exception { + syncListRemoteTransportProfilesLocationname(); + } + + public static void syncListRemoteTransportProfilesLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (RemoteTransportProfile element : + transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesString.java new file mode 100644 index 000000000000..158d363ad8a4 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listremotetransportprofiles/SyncListRemoteTransportProfilesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_String_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.RemoteTransportProfile; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListRemoteTransportProfilesString { + + public static void main(String[] args) throws Exception { + syncListRemoteTransportProfilesString(); + } + + public static void syncListRemoteTransportProfilesString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (RemoteTransportProfile element : + transportManagerClient.listRemoteTransportProfiles(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListRemoteTransportProfiles_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransports.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransports.java new file mode 100644 index 000000000000..fab74abf000d --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransports.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListTransports_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class AsyncListTransports { + + public static void main(String[] args) throws Exception { + asyncListTransports(); + } + + public static void asyncListTransports() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListTransportsRequest request = + ListTransportsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + transportManagerClient.listTransportsPagedCallable().futureCall(request); + // Do something. + for (Transport element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListTransports_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransportsPaged.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransportsPaged.java new file mode 100644 index 000000000000..9faa3b3187a7 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/AsyncListTransportsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListTransports_Paged_async] +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.ListTransportsResponse; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.common.base.Strings; + +public class AsyncListTransportsPaged { + + public static void main(String[] args) throws Exception { + asyncListTransportsPaged(); + } + + public static void asyncListTransportsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListTransportsRequest request = + ListTransportsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListTransportsResponse response = + transportManagerClient.listTransportsCallable().call(request); + for (Transport element : response.getTransportsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListTransports_Paged_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransports.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransports.java new file mode 100644 index 000000000000..ba177d2a4429 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransports.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListTransports_sync] +import com.google.cloud.networkconnectivity.v1beta.ListTransportsRequest; +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListTransports { + + public static void main(String[] args) throws Exception { + syncListTransports(); + } + + public static void syncListTransports() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + ListTransportsRequest request = + ListTransportsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Transport element : transportManagerClient.listTransports(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListTransports_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsLocationname.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsLocationname.java new file mode 100644 index 000000000000..90d00256d411 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListTransports_Locationname_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListTransportsLocationname { + + public static void main(String[] args) throws Exception { + syncListTransportsLocationname(); + } + + public static void syncListTransportsLocationname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListTransports_Locationname_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsString.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsString.java new file mode 100644 index 000000000000..c7bd6e7ef717 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/listtransports/SyncListTransportsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_ListTransports_String_sync] +import com.google.cloud.networkconnectivity.v1beta.LocationName; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; + +public class SyncListTransportsString { + + public static void main(String[] args) throws Exception { + syncListTransportsString(); + } + + public static void syncListTransportsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (Transport element : transportManagerClient.listTransports(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_ListTransports_String_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/AsyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..efc338728cb9 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = transportManagerClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_SetIamPolicy_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/SyncSetIamPolicy.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..31252bbaef09 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_SetIamPolicy_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = transportManagerClient.setIamPolicy(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_SetIamPolicy_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/AsyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..a565e8e1a950 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,52 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + transportManagerClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_TestIamPermissions_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/SyncTestIamPermissions.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..1089f5c84c6c --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_TestIamPermissions_sync] +import com.google.cloud.networkconnectivity.v1beta.GroupName; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +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 (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = transportManagerClient.testIamPermissions(request); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_TestIamPermissions_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransport.java new file mode 100644 index 000000000000..73bcaa99ae3f --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransport.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateTransport { + + public static void main(String[] args) throws Exception { + asyncUpdateTransport(); + } + + public static void asyncUpdateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + UpdateTransportRequest request = + UpdateTransportRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + transportManagerClient.updateTransportCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransportLRO.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransportLRO.java new file mode 100644 index 000000000000..9448b9e7b331 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/AsyncUpdateTransportLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkconnectivity.v1beta.OperationMetadata; +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateTransportLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateTransportLRO(); + } + + public static void asyncUpdateTransportLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + UpdateTransportRequest request = + UpdateTransportRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + transportManagerClient.updateTransportOperationCallable().futureCall(request); + // Do something. + Transport response = future.get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_LRO_async] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransport.java new file mode 100644 index 000000000000..720d16bd8c05 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransport.java @@ -0,0 +1,48 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_sync] +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.cloud.networkconnectivity.v1beta.UpdateTransportRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTransport { + + public static void main(String[] args) throws Exception { + syncUpdateTransport(); + } + + public static void syncUpdateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + UpdateTransportRequest request = + UpdateTransportRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setTransport(Transport.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + Transport response = transportManagerClient.updateTransportAsync(request).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransportTransportFieldmask.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransportTransportFieldmask.java new file mode 100644 index 000000000000..bfb14bf52415 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanager/updatetransport/SyncUpdateTransportTransportFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_TransportFieldmask_sync] +import com.google.cloud.networkconnectivity.v1beta.Transport; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTransportTransportFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateTransportTransportFieldmask(); + } + + public static void syncUpdateTransportTransportFieldmask() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (TransportManagerClient transportManagerClient = TransportManagerClient.create()) { + Transport transport = Transport.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Transport response = transportManagerClient.updateTransportAsync(transport, updateMask).get(); + } + } +} +// [END networkconnectivity_v1beta_generated_TransportManager_UpdateTransport_TransportFieldmask_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/createtransport/SyncCreateTransport.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/createtransport/SyncCreateTransport.java new file mode 100644 index 000000000000..971525a0e516 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/createtransport/SyncCreateTransport.java @@ -0,0 +1,54 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManagerSettings_CreateTransport_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.networkconnectivity.v1beta.TransportManagerSettings; +import java.time.Duration; + +public class SyncCreateTransport { + + public static void main(String[] args) throws Exception { + syncCreateTransport(); + } + + public static void syncCreateTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TransportManagerSettings.Builder transportManagerSettingsBuilder = + TransportManagerSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + transportManagerSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END networkconnectivity_v1beta_generated_TransportManagerSettings_CreateTransport_sync] diff --git a/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java new file mode 100644 index 000000000000..001523960d22 --- /dev/null +++ b/java-networkconnectivity/samples/snippets/generated/com/google/cloud/networkconnectivity/v1beta/transportmanagersettings/getremotetransportprofile/SyncGetRemoteTransportProfile.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.networkconnectivity.v1beta.samples; + +// [START networkconnectivity_v1beta_generated_TransportManagerSettings_GetRemoteTransportProfile_sync] +import com.google.cloud.networkconnectivity.v1beta.TransportManagerSettings; +import java.time.Duration; + +public class SyncGetRemoteTransportProfile { + + public static void main(String[] args) throws Exception { + syncGetRemoteTransportProfile(); + } + + public static void syncGetRemoteTransportProfile() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + TransportManagerSettings.Builder transportManagerSettingsBuilder = + TransportManagerSettings.newBuilder(); + transportManagerSettingsBuilder + .getRemoteTransportProfileSettings() + .setRetrySettings( + transportManagerSettingsBuilder + .getRemoteTransportProfileSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + TransportManagerSettings transportManagerSettings = transportManagerSettingsBuilder.build(); + } +} +// [END networkconnectivity_v1beta_generated_TransportManagerSettings_GetRemoteTransportProfile_sync] diff --git a/versions.txt b/versions.txt index d0e293cdaa19..af9a5462d534 100644 --- a/versions.txt +++ b/versions.txt @@ -976,5 +976,7 @@ proto-google-cloud-vectorsearch-v1:0.8.0:0.9.0-SNAPSHOT grpc-google-cloud-vectorsearch-v1:0.8.0:0.9.0-SNAPSHOT google-cloud-bigquery:2.61.0:2.62.0-SNAPSHOT google-cloud-bigquery-jdbc:0.5.0:0.6.0-SNAPSHOT +proto-google-cloud-networkconnectivity-v1beta:1.86.0:1.87.0-SNAPSHOT +grpc-google-cloud-networkconnectivity-v1beta:1.86.0:1.87.0-SNAPSHOT proto-google-cloud-hypercomputecluster-v1:0.7.0:0.8.0-SNAPSHOT grpc-google-cloud-hypercomputecluster-v1:0.7.0:0.8.0-SNAPSHOT