Access Secure Source Manager instances, resources, and repositories. + * + *
This API is split across two servers: the Control Plane and the Data Plane. + * + *
Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must + * connect to your instance's API hostname to access them. The API hostname looks like the + * following: + * + *
https://[instance-id]-[project-number]-api.[location].sourcemanager.dev + * + *
For example, + * + *
https://my-instance-702770452863-api.us-central1.sourcemanager.dev + * + *
Data Plane endpoints are denoted with **Host: Data Plane**. + * + *
All other endpoints are found in the normal Cloud API location, namely, + * `securcesourcemanager.googleapis.com`. + * + *
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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * Instance response = secureSourceManagerClient.getInstance(name); + * } + * }+ * + *
Note: close() needs to be called on the SecureSourceManagerClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
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 SecureSourceManagerSettings 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 + * SecureSourceManagerSettings secureSourceManagerSettings = + * SecureSourceManagerSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * SecureSourceManagerClient secureSourceManagerClient = + * SecureSourceManagerClient.create(secureSourceManagerSettings); + * }+ * + *
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 + * SecureSourceManagerSettings secureSourceManagerSettings = + * SecureSourceManagerSettings.newBuilder().setEndpoint(myEndpoint).build(); + * SecureSourceManagerClient secureSourceManagerClient = + * SecureSourceManagerClient.create(secureSourceManagerSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * SecureSourceManagerSettings secureSourceManagerSettings = + * SecureSourceManagerSettings.newHttpJsonBuilder().build(); + * SecureSourceManagerClient secureSourceManagerClient = + * SecureSourceManagerClient.create(secureSourceManagerSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class SecureSourceManagerClient implements BackgroundResource { + private final SecureSourceManagerSettings settings; + private final SecureSourceManagerStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of SecureSourceManagerClient with default settings. */ + public static final SecureSourceManagerClient create() throws IOException { + return create(SecureSourceManagerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SecureSourceManagerClient, 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 SecureSourceManagerClient create(SecureSourceManagerSettings settings) + throws IOException { + return new SecureSourceManagerClient(settings); + } + + /** + * Constructs an instance of SecureSourceManagerClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(SecureSourceManagerSettings). + */ + public static final SecureSourceManagerClient create(SecureSourceManagerStub stub) { + return new SecureSourceManagerClient(stub); + } + + /** + * Constructs an instance of SecureSourceManagerClient, 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 SecureSourceManagerClient(SecureSourceManagerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SecureSourceManagerStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected SecureSourceManagerClient(SecureSourceManagerStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final SecureSourceManagerSettings getSettings() { + return settings; + } + + public SecureSourceManagerStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInstancesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(LocationName parent) { + ListInstancesRequest request = + ListInstancesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Instance element : secureSourceManagerClient.listInstances(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInstancesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(String parent) { + ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build(); + return listInstances(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListInstancesRequest request = + * ListInstancesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Instance element : secureSourceManagerClient.listInstances(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstancesPagedResponse listInstances(ListInstancesRequest request) { + return listInstancesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Instances in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListInstancesRequest request = + * ListInstancesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.listInstancesPagedCallable().futureCall(request); + * // Do something. + * for (Instance element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListInstancesRequest request = + * ListInstancesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListInstancesResponse response = + * secureSourceManagerClient.listInstancesCallable().call(request); + * for (Instance element : response.getInstancesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * Instance response = secureSourceManagerClient.getInstance(name); + * } + * }+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(InstanceName name) { + GetInstanceRequest request = + GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + * Instance response = secureSourceManagerClient.getInstance(name); + * } + * }+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(String name) { + GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build(); + return getInstance(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetInstanceRequest request = + * GetInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .build(); + * Instance response = secureSourceManagerClient.getInstance(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instance getInstance(GetInstanceRequest request) { + return getInstanceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single instance. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetInstanceRequest request = + * GetInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.getInstanceCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Instance instance = Instance.newBuilder().build(); + * String instanceId = "instanceId902024336"; + * Instance response = + * secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param instance Required. The resource being created. + * @param instanceId Required. ID of the instance to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Instance instance = Instance.newBuilder().build(); + * String instanceId = "instanceId902024336"; + * Instance response = + * secureSourceManagerClient.createInstanceAsync(parent, instance, instanceId).get(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param instance Required. The resource being created. + * @param instanceId Required. ID of the instance to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * Instance response = secureSourceManagerClient.createInstanceAsync(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
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * secureSourceManagerClient.createInstanceOperationCallable().futureCall(request); + * // Do something. + * Instance response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateInstanceRequest request = + * CreateInstanceRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setInstanceId("instanceId902024336") + * .setInstance(Instance.newBuilder().build()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.createInstanceCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + * secureSourceManagerClient.deleteInstanceAsync(name).get(); + * } + * }+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + * secureSourceManagerClient.deleteInstanceAsync(name).get(); + * } + * }+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteInstanceRequest request = + * DeleteInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * secureSourceManagerClient.deleteInstanceAsync(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
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteInstanceRequest request = + * DeleteInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * secureSourceManagerClient.deleteInstanceOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteInstanceRequest request = + * DeleteInstanceRequest.newBuilder() + * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.deleteInstanceCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent value for ListRepositoriesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRepositoriesPagedResponse listRepositories(LocationName parent) { + ListRepositoriesRequest request = + ListRepositoriesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRepositories(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Repositories in a given project and location. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Repository element : secureSourceManagerClient.listRepositories(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent value for ListRepositoriesRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRepositoriesPagedResponse listRepositories(String parent) { + ListRepositoriesRequest request = + ListRepositoriesRequest.newBuilder().setParent(parent).build(); + return listRepositories(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Repositories in a given project and location. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListRepositoriesRequest request = + * ListRepositoriesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Repository element : secureSourceManagerClient.listRepositories(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 ListRepositoriesPagedResponse listRepositories(ListRepositoriesRequest request) { + return listRepositoriesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Repositories in a given project and location. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListRepositoriesRequest request = + * ListRepositoriesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.listRepositoriesPagedCallable().futureCall(request); + * // Do something. + * for (Repository element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListRepositoriesRequest request = + * ListRepositoriesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListRepositoriesResponse response = + * secureSourceManagerClient.listRepositoriesCallable().call(request); + * for (Repository element : response.getRepositoriesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * Repository response = secureSourceManagerClient.getRepository(name); + * } + * }+ * + * @param name Required. Name of the repository to retrieve. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Repository getRepository(RepositoryName name) { + GetRepositoryRequest request = + GetRepositoryRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRepository(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata of a repository. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); + * Repository response = secureSourceManagerClient.getRepository(name); + * } + * }+ * + * @param name Required. Name of the repository to retrieve. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Repository getRepository(String name) { + GetRepositoryRequest request = GetRepositoryRequest.newBuilder().setName(name).build(); + return getRepository(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata of a repository. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetRepositoryRequest request = + * GetRepositoryRequest.newBuilder() + * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .build(); + * Repository response = secureSourceManagerClient.getRepository(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 Repository getRepository(GetRepositoryRequest request) { + return getRepositoryCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets metadata of a repository. + * + *
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetRepositoryRequest request = + * GetRepositoryRequest.newBuilder() + * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.getRepositoryCallable().futureCall(request); + * // Do something. + * Repository response = future.get(); + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Repository repository = Repository.newBuilder().build(); + * String repositoryId = "repositoryId2113747461"; + * Repository response = + * secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get(); + * } + * }+ * + * @param parent Required. The project in which to create the repository. Values are of the form + * `projects/{project_number}/locations/{location_id}` + * @param repository Required. The resource being created. + * @param repositoryId Required. The ID to use for the repository, which will become the final + * component of the repository's resource name. This value should be 4-63 characters, and + * valid characters are /[a-z][0-9]-/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Repository repository = Repository.newBuilder().build(); + * String repositoryId = "repositoryId2113747461"; + * Repository response = + * secureSourceManagerClient.createRepositoryAsync(parent, repository, repositoryId).get(); + * } + * }+ * + * @param parent Required. The project in which to create the repository. Values are of the form + * `projects/{project_number}/locations/{location_id}` + * @param repository Required. The resource being created. + * @param repositoryId Required. The ID to use for the repository, which will become the final + * component of the repository's resource name. This value should be 4-63 characters, and + * valid characters are /[a-z][0-9]-/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateRepositoryRequest request = + * CreateRepositoryRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRepository(Repository.newBuilder().build()) + * .setRepositoryId("repositoryId2113747461") + * .build(); + * Repository response = secureSourceManagerClient.createRepositoryAsync(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
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateRepositoryRequest request = + * CreateRepositoryRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRepository(Repository.newBuilder().build()) + * .setRepositoryId("repositoryId2113747461") + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * secureSourceManagerClient.createRepositoryOperationCallable().futureCall(request); + * // Do something. + * Repository response = future.get(); + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * CreateRepositoryRequest request = + * CreateRepositoryRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setRepository(Repository.newBuilder().build()) + * .setRepositoryId("repositoryId2113747461") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.createRepositoryCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * secureSourceManagerClient.deleteRepositoryAsync(name).get(); + * } + * }+ * + * @param name Required. Name of the repository to delete. The format is + * projects/{project_number}/locations/{location_id}/repositories/{repository_id}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString(); + * secureSourceManagerClient.deleteRepositoryAsync(name).get(); + * } + * }+ * + * @param name Required. Name of the repository to delete. The format is + * projects/{project_number}/locations/{location_id}/repositories/{repository_id}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteRepositoryRequest request = + * DeleteRepositoryRequest.newBuilder() + * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setAllowMissing(true) + * .build(); + * secureSourceManagerClient.deleteRepositoryAsync(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
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteRepositoryRequest request = + * DeleteRepositoryRequest.newBuilder() + * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setAllowMissing(true) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * secureSourceManagerClient.deleteRepositoryOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
**Host: Data Plane** + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * DeleteRepositoryRequest request = + * DeleteRepositoryRequest.newBuilder() + * .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setAllowMissing(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.deleteRepositoryCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * Policy response = secureSourceManagerClient.getIamPolicyRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicyRepo(ResourceName resource) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return getIamPolicyRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get IAM policy for a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Policy response = secureSourceManagerClient.getIamPolicyRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicyRepo(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicyRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get IAM policy for a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * Policy response = secureSourceManagerClient.getIamPolicyRepo(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 getIamPolicyRepo(GetIamPolicyRequest request) { + return getIamPolicyRepoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get IAM policy for a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.getIamPolicyRepoCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * Policy response = secureSourceManagerClient.setIamPolicyRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicyRepo(ResourceName resource) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return setIamPolicyRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Set IAM policy on a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * Policy response = secureSourceManagerClient.setIamPolicyRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicyRepo(String resource) { + SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder().setResource(resource).build(); + return setIamPolicyRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Set IAM policy on a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Policy response = secureSourceManagerClient.setIamPolicyRepo(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 setIamPolicyRepo(SetIamPolicyRequest request) { + return setIamPolicyRepoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Set IAM policy on a repository. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.setIamPolicyRepoCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ResourceName resource = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]"); + * TestIamPermissionsResponse response = + * secureSourceManagerClient.testIamPermissionsRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissionsRepo(ResourceName resource) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return testIamPermissionsRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Test IAM permissions on a repository. IAM permission checks are not required on this method. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * String resource = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * TestIamPermissionsResponse response = + * secureSourceManagerClient.testIamPermissionsRepo(resource); + * } + * }+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissionsRepo(String resource) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder().setResource(resource).build(); + return testIamPermissionsRepo(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Test IAM permissions on a repository. IAM permission checks are not required on this method. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .addAllPermissions(new ArrayList+ * + * @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 testIamPermissionsRepo( + TestIamPermissionsRequest request) { + return testIamPermissionsRepoCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Test IAM permissions on a repository. IAM permission checks are not required on this method. + * + *()) + * .build(); + * TestIamPermissionsResponse response = + * secureSourceManagerClient.testIamPermissionsRepo(request); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * secureSourceManagerClient.testIamPermissionsRepoCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Location element : secureSourceManagerClient.listLocations(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.listLocationsPagedCallable().futureCall(request); + * // Do something. + * for (Location element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * ListLocationsRequest request = + * ListLocationsRequest.newBuilder() + * .setName("name3373707") + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListLocationsResponse response = + * secureSourceManagerClient.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
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * Location response = secureSourceManagerClient.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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.getLocationCallable().futureCall(request); + * // Do something. + * Location response = future.get(); + * } + * }
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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Policy response = secureSourceManagerClient.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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.setIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * Policy response = secureSourceManagerClient.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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * secureSourceManagerClient.getIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .addAllPermissions(new ArrayList+ * + * @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. + * + *()) + * .build(); + * TestIamPermissionsResponse response = secureSourceManagerClient.testIamPermissions(request); + * } + * }
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 (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * secureSourceManagerClient.testIamPermissionsCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getInstance to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * SecureSourceManagerSettings.Builder secureSourceManagerSettingsBuilder = + * SecureSourceManagerSettings.newBuilder(); + * secureSourceManagerSettingsBuilder + * .getInstanceSettings() + * .setRetrySettings( + * secureSourceManagerSettingsBuilder + * .getInstanceSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * SecureSourceManagerSettings secureSourceManagerSettings = + * secureSourceManagerSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class SecureSourceManagerSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= SecureSourceManagerClient =======================
+ *
+ * Service Description: Secure Source Manager API
+ *
+ * Access Secure Source Manager instances, resources, and repositories.
+ *
+ * This API is split across two servers: the Control Plane and the Data Plane.
+ *
+ * Data Plane endpoints are hosted directly by your Secure Source Manager instance, so you must
+ * connect to your instance's API hostname to access them. The API hostname looks like the
+ * following:
+ *
+ * https://[instance-id]-[project-number]-api.[location].sourcemanager.dev
+ *
+ * For example,
+ *
+ * https://my-instance-702770452863-api.us-central1.sourcemanager.dev
+ *
+ * Data Plane endpoints are denoted with **Host: Data Plane**.
+ *
+ * All other endpoints are found in the normal Cloud API location, namely,
+ * `securcesourcemanager.googleapis.com`.
+ *
+ * Sample for SecureSourceManagerClient:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcSecureSourceManagerCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcSecureSourceManagerStub extends SecureSourceManagerStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonSecureSourceManagerCallableFactory
+ implements HttpJsonStubCallableFactory{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecureSourceManagerClient secureSourceManagerClient = SecureSourceManagerClient.create()) {
+ * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ * Instance response = secureSourceManagerClient.getInstance(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.securesourcemanager.v1;
+
+import javax.annotation.Generated;
diff --git a/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/GrpcSecureSourceManagerCallableFactory.java b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/GrpcSecureSourceManagerCallableFactory.java
new file mode 100644
index 000000000000..37a6ee7cbf04
--- /dev/null
+++ b/java-securesourcemanager/google-cloud-securesourcemanager/src/main/java/com/google/cloud/securesourcemanager/v1/stub/GrpcSecureSourceManagerCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.securesourcemanager.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the SecureSourceManager service API.
+ *
+ *