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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * WorkloadName name = + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]"); + * Workload response = cloudControlsPartnerCoreClient.getWorkload(name); + * } + * }+ * + *
Note: close() needs to be called on the CloudControlsPartnerCoreClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
Method | + *Description | + *Method Variants | + *
---|---|---|
GetWorkload |
+ * Gets details of a single workload |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListWorkloads |
+ * Lists customer workloads for a given customer org id |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetCustomer |
+ * Gets details of a single customer |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListCustomers |
+ * Lists customers of a partner identified by its Google Cloud organization ID |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEkmConnections |
+ * Gets the EKM connections associated with a workload |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetPartnerPermissions |
+ * Gets the partner permissions granted for a workload |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListAccessApprovalRequests |
+ * Lists access requests associated with a workload |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetPartner |
+ * Get details of a Partner. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * CloudControlsPartnerCoreSettings 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 + * CloudControlsPartnerCoreSettings cloudControlsPartnerCoreSettings = + * CloudControlsPartnerCoreSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create(cloudControlsPartnerCoreSettings); + * }+ * + *
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 + * CloudControlsPartnerCoreSettings cloudControlsPartnerCoreSettings = + * CloudControlsPartnerCoreSettings.newBuilder().setEndpoint(myEndpoint).build(); + * CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create(cloudControlsPartnerCoreSettings); + * }+ * + *
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 + * CloudControlsPartnerCoreSettings cloudControlsPartnerCoreSettings = + * CloudControlsPartnerCoreSettings.newHttpJsonBuilder().build(); + * CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create(cloudControlsPartnerCoreSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class CloudControlsPartnerCoreClient implements BackgroundResource { + private final CloudControlsPartnerCoreSettings settings; + private final CloudControlsPartnerCoreStub stub; + + /** Constructs an instance of CloudControlsPartnerCoreClient with default settings. */ + public static final CloudControlsPartnerCoreClient create() throws IOException { + return create(CloudControlsPartnerCoreSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudControlsPartnerCoreClient, 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 CloudControlsPartnerCoreClient create( + CloudControlsPartnerCoreSettings settings) throws IOException { + return new CloudControlsPartnerCoreClient(settings); + } + + /** + * Constructs an instance of CloudControlsPartnerCoreClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(CloudControlsPartnerCoreSettings). + */ + public static final CloudControlsPartnerCoreClient create(CloudControlsPartnerCoreStub stub) { + return new CloudControlsPartnerCoreClient(stub); + } + + /** + * Constructs an instance of CloudControlsPartnerCoreClient, 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 CloudControlsPartnerCoreClient(CloudControlsPartnerCoreSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((CloudControlsPartnerCoreStubSettings) settings.getStubSettings()).createStub(); + } + + protected CloudControlsPartnerCoreClient(CloudControlsPartnerCoreStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CloudControlsPartnerCoreSettings getSettings() { + return settings; + } + + public CloudControlsPartnerCoreStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * WorkloadName name = + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]"); + * Workload response = cloudControlsPartnerCoreClient.getWorkload(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Workload getWorkload(WorkloadName name) { + GetWorkloadRequest request = + GetWorkloadRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getWorkload(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String name = + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]").toString(); + * Workload response = cloudControlsPartnerCoreClient.getWorkload(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Workload getWorkload(String name) { + GetWorkloadRequest request = GetWorkloadRequest.newBuilder().setName(name).build(); + return getWorkload(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetWorkloadRequest request = + * GetWorkloadRequest.newBuilder() + * .setName( + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * Workload response = cloudControlsPartnerCoreClient.getWorkload(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 Workload getWorkload(GetWorkloadRequest request) { + return getWorkloadCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetWorkloadRequest request = + * GetWorkloadRequest.newBuilder() + * .setName( + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.getWorkloadCallable().futureCall(request); + * // Do something. + * Workload 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * CustomerName parent = CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]"); + * for (Workload element : cloudControlsPartnerCoreClient.listWorkloads(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}/customers/{customer}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWorkloadsPagedResponse listWorkloads(CustomerName parent) { + ListWorkloadsRequest request = + ListWorkloadsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listWorkloads(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customer workloads for a given customer org id + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String parent = CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString(); + * for (Workload element : cloudControlsPartnerCoreClient.listWorkloads(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}/customers/{customer}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWorkloadsPagedResponse listWorkloads(String parent) { + ListWorkloadsRequest request = ListWorkloadsRequest.newBuilder().setParent(parent).build(); + return listWorkloads(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customer workloads for a given customer org id + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListWorkloadsRequest request = + * ListWorkloadsRequest.newBuilder() + * .setParent(CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Workload element : cloudControlsPartnerCoreClient.listWorkloads(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 ListWorkloadsPagedResponse listWorkloads(ListWorkloadsRequest request) { + return listWorkloadsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customer workloads for a given customer org id + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListWorkloadsRequest request = + * ListWorkloadsRequest.newBuilder() + * .setParent(CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.listWorkloadsPagedCallable().futureCall(request); + * // Do something. + * for (Workload 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListWorkloadsRequest request = + * ListWorkloadsRequest.newBuilder() + * .setParent(CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListWorkloadsResponse response = + * cloudControlsPartnerCoreClient.listWorkloadsCallable().call(request); + * for (Workload element : response.getWorkloadsList()) { + * // 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * CustomerName name = CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]"); + * Customer response = cloudControlsPartnerCoreClient.getCustomer(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Customer getCustomer(CustomerName name) { + GetCustomerRequest request = + GetCustomerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single customer + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String name = CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString(); + * Customer response = cloudControlsPartnerCoreClient.getCustomer(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Customer getCustomer(String name) { + GetCustomerRequest request = GetCustomerRequest.newBuilder().setName(name).build(); + return getCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single customer + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetCustomerRequest request = + * GetCustomerRequest.newBuilder() + * .setName(CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString()) + * .build(); + * Customer response = cloudControlsPartnerCoreClient.getCustomer(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 Customer getCustomer(GetCustomerRequest request) { + return getCustomerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single customer + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetCustomerRequest request = + * GetCustomerRequest.newBuilder() + * .setName(CustomerName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.getCustomerCallable().futureCall(request); + * // Do something. + * Customer 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]"); + * for (Customer element : cloudControlsPartnerCoreClient.listCustomers(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomersPagedResponse listCustomers(OrganizationLocationName parent) { + ListCustomersRequest request = + ListCustomersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCustomers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customers of a partner identified by its Google Cloud organization ID + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString(); + * for (Customer element : cloudControlsPartnerCoreClient.listCustomers(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCustomersPagedResponse listCustomers(String parent) { + ListCustomersRequest request = ListCustomersRequest.newBuilder().setParent(parent).build(); + return listCustomers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customers of a partner identified by its Google Cloud organization ID + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListCustomersRequest request = + * ListCustomersRequest.newBuilder() + * .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Customer element : cloudControlsPartnerCoreClient.listCustomers(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 ListCustomersPagedResponse listCustomers(ListCustomersRequest request) { + return listCustomersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists customers of a partner identified by its Google Cloud organization ID + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListCustomersRequest request = + * ListCustomersRequest.newBuilder() + * .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.listCustomersPagedCallable().futureCall(request); + * // Do something. + * for (Customer 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListCustomersRequest request = + * ListCustomersRequest.newBuilder() + * .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListCustomersResponse response = + * cloudControlsPartnerCoreClient.listCustomersCallable().call(request); + * for (Customer element : response.getCustomersList()) { + * // 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * EkmConnectionsName name = + * EkmConnectionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]"); + * EkmConnections response = cloudControlsPartnerCoreClient.getEkmConnections(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EkmConnections getEkmConnections(EkmConnectionsName name) { + GetEkmConnectionsRequest request = + GetEkmConnectionsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getEkmConnections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the EKM connections associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String name = + * EkmConnectionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString(); + * EkmConnections response = cloudControlsPartnerCoreClient.getEkmConnections(name); + * } + * }+ * + * @param name Required. Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EkmConnections getEkmConnections(String name) { + GetEkmConnectionsRequest request = GetEkmConnectionsRequest.newBuilder().setName(name).build(); + return getEkmConnections(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the EKM connections associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetEkmConnectionsRequest request = + * GetEkmConnectionsRequest.newBuilder() + * .setName( + * EkmConnectionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * EkmConnections response = cloudControlsPartnerCoreClient.getEkmConnections(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 EkmConnections getEkmConnections(GetEkmConnectionsRequest request) { + return getEkmConnectionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the EKM connections associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetEkmConnectionsRequest request = + * GetEkmConnectionsRequest.newBuilder() + * .setName( + * EkmConnectionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.getEkmConnectionsCallable().futureCall(request); + * // Do something. + * EkmConnections 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * PartnerPermissionsName name = + * PartnerPermissionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]"); + * PartnerPermissions response = cloudControlsPartnerCoreClient.getPartnerPermissions(name); + * } + * }+ * + * @param name Required. Name of the resource to get in the format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PartnerPermissions getPartnerPermissions(PartnerPermissionsName name) { + GetPartnerPermissionsRequest request = + GetPartnerPermissionsRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPartnerPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the partner permissions granted for a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String name = + * PartnerPermissionsName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString(); + * PartnerPermissions response = cloudControlsPartnerCoreClient.getPartnerPermissions(name); + * } + * }+ * + * @param name Required. Name of the resource to get in the format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PartnerPermissions getPartnerPermissions(String name) { + GetPartnerPermissionsRequest request = + GetPartnerPermissionsRequest.newBuilder().setName(name).build(); + return getPartnerPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the partner permissions granted for a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetPartnerPermissionsRequest request = + * GetPartnerPermissionsRequest.newBuilder() + * .setName( + * PartnerPermissionsName.of( + * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * PartnerPermissions response = cloudControlsPartnerCoreClient.getPartnerPermissions(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 PartnerPermissions getPartnerPermissions(GetPartnerPermissionsRequest request) { + return getPartnerPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the partner permissions granted for a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetPartnerPermissionsRequest request = + * GetPartnerPermissionsRequest.newBuilder() + * .setName( + * PartnerPermissionsName.of( + * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.getPartnerPermissionsCallable().futureCall(request); + * // Do something. + * PartnerPermissions 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * WorkloadName parent = + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]"); + * for (AccessApprovalRequest element : + * cloudControlsPartnerCoreClient.listAccessApprovalRequests(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccessApprovalRequestsPagedResponse listAccessApprovalRequests( + WorkloadName parent) { + ListAccessApprovalRequestsRequest request = + ListAccessApprovalRequestsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccessApprovalRequests(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists access requests associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String parent = + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]").toString(); + * for (AccessApprovalRequest element : + * cloudControlsPartnerCoreClient.listAccessApprovalRequests(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. Parent resource Format: + * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccessApprovalRequestsPagedResponse listAccessApprovalRequests(String parent) { + ListAccessApprovalRequestsRequest request = + ListAccessApprovalRequestsRequest.newBuilder().setParent(parent).build(); + return listAccessApprovalRequests(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists access requests associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListAccessApprovalRequestsRequest request = + * ListAccessApprovalRequestsRequest.newBuilder() + * .setParent( + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (AccessApprovalRequest element : + * cloudControlsPartnerCoreClient.listAccessApprovalRequests(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 ListAccessApprovalRequestsPagedResponse listAccessApprovalRequests( + ListAccessApprovalRequestsRequest request) { + return listAccessApprovalRequestsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists access requests associated with a workload + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListAccessApprovalRequestsRequest request = + * ListAccessApprovalRequestsRequest.newBuilder() + * .setParent( + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallable< + ListAccessApprovalRequestsRequest, ListAccessApprovalRequestsPagedResponse> + listAccessApprovalRequestsPagedCallable() { + return stub.listAccessApprovalRequestsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists access requests associated with a workload + * + *future = + * cloudControlsPartnerCoreClient + * .listAccessApprovalRequestsPagedCallable() + * .futureCall(request); + * // Do something. + * for (AccessApprovalRequest 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * ListAccessApprovalRequestsRequest request = + * ListAccessApprovalRequestsRequest.newBuilder() + * .setParent( + * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]") + * .toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListAccessApprovalRequestsResponse response = + * cloudControlsPartnerCoreClient.listAccessApprovalRequestsCallable().call(request); + * for (AccessApprovalRequest element : response.getAccessApprovalRequestsList()) { + * // 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 (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * PartnerName name = PartnerName.of("[ORGANIZATION]", "[LOCATION]"); + * Partner response = cloudControlsPartnerCoreClient.getPartner(name); + * } + * }+ * + * @param name Required. Format: `organizations/{organization}/locations/{location}/partner` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Partner getPartner(PartnerName name) { + GetPartnerRequest request = + GetPartnerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPartner(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a Partner. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * String name = PartnerName.of("[ORGANIZATION]", "[LOCATION]").toString(); + * Partner response = cloudControlsPartnerCoreClient.getPartner(name); + * } + * }+ * + * @param name Required. Format: `organizations/{organization}/locations/{location}/partner` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Partner getPartner(String name) { + GetPartnerRequest request = GetPartnerRequest.newBuilder().setName(name).build(); + return getPartner(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a Partner. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetPartnerRequest request = + * GetPartnerRequest.newBuilder() + * .setName(PartnerName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .build(); + * Partner response = cloudControlsPartnerCoreClient.getPartner(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 Partner getPartner(GetPartnerRequest request) { + return getPartnerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get details of a Partner. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient = + * CloudControlsPartnerCoreClient.create()) { + * GetPartnerRequest request = + * GetPartnerRequest.newBuilder() + * .setName(PartnerName.of("[ORGANIZATION]", "[LOCATION]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * cloudControlsPartnerCoreClient.getPartnerCallable().futureCall(request); + * // Do something. + * Partner 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 getWorkload 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 + * CloudControlsPartnerCoreSettings.Builder cloudControlsPartnerCoreSettingsBuilder = + * CloudControlsPartnerCoreSettings.newBuilder(); + * cloudControlsPartnerCoreSettingsBuilder + * .getWorkloadSettings() + * .setRetrySettings( + * cloudControlsPartnerCoreSettingsBuilder + * .getWorkloadSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * CloudControlsPartnerCoreSettings cloudControlsPartnerCoreSettings = + * cloudControlsPartnerCoreSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class CloudControlsPartnerCoreSettings + extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the CloudControlsPartnerMonitoringClient object to clean
+ * up resources such as threads. In the example above, try-with-resources is used, which
+ * automatically calls close().
+ *
+ * ListViolations Lists Violations for a workload Callers may also choose to read across multiple Customers or for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of {customer} & {workload}. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` Request object method variants only take one parameter, a request object, which must be constructed before the call. listViolations(ListViolationsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listViolations(WorkloadName parent)
+ * listViolations(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. listViolationsPagedCallable()
+ * listViolationsCallable()
+ * GetViolation Gets details of a single Violation. Request object method variants only take one parameter, a request object, which must be constructed before the call. getViolation(GetViolationRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getViolation(ViolationName name)
+ * getViolation(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. getViolationCallable()
+ * 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
+ * CloudControlsPartnerMonitoringSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class CloudControlsPartnerMonitoringClient implements BackgroundResource {
+ private final CloudControlsPartnerMonitoringSettings settings;
+ private final CloudControlsPartnerMonitoringStub stub;
+
+ /** Constructs an instance of CloudControlsPartnerMonitoringClient with default settings. */
+ public static final CloudControlsPartnerMonitoringClient create() throws IOException {
+ return create(CloudControlsPartnerMonitoringSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of CloudControlsPartnerMonitoringClient, 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 CloudControlsPartnerMonitoringClient create(
+ CloudControlsPartnerMonitoringSettings settings) throws IOException {
+ return new CloudControlsPartnerMonitoringClient(settings);
+ }
+
+ /**
+ * Constructs an instance of CloudControlsPartnerMonitoringClient, using the given stub for making
+ * calls. This is for advanced usage - prefer using
+ * create(CloudControlsPartnerMonitoringSettings).
+ */
+ public static final CloudControlsPartnerMonitoringClient create(
+ CloudControlsPartnerMonitoringStub stub) {
+ return new CloudControlsPartnerMonitoringClient(stub);
+ }
+
+ /**
+ * Constructs an instance of CloudControlsPartnerMonitoringClient, 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 CloudControlsPartnerMonitoringClient(CloudControlsPartnerMonitoringSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub =
+ ((CloudControlsPartnerMonitoringStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected CloudControlsPartnerMonitoringClient(CloudControlsPartnerMonitoringStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final CloudControlsPartnerMonitoringSettings getSettings() {
+ return settings;
+ }
+
+ public CloudControlsPartnerMonitoringStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Violations for a workload Callers may also choose to read across multiple Customers or
+ * for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or
+ * dash character) as a wildcard character instead of {customer} & {workload}. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 getViolation to 30 seconds:
+ *
+ * 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.
+ *
+ * ======================= CloudControlsPartnerCoreClient =======================
+ *
+ * Service Description: Service describing handlers for resources
+ *
+ * Sample for CloudControlsPartnerCoreClient:
+ *
+ * ======================= CloudControlsPartnerMonitoringClient =======================
+ *
+ * Service Description: Service describing handlers for resources
+ *
+ * Sample for CloudControlsPartnerMonitoringClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class CloudControlsPartnerCoreStub implements BackgroundResource {
+
+ public UnaryCallable 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 getWorkload to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class CloudControlsPartnerMonitoringStub implements BackgroundResource {
+
+ public UnaryCallable 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 getViolation to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcCloudControlsPartnerCoreCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcCloudControlsPartnerCoreStub extends CloudControlsPartnerCoreStub {
+ private static final MethodDescriptor{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ViolationName name =
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]");
+ * Violation response = cloudControlsPartnerMonitoringClient.getViolation(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerMonitoringSettings cloudControlsPartnerMonitoringSettings =
+ * CloudControlsPartnerMonitoringSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create(cloudControlsPartnerMonitoringSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerMonitoringSettings cloudControlsPartnerMonitoringSettings =
+ * CloudControlsPartnerMonitoringSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create(cloudControlsPartnerMonitoringSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerMonitoringSettings cloudControlsPartnerMonitoringSettings =
+ * CloudControlsPartnerMonitoringSettings.newHttpJsonBuilder().build();
+ * CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create(cloudControlsPartnerMonitoringSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * WorkloadName parent =
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]");
+ * for (Violation element :
+ * cloudControlsPartnerMonitoringClient.listViolations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent resource Format
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListViolationsPagedResponse listViolations(WorkloadName parent) {
+ ListViolationsRequest request =
+ ListViolationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listViolations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Violations for a workload Callers may also choose to read across multiple Customers or
+ * for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or
+ * dash character) as a wildcard character instead of {customer} & {workload}. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * String parent =
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]").toString();
+ * for (Violation element :
+ * cloudControlsPartnerMonitoringClient.listViolations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent resource Format
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListViolationsPagedResponse listViolations(String parent) {
+ ListViolationsRequest request = ListViolationsRequest.newBuilder().setParent(parent).build();
+ return listViolations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Violations for a workload Callers may also choose to read across multiple Customers or
+ * for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or
+ * dash character) as a wildcard character instead of {customer} & {workload}. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ListViolationsRequest request =
+ * ListViolationsRequest.newBuilder()
+ * .setParent(
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setInterval(Interval.newBuilder().build())
+ * .build();
+ * for (Violation element :
+ * cloudControlsPartnerMonitoringClient.listViolations(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 ListViolationsPagedResponse listViolations(ListViolationsRequest request) {
+ return listViolationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Violations for a workload Callers may also choose to read across multiple Customers or
+ * for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or
+ * dash character) as a wildcard character instead of {customer} & {workload}. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}`
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ListViolationsRequest request =
+ * ListViolationsRequest.newBuilder()
+ * .setParent(
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setInterval(Interval.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ListViolationsRequest request =
+ * ListViolationsRequest.newBuilder()
+ * .setParent(
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setInterval(Interval.newBuilder().build())
+ * .build();
+ * while (true) {
+ * ListViolationsResponse response =
+ * cloudControlsPartnerMonitoringClient.listViolationsCallable().call(request);
+ * for (Violation element : response.getViolationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ViolationName name =
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]");
+ * Violation response = cloudControlsPartnerMonitoringClient.getViolation(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Violation getViolation(ViolationName name) {
+ GetViolationRequest request =
+ GetViolationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getViolation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Violation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * String name =
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]")
+ * .toString();
+ * Violation response = cloudControlsPartnerMonitoringClient.getViolation(name);
+ * }
+ * }
+ *
+ * @param name Required. Format:
+ * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Violation getViolation(String name) {
+ GetViolationRequest request = GetViolationRequest.newBuilder().setName(name).build();
+ return getViolation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Violation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * GetViolationRequest request =
+ * GetViolationRequest.newBuilder()
+ * .setName(
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]")
+ * .toString())
+ * .build();
+ * Violation response = cloudControlsPartnerMonitoringClient.getViolation(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 Violation getViolation(GetViolationRequest request) {
+ return getViolationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Violation.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * GetViolationRequest request =
+ * GetViolationRequest.newBuilder()
+ * .setName(
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerMonitoringSettings.Builder cloudControlsPartnerMonitoringSettingsBuilder =
+ * CloudControlsPartnerMonitoringSettings.newBuilder();
+ * cloudControlsPartnerMonitoringSettingsBuilder
+ * .getViolationSettings()
+ * .setRetrySettings(
+ * cloudControlsPartnerMonitoringSettingsBuilder
+ * .getViolationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CloudControlsPartnerMonitoringSettings cloudControlsPartnerMonitoringSettings =
+ * cloudControlsPartnerMonitoringSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CloudControlsPartnerMonitoringSettings
+ extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerCoreClient cloudControlsPartnerCoreClient =
+ * CloudControlsPartnerCoreClient.create()) {
+ * WorkloadName name =
+ * WorkloadName.of("[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]");
+ * Workload response = cloudControlsPartnerCoreClient.getWorkload(name);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudControlsPartnerMonitoringClient cloudControlsPartnerMonitoringClient =
+ * CloudControlsPartnerMonitoringClient.create()) {
+ * ViolationName name =
+ * ViolationName.of(
+ * "[ORGANIZATION]", "[LOCATION]", "[CUSTOMER]", "[WORKLOAD]", "[VIOLATION]");
+ * Violation response = cloudControlsPartnerMonitoringClient.getViolation(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.cloudcontrolspartner.v1;
+
+import javax.annotation.Generated;
diff --git a/java-cloudcontrolspartner/google-cloud-cloudcontrolspartner/src/main/java/com/google/cloud/cloudcontrolspartner/v1/stub/CloudControlsPartnerCoreStub.java b/java-cloudcontrolspartner/google-cloud-cloudcontrolspartner/src/main/java/com/google/cloud/cloudcontrolspartner/v1/stub/CloudControlsPartnerCoreStub.java
new file mode 100644
index 000000000000..f8d7e78df13d
--- /dev/null
+++ b/java-cloudcontrolspartner/google-cloud-cloudcontrolspartner/src/main/java/com/google/cloud/cloudcontrolspartner/v1/stub/CloudControlsPartnerCoreStub.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.cloudcontrolspartner.v1.stub;
+
+import static com.google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCoreClient.ListAccessApprovalRequestsPagedResponse;
+import static com.google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCoreClient.ListCustomersPagedResponse;
+import static com.google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCoreClient.ListWorkloadsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.cloudcontrolspartner.v1.Customer;
+import com.google.cloud.cloudcontrolspartner.v1.EkmConnections;
+import com.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest;
+import com.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest;
+import com.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest;
+import com.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest;
+import com.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest;
+import com.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest;
+import com.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsResponse;
+import com.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest;
+import com.google.cloud.cloudcontrolspartner.v1.ListCustomersResponse;
+import com.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest;
+import com.google.cloud.cloudcontrolspartner.v1.ListWorkloadsResponse;
+import com.google.cloud.cloudcontrolspartner.v1.Partner;
+import com.google.cloud.cloudcontrolspartner.v1.PartnerPermissions;
+import com.google.cloud.cloudcontrolspartner.v1.Workload;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the CloudControlsPartnerCore service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerCoreStubSettings.Builder cloudControlsPartnerCoreSettingsBuilder =
+ * CloudControlsPartnerCoreStubSettings.newBuilder();
+ * cloudControlsPartnerCoreSettingsBuilder
+ * .getWorkloadSettings()
+ * .setRetrySettings(
+ * cloudControlsPartnerCoreSettingsBuilder
+ * .getWorkloadSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CloudControlsPartnerCoreStubSettings cloudControlsPartnerCoreSettings =
+ * cloudControlsPartnerCoreSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CloudControlsPartnerCoreStubSettings
+ extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CloudControlsPartnerMonitoringStubSettings.Builder
+ * cloudControlsPartnerMonitoringSettingsBuilder =
+ * CloudControlsPartnerMonitoringStubSettings.newBuilder();
+ * cloudControlsPartnerMonitoringSettingsBuilder
+ * .getViolationSettings()
+ * .setRetrySettings(
+ * cloudControlsPartnerMonitoringSettingsBuilder
+ * .getViolationSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CloudControlsPartnerMonitoringStubSettings cloudControlsPartnerMonitoringSettings =
+ * cloudControlsPartnerMonitoringSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CloudControlsPartnerMonitoringStubSettings
+ extends StubSettings