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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * Space response = designCenterClient.getSpace(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the DesignCenterClient 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 | + *
|---|---|---|
GetSpace |
+ * Gets details about a space. |
+ *
+ * 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. + *
|
+ *
ListSpaces |
+ * Lists spaces in a given project and location. |
+ *
+ * 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. + *
|
+ *
CreateSpace |
+ * Creates a space. |
+ *
+ * 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. + *
|
+ *
UpdateSpace |
+ * Updates a space. |
+ *
+ * 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. + *
|
+ *
DeleteSpace |
+ * Deletes a space. |
+ *
+ * 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. + *
|
+ *
GetApplicationTemplate |
+ * Gets details about an application template. |
+ *
+ * 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. + *
|
+ *
ListApplicationTemplates |
+ * Lists application templates in a given space. |
+ *
+ * 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. + *
|
+ *
CreateApplicationTemplate |
+ * Creates an application template. |
+ *
+ * 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. + *
|
+ *
UpdateApplicationTemplate |
+ * Updates an application template. |
+ *
+ * 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. + *
|
+ *
ImportApplicationTemplate |
+ * Imports to an existing application template from a given shared template. |
+ *
+ * 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. + *
|
+ *
DeleteApplicationTemplate |
+ * Deletes an application template. |
+ *
+ * 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. + *
|
+ *
CommitApplicationTemplate |
+ * Commits an application template to create a new revision. |
+ *
+ * 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. + *
|
+ *
SnapshotApplicationTemplate |
+ * Snapshots an application template to create a new revision asynchronously. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GenerateApplicationTemplateIaC |
+ * Generates Terraform files for an application template. This is a SYNCHRONOUS operation and returns the generated IaC directly in the response. It does NOT download external module sources; it only uses remote sources. |
+ *
+ * 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. + *
|
+ *
ExportApplicationTemplateIaC |
+ * Exports Terraform files for an application template. The generated modules can have remote sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that returns a Long Running Operation. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GenerateApplicationTemplateRevisionIaC |
+ * Generates Terraform files for an application template revision. This is a SYNCHRONOUS operation and returns the generated IaC directly in the response. It does NOT download external module sources; it only uses remote sources. |
+ *
+ * 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. + *
|
+ *
ExportApplicationTemplateRevisionIaC |
+ * Exports Terraform files for an application template revision. The generated modules can have remote sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that returns a Long Running Operation. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetComponent |
+ * Gets details about a Component. |
+ *
+ * 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. + *
|
+ *
ListComponents |
+ * Lists components in an application template. |
+ *
+ * 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. + *
|
+ *
CreateComponent |
+ * Creates a component. |
+ *
+ * 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. + *
|
+ *
UpdateComponent |
+ * Updates a component. |
+ *
+ * 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. + *
|
+ *
DeleteComponent |
+ * Deletes a component. |
+ *
+ * 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. + *
|
+ *
GetConnection |
+ * Gets details about a connection. |
+ *
+ * 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. + *
|
+ *
ListConnections |
+ * Lists connections in an application template. |
+ *
+ * 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. + *
|
+ *
CreateConnection |
+ * Creates a connection. |
+ *
+ * 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. + *
|
+ *
UpdateConnection |
+ * Updates a connection. |
+ *
+ * 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. + *
|
+ *
DeleteConnection |
+ * Deletes a connection. |
+ *
+ * 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. + *
|
+ *
GetApplicationTemplateRevision |
+ * Gets details about an application template revision. |
+ *
+ * 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. + *
|
+ *
ListApplicationTemplateRevisions |
+ * Lists application template revisions in a given application template. |
+ *
+ * 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. + *
|
+ *
DeleteApplicationTemplateRevision |
+ * Deletes an application template revision. |
+ *
+ * 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. + *
|
+ *
GetCatalog |
+ * Gets details about a catalog. |
+ *
+ * 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. + *
|
+ *
ListCatalogs |
+ * Lists catalogs in a given space. |
+ *
+ * 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. + *
|
+ *
CreateCatalog |
+ * Creates a catalog. |
+ *
+ * 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. + *
|
+ *
UpdateCatalog |
+ * Updates a catalog. |
+ *
+ * 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. + *
|
+ *
DeleteCatalog |
+ * Deletes a catalog. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateCatalogTemplate |
+ * Adds a template to a catalog. |
+ *
+ * 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. + *
|
+ *
GetCatalogTemplate |
+ * Gets a catalog template. |
+ *
+ * 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. + *
|
+ *
ListCatalogTemplates |
+ * Lists catalog templates. |
+ *
+ * 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. + *
|
+ *
UpdateCatalogTemplate |
+ * Updates a catalog template resource. |
+ *
+ * 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. + *
|
+ *
DeleteCatalogTemplate |
+ * Deletes a catalog template. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateShare |
+ * Shares a catalog from one space to another space. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListShares |
+ * Lists catalog share objects for the space. |
+ *
+ * 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. + *
|
+ *
GetShare |
+ * Get catalog share object for the space. |
+ *
+ * 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. + *
|
+ *
DeleteShare |
+ * Deletes a catalog share. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SyncShare |
+ * Synchronizes a share and updates the destination workspace to reflect. reflect the most recent changes to the catalog. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetSharedTemplate |
+ * Gets details about a shared template. |
+ *
+ * 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. + *
|
+ *
ListSharedTemplates |
+ * Lists shared templates in a given space. |
+ *
+ * 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. + *
|
+ *
GetSharedTemplateRevision |
+ * Gets details about a shared template revision. |
+ *
+ * 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. + *
|
+ *
ListSharedTemplateRevisions |
+ * Lists shared template revisions in a given space. |
+ *
+ * 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. + *
|
+ *
CreateCatalogTemplateRevision |
+ * Creates a template revision. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetCatalogTemplateRevision |
+ * Gets details about a template revision. |
+ *
+ * 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. + *
|
+ *
ListCatalogTemplateRevisions |
+ * Lists template revisions. |
+ *
+ * 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. + *
|
+ *
DeleteCatalogTemplateRevision |
+ * Deletes a template revision. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateApplication |
+ * Creates an application. |
+ *
+ * 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. + *
|
+ *
GetApplication |
+ * Gets details about an application. |
+ *
+ * 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. + *
|
+ *
ListApplications |
+ * Lists applications in a given space. |
+ *
+ * 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. + *
|
+ *
UpdateApplication |
+ * Updates an application. |
+ *
+ * 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. + *
|
+ *
DeleteApplication |
+ * Deletes an application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeployApplication |
+ * Deploys an application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
PreviewApplication |
+ * Previews deployment of an application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
FetchApplicationAssessmentReport |
+ * Fetches the assessment report of a deployed application if present. |
+ *
+ * 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. + *
|
+ *
GenerateApplicationAssessmentReport |
+ * Generate Assessment Reports of an application. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GenerateApplicationTemplateAssessmentReport |
+ * Generate Assessment Reports of an application template. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GenerateAssessmentReport |
+ * Deprecated: Use GenerateTerraformPlanAssessmentReport instead. + * Generate a best practice report for a given Terraform plan. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GenerateTerraformPlanAssessmentReport |
+ * Generate a Terraform plan assessment report for a given Terraform plan. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetPolicy |
+ * Policy related APIs. Get a policy for an application template. |
+ *
+ * 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. + *
|
+ *
ListPolicies |
+ * Lists policies for an application template. |
+ *
+ * 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. + *
|
+ *
CreatePolicy |
+ * Creates a policy for an application template. |
+ *
+ * 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. + *
|
+ *
UpdatePolicy |
+ * Updates a policy. |
+ *
+ * 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. + *
|
+ *
DeletePolicy |
+ * Deletes a policy. |
+ *
+ * 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. + *
|
+ *
FetchFrameworks |
+ * Fetches all frameworks for assessment report. |
+ *
+ * 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. + *
|
+ *
GenerateApplicationIaC |
+ * Generates Terraform files for an application. |
+ *
+ * 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. + *
|
+ *
ExportApplicationIaC |
+ * Exports Terraform files for an application asynchronously. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ImportApplicationTemplateIaC |
+ * Imports IaC for an application template. |
+ *
+ * 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. + *
|
+ *
IngestApplicationTemplateIaC |
+ * Ingests IaC for an application template asynchronously. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ImportApplicationIaC |
+ * Imports IaC for an application resource. |
+ *
+ * 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. + *
|
+ *
RegisterAppHubApplicationResources |
+ * Register deployed resources from terraform state file with App Hub without needing a space. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListApplicationTemplateSystemRevisions |
+ * Lists application template system revisions in a given application template. |
+ *
+ * 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. + *
|
+ *
GetApplicationTemplateSystemRevision |
+ * Gets the given application template system revision. |
+ *
+ * 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. + *
|
+ *
RecommendIAMRoles |
+ * Gets recommended IAM roles for an application. + * Evaluates the infrastructure resources defined by an application (including its template configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you must configure before you deploy across target projects. + * The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API recommendations. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. + * This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + * For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SetIamPolicy |
+ * Sets the access control policy on the specified resource. Replacesany existing policy. + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIamPolicy |
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
TestIamPermissions |
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
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 DesignCenterSettings 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
+ * DesignCenterSettings designCenterSettings =
+ * DesignCenterSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DesignCenterClient designCenterClient = DesignCenterClient.create(designCenterSettings);
+ * }
+ *
+ * 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
+ * DesignCenterSettings designCenterSettings =
+ * DesignCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DesignCenterClient designCenterClient = DesignCenterClient.create(designCenterSettings);
+ * }
+ *
+ * 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
+ * DesignCenterSettings designCenterSettings = DesignCenterSettings.newHttpJsonBuilder().build();
+ * DesignCenterClient designCenterClient = DesignCenterClient.create(designCenterSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class DesignCenterClient implements BackgroundResource { + private final @Nullable DesignCenterSettings settings; + private final DesignCenterStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DesignCenterClient with default settings. */ + public static final DesignCenterClient create() throws IOException { + return create(DesignCenterSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DesignCenterClient, 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 DesignCenterClient create(DesignCenterSettings settings) throws IOException { + return new DesignCenterClient(settings); + } + + /** + * Constructs an instance of DesignCenterClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(DesignCenterSettings). + */ + public static final DesignCenterClient create(DesignCenterStub stub) { + return new DesignCenterClient(stub); + } + + /** + * Constructs an instance of DesignCenterClient, 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 DesignCenterClient(DesignCenterSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DesignCenterStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DesignCenterClient(DesignCenterStub 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 @Nullable DesignCenterSettings getSettings() { + return settings; + } + + public DesignCenterStub 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. + /** + * Gets details about a space. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * Space response = designCenterClient.getSpace(name);
+ * }
+ * }
+ *
+ * @param name Required. The space name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Space getSpace(@Nullable SpaceName name) {
+ GetSpaceRequest request =
+ GetSpaceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * Space response = designCenterClient.getSpace(name);
+ * }
+ * }
+ *
+ * @param name Required. The space name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Space getSpace(String name) {
+ GetSpaceRequest request = GetSpaceRequest.newBuilder().setName(name).build();
+ return getSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSpaceRequest request =
+ * GetSpaceRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .build();
+ * Space response = designCenterClient.getSpace(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 Space getSpace(GetSpaceRequest request) {
+ return getSpaceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSpaceRequest request =
+ * GetSpaceRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getSpaceCallable().futureCall(request);
+ * // Do something.
+ * Space response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Space element : designCenterClient.listSpaces(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource, for which spaces are listed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSpacesPagedResponse listSpaces(@Nullable LocationName parent) {
+ ListSpacesRequest request =
+ ListSpacesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSpaces(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists spaces 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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Space element : designCenterClient.listSpaces(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource, for which spaces are listed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSpacesPagedResponse listSpaces(String parent) {
+ ListSpacesRequest request = ListSpacesRequest.newBuilder().setParent(parent).build();
+ return listSpaces(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists spaces 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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSpacesRequest request =
+ * ListSpacesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Space element : designCenterClient.listSpaces(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 ListSpacesPagedResponse listSpaces(ListSpacesRequest request) {
+ return listSpacesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists spaces 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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSpacesRequest request =
+ * ListSpacesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = designCenterClient.listSpacesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Space element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSpacesRequest request =
+ * ListSpacesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSpacesResponse response = designCenterClient.listSpacesCallable().call(request);
+ * for (Space element : response.getSpacesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Space space = Space.newBuilder().build();
+ * String spaceId = "spaceId-2012163903";
+ * Space response = designCenterClient.createSpace(parent, space, spaceId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent in which to create a space.
+ * @param space Required. The space to create.
+ * @param spaceId Required. The ID of the space to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Space createSpace(@Nullable LocationName parent, Space space, String spaceId) {
+ CreateSpaceRequest request =
+ CreateSpaceRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setSpace(space)
+ .setSpaceId(spaceId)
+ .build();
+ return createSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Space space = Space.newBuilder().build();
+ * String spaceId = "spaceId-2012163903";
+ * Space response = designCenterClient.createSpace(parent, space, spaceId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent in which to create a space.
+ * @param space Required. The space to create.
+ * @param spaceId Required. The ID of the space to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Space createSpace(String parent, Space space, String spaceId) {
+ CreateSpaceRequest request =
+ CreateSpaceRequest.newBuilder()
+ .setParent(parent)
+ .setSpace(space)
+ .setSpaceId(spaceId)
+ .build();
+ return createSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateSpaceRequest request =
+ * CreateSpaceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSpaceId("spaceId-2012163903")
+ * .setSpace(Space.newBuilder().build())
+ * .build();
+ * Space response = designCenterClient.createSpace(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 Space createSpace(CreateSpaceRequest request) {
+ return createSpaceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateSpaceRequest request =
+ * CreateSpaceRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSpaceId("spaceId-2012163903")
+ * .setSpace(Space.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.createSpaceCallable().futureCall(request);
+ * // Do something.
+ * Space response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Space space = Space.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Space response = designCenterClient.updateSpace(space, updateMask);
+ * }
+ * }
+ *
+ * @param space Required. The space to update.
+ * @param updateMask Optional. The fields to overwrite in the space update. If you don't provide a
+ * mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Space updateSpace(Space space, FieldMask updateMask) {
+ UpdateSpaceRequest request =
+ UpdateSpaceRequest.newBuilder().setSpace(space).setUpdateMask(updateMask).build();
+ return updateSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateSpaceRequest request =
+ * UpdateSpaceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSpace(Space.newBuilder().build())
+ * .build();
+ * Space response = designCenterClient.updateSpace(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 Space updateSpace(UpdateSpaceRequest request) {
+ return updateSpaceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateSpaceRequest request =
+ * UpdateSpaceRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSpace(Space.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.updateSpaceCallable().futureCall(request);
+ * // Do something.
+ * Space response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * designCenterClient.deleteSpace(name);
+ * }
+ * }
+ *
+ * @param name Required. The space name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSpace(@Nullable SpaceName name) {
+ DeleteSpaceRequest request =
+ DeleteSpaceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * designCenterClient.deleteSpace(name);
+ * }
+ * }
+ *
+ * @param name Required. The space name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSpace(String name) {
+ DeleteSpaceRequest request = DeleteSpaceRequest.newBuilder().setName(name).build();
+ deleteSpace(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteSpaceRequest request =
+ * DeleteSpaceRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteSpace(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSpace(DeleteSpaceRequest request) {
+ deleteSpaceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteSpaceRequest request =
+ * DeleteSpaceRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future = designCenterClient.deleteSpaceCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * ApplicationTemplate response = designCenterClient.getApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate getApplicationTemplate(@Nullable ApplicationTemplateName name) {
+ GetApplicationTemplateRequest request =
+ GetApplicationTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * ApplicationTemplate response = designCenterClient.getApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate getApplicationTemplate(String name) {
+ GetApplicationTemplateRequest request =
+ GetApplicationTemplateRequest.newBuilder().setName(name).build();
+ return getApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateRequest request =
+ * GetApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApplicationTemplate response = designCenterClient.getApplicationTemplate(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 ApplicationTemplate getApplicationTemplate(GetApplicationTemplateRequest request) {
+ return getApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateRequest request =
+ * GetApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * for (ApplicationTemplate element :
+ * designCenterClient.listApplicationTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to list application templates.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplatesPagedResponse listApplicationTemplates(
+ @Nullable SpaceName parent) {
+ ListApplicationTemplatesRequest request =
+ ListApplicationTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listApplicationTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * for (ApplicationTemplate element :
+ * designCenterClient.listApplicationTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to list application templates.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplatesPagedResponse listApplicationTemplates(String parent) {
+ ListApplicationTemplatesRequest request =
+ ListApplicationTemplatesRequest.newBuilder().setParent(parent).build();
+ return listApplicationTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplatesRequest request =
+ * ListApplicationTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (ApplicationTemplate element :
+ * designCenterClient.listApplicationTemplates(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 ListApplicationTemplatesPagedResponse listApplicationTemplates(
+ ListApplicationTemplatesRequest request) {
+ return listApplicationTemplatesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplatesRequest request =
+ * ListApplicationTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listApplicationTemplatesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ApplicationTemplate element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplatesRequest request =
+ * ListApplicationTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListApplicationTemplatesResponse response =
+ * designCenterClient.listApplicationTemplatesCallable().call(request);
+ * for (ApplicationTemplate element : response.getApplicationTemplatesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * ApplicationTemplate applicationTemplate = ApplicationTemplate.newBuilder().build();
+ * String applicationTemplateId = "applicationTemplateId-1557848923";
+ * ApplicationTemplate response =
+ * designCenterClient.createApplicationTemplate(
+ * parent, applicationTemplate, applicationTemplateId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the application template.
+ * @param applicationTemplate Required. The application template to create.
+ * @param applicationTemplateId Required. The ID of the application template to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate createApplicationTemplate(
+ @Nullable SpaceName parent,
+ ApplicationTemplate applicationTemplate,
+ String applicationTemplateId) {
+ CreateApplicationTemplateRequest request =
+ CreateApplicationTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setApplicationTemplate(applicationTemplate)
+ .setApplicationTemplateId(applicationTemplateId)
+ .build();
+ return createApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * ApplicationTemplate applicationTemplate = ApplicationTemplate.newBuilder().build();
+ * String applicationTemplateId = "applicationTemplateId-1557848923";
+ * ApplicationTemplate response =
+ * designCenterClient.createApplicationTemplate(
+ * parent, applicationTemplate, applicationTemplateId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the application template.
+ * @param applicationTemplate Required. The application template to create.
+ * @param applicationTemplateId Required. The ID of the application template to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate createApplicationTemplate(
+ String parent, ApplicationTemplate applicationTemplate, String applicationTemplateId) {
+ CreateApplicationTemplateRequest request =
+ CreateApplicationTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setApplicationTemplate(applicationTemplate)
+ .setApplicationTemplateId(applicationTemplateId)
+ .build();
+ return createApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateApplicationTemplateRequest request =
+ * CreateApplicationTemplateRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setApplicationTemplateId("applicationTemplateId-1557848923")
+ * .setApplicationTemplate(ApplicationTemplate.newBuilder().build())
+ * .build();
+ * ApplicationTemplate response = designCenterClient.createApplicationTemplate(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 ApplicationTemplate createApplicationTemplate(
+ CreateApplicationTemplateRequest request) {
+ return createApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateApplicationTemplateRequest request =
+ * CreateApplicationTemplateRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setApplicationTemplateId("applicationTemplateId-1557848923")
+ * .setApplicationTemplate(ApplicationTemplate.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplate applicationTemplate = ApplicationTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ApplicationTemplate response =
+ * designCenterClient.updateApplicationTemplate(applicationTemplate, updateMask);
+ * }
+ * }
+ *
+ * @param applicationTemplate Required. The application template to update.
+ * @param updateMask Optional. The fields to overwrite in the application template update. The
+ * fields specified in the update_mask are relative to the resource, not the full request. A
+ * field will be overwritten if it is in the mask. If you don't provide a mask, all fields are
+ * overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate updateApplicationTemplate(
+ ApplicationTemplate applicationTemplate, FieldMask updateMask) {
+ UpdateApplicationTemplateRequest request =
+ UpdateApplicationTemplateRequest.newBuilder()
+ .setApplicationTemplate(applicationTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateApplicationTemplateRequest request =
+ * UpdateApplicationTemplateRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setApplicationTemplate(ApplicationTemplate.newBuilder().build())
+ * .build();
+ * ApplicationTemplate response = designCenterClient.updateApplicationTemplate(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 ApplicationTemplate updateApplicationTemplate(
+ UpdateApplicationTemplateRequest request) {
+ return updateApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateApplicationTemplateRequest request =
+ * UpdateApplicationTemplateRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setApplicationTemplate(ApplicationTemplate.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.updateApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * ApplicationTemplateRevisionName applicationTemplateRevisionUri =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * ApplicationTemplate response =
+ * designCenterClient.importApplicationTemplate(name, applicationTemplateRevisionUri);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @param applicationTemplateRevisionUri Optional. The source URI for application template
+ * revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate importApplicationTemplate(
+ @Nullable ApplicationTemplateName name,
+ @Nullable ApplicationTemplateRevisionName applicationTemplateRevisionUri) {
+ ImportApplicationTemplateRequest request =
+ ImportApplicationTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setApplicationTemplateRevisionUri(
+ applicationTemplateRevisionUri == null
+ ? null
+ : applicationTemplateRevisionUri.toString())
+ .build();
+ return importApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports to an existing application template from a given shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * String applicationTemplateRevisionUri =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * ApplicationTemplate response =
+ * designCenterClient.importApplicationTemplate(name, applicationTemplateRevisionUri);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @param applicationTemplateRevisionUri Optional. The source URI for application template
+ * revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate importApplicationTemplate(
+ @Nullable ApplicationTemplateName name, String applicationTemplateRevisionUri) {
+ ImportApplicationTemplateRequest request =
+ ImportApplicationTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setApplicationTemplateRevisionUri(applicationTemplateRevisionUri)
+ .build();
+ return importApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports to an existing application template from a given shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * ApplicationTemplateRevisionName applicationTemplateRevisionUri =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * ApplicationTemplate response =
+ * designCenterClient.importApplicationTemplate(name, applicationTemplateRevisionUri);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @param applicationTemplateRevisionUri Optional. The source URI for application template
+ * revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate importApplicationTemplate(
+ String name, @Nullable ApplicationTemplateRevisionName applicationTemplateRevisionUri) {
+ ImportApplicationTemplateRequest request =
+ ImportApplicationTemplateRequest.newBuilder()
+ .setName(name)
+ .setApplicationTemplateRevisionUri(
+ applicationTemplateRevisionUri == null
+ ? null
+ : applicationTemplateRevisionUri.toString())
+ .build();
+ return importApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports to an existing application template from a given shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * String applicationTemplateRevisionUri =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * ApplicationTemplate response =
+ * designCenterClient.importApplicationTemplate(name, applicationTemplateRevisionUri);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @param applicationTemplateRevisionUri Optional. The source URI for application template
+ * revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplate importApplicationTemplate(
+ String name, String applicationTemplateRevisionUri) {
+ ImportApplicationTemplateRequest request =
+ ImportApplicationTemplateRequest.newBuilder()
+ .setName(name)
+ .setApplicationTemplateRevisionUri(applicationTemplateRevisionUri)
+ .build();
+ return importApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports to an existing application template from a given shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationTemplateRequest request =
+ * ImportApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .putAllAnnotations(new HashMap())
+ * .build();
+ * ApplicationTemplate response = designCenterClient.importApplicationTemplate(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 ApplicationTemplate importApplicationTemplate(
+ ImportApplicationTemplateRequest request) {
+ return importApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports to an existing application template from a given shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationTemplateRequest request =
+ * ImportApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .putAllAnnotations(new HashMap())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.importApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * designCenterClient.deleteApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplate(@Nullable ApplicationTemplateName name) {
+ DeleteApplicationTemplateRequest request =
+ DeleteApplicationTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * designCenterClient.deleteApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplate(String name) {
+ DeleteApplicationTemplateRequest request =
+ DeleteApplicationTemplateRequest.newBuilder().setName(name).build();
+ deleteApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationTemplateRequest request =
+ * DeleteApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteApplicationTemplate(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplate(DeleteApplicationTemplateRequest request) {
+ deleteApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationTemplateRequest request =
+ * DeleteApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deleteApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * ApplicationTemplateRevision response = designCenterClient.commitApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateRevision commitApplicationTemplate(
+ @Nullable ApplicationTemplateName name) {
+ CommitApplicationTemplateRequest request =
+ CommitApplicationTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return commitApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Commits an application template to create a new revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * ApplicationTemplateRevision response = designCenterClient.commitApplicationTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateRevision commitApplicationTemplate(String name) {
+ CommitApplicationTemplateRequest request =
+ CommitApplicationTemplateRequest.newBuilder().setName(name).build();
+ return commitApplicationTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Commits an application template to create a new revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CommitApplicationTemplateRequest request =
+ * CommitApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApplicationTemplateRevision response = designCenterClient.commitApplicationTemplate(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 ApplicationTemplateRevision commitApplicationTemplate(
+ CommitApplicationTemplateRequest request) {
+ return commitApplicationTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Commits an application template to create a new revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CommitApplicationTemplateRequest request =
+ * CommitApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.commitApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplateRevision response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * SnapshotApplicationTemplateResponse response =
+ * designCenterClient.snapshotApplicationTemplateAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * SnapshotApplicationTemplateResponse response =
+ * designCenterClient.snapshotApplicationTemplateAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SnapshotApplicationTemplateRequest request =
+ * SnapshotApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * SnapshotApplicationTemplateResponse response =
+ * designCenterClient.snapshotApplicationTemplateAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SnapshotApplicationTemplateRequest request =
+ * SnapshotApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.snapshotApplicationTemplateOperationCallable().futureCall(request);
+ * // Do something.
+ * SnapshotApplicationTemplateResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ SnapshotApplicationTemplateRequest,
+ SnapshotApplicationTemplateResponse,
+ OperationMetadata>
+ snapshotApplicationTemplateOperationCallable() {
+ return stub.snapshotApplicationTemplateOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Snapshots an application template to create a new revision asynchronously.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SnapshotApplicationTemplateRequest request =
+ * SnapshotApplicationTemplateRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.snapshotApplicationTemplateCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * GenerateApplicationTemplateIaCResponse response =
+ * designCenterClient.generateApplicationTemplateIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationTemplateIaCResponse generateApplicationTemplateIaC(
+ @Nullable ApplicationTemplateName name) {
+ GenerateApplicationTemplateIaCRequest request =
+ GenerateApplicationTemplateIaCRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return generateApplicationTemplateIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template. This is a SYNCHRONOUS operation and
+ * returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * GenerateApplicationTemplateIaCResponse response =
+ * designCenterClient.generateApplicationTemplateIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationTemplateIaCResponse generateApplicationTemplateIaC(String name) {
+ GenerateApplicationTemplateIaCRequest request =
+ GenerateApplicationTemplateIaCRequest.newBuilder().setName(name).build();
+ return generateApplicationTemplateIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template. This is a SYNCHRONOUS operation and
+ * returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateIaCRequest request =
+ * GenerateApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setGcsUri("gcsUri-1251224875")
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * GenerateApplicationTemplateIaCResponse response =
+ * designCenterClient.generateApplicationTemplateIaC(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 GenerateApplicationTemplateIaCResponse generateApplicationTemplateIaC(
+ GenerateApplicationTemplateIaCRequest request) {
+ return generateApplicationTemplateIaCCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template. This is a SYNCHRONOUS operation and
+ * returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateIaCRequest request =
+ * GenerateApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setGcsUri("gcsUri-1251224875")
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateApplicationTemplateIaCCallable().futureCall(request);
+ * // Do something.
+ * GenerateApplicationTemplateIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GenerateApplicationTemplateIaCRequest, GenerateApplicationTemplateIaCResponse>
+ generateApplicationTemplateIaCCallable() {
+ return stub.generateApplicationTemplateIaCCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Terraform files for an application template. The generated modules can have remote
+ * sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that returns
+ * a Long Running Operation.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * ExportApplicationTemplateIaCResponse response =
+ * designCenterClient.exportApplicationTemplateIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * ExportApplicationTemplateIaCResponse response =
+ * designCenterClient.exportApplicationTemplateIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateIaCRequest request =
+ * ExportApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ExportApplicationTemplateIaCResponse response =
+ * designCenterClient.exportApplicationTemplateIaCAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateIaCRequest request =
+ * ExportApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.exportApplicationTemplateIaCOperationCallable().futureCall(request);
+ * // Do something.
+ * ExportApplicationTemplateIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ ExportApplicationTemplateIaCRequest,
+ ExportApplicationTemplateIaCResponse,
+ OperationMetadata>
+ exportApplicationTemplateIaCOperationCallable() {
+ return stub.exportApplicationTemplateIaCOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Terraform files for an application template. The generated modules can have remote
+ * sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that returns
+ * a Long Running Operation.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateIaCRequest request =
+ * ExportApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.exportApplicationTemplateIaCCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateRevisionName name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * GenerateApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.generateApplicationTemplateRevisionIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationTemplateRevisionIaCResponse
+ generateApplicationTemplateRevisionIaC(@Nullable ApplicationTemplateRevisionName name) {
+ GenerateApplicationTemplateRevisionIaCRequest request =
+ GenerateApplicationTemplateRevisionIaCRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return generateApplicationTemplateRevisionIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template revision. This is a SYNCHRONOUS operation
+ * and returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * GenerateApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.generateApplicationTemplateRevisionIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationTemplateRevisionIaCResponse
+ generateApplicationTemplateRevisionIaC(String name) {
+ GenerateApplicationTemplateRevisionIaCRequest request =
+ GenerateApplicationTemplateRevisionIaCRequest.newBuilder().setName(name).build();
+ return generateApplicationTemplateRevisionIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template revision. This is a SYNCHRONOUS operation
+ * and returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateRevisionIaCRequest request =
+ * GenerateApplicationTemplateRevisionIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * GenerateApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.generateApplicationTemplateRevisionIaC(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 GenerateApplicationTemplateRevisionIaCResponse
+ generateApplicationTemplateRevisionIaC(
+ GenerateApplicationTemplateRevisionIaCRequest request) {
+ return generateApplicationTemplateRevisionIaCCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application template revision. This is a SYNCHRONOUS operation
+ * and returns the generated IaC directly in the response. It does NOT download external module
+ * sources; it only uses remote sources.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateRevisionIaCRequest request =
+ * GenerateApplicationTemplateRevisionIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateApplicationTemplateRevisionIaCCallable().futureCall(request);
+ * // Do something.
+ * GenerateApplicationTemplateRevisionIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GenerateApplicationTemplateRevisionIaCRequest,
+ GenerateApplicationTemplateRevisionIaCResponse>
+ generateApplicationTemplateRevisionIaCCallable() {
+ return stub.generateApplicationTemplateRevisionIaCCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Terraform files for an application template revision. The generated modules can have
+ * remote sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that
+ * returns a Long Running Operation.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateRevisionName name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * ExportApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.exportApplicationTemplateRevisionIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * ExportApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.exportApplicationTemplateRevisionIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template revision.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateRevisionIaCRequest request =
+ * ExportApplicationTemplateRevisionIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ExportApplicationTemplateRevisionIaCResponse response =
+ * designCenterClient.exportApplicationTemplateRevisionIaCAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateRevisionIaCRequest request =
+ * ExportApplicationTemplateRevisionIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient
+ * .exportApplicationTemplateRevisionIaCOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * ExportApplicationTemplateRevisionIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ ExportApplicationTemplateRevisionIaCRequest,
+ ExportApplicationTemplateRevisionIaCResponse,
+ OperationMetadata>
+ exportApplicationTemplateRevisionIaCOperationCallable() {
+ return stub.exportApplicationTemplateRevisionIaCOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Terraform files for an application template revision. The generated modules can have
+ * remote sources or local sources downloaded from remote. This is an ASYNCHRONOUS operation that
+ * returns a Long Running Operation.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationTemplateRevisionIaCRequest request =
+ * ExportApplicationTemplateRevisionIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.exportApplicationTemplateRevisionIaCCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ComponentName name =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]");
+ * Component response = designCenterClient.getComponent(name);
+ * }
+ * }
+ *
+ * @param name Required. The component name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Component getComponent(@Nullable ComponentName name) {
+ GetComponentRequest request =
+ GetComponentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]")
+ * .toString();
+ * Component response = designCenterClient.getComponent(name);
+ * }
+ * }
+ *
+ * @param name Required. The component name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Component getComponent(String name) {
+ GetComponentRequest request = GetComponentRequest.newBuilder().setName(name).build();
+ return getComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetComponentRequest request =
+ * GetComponentRequest.newBuilder()
+ * .setName(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .build();
+ * Component response = designCenterClient.getComponent(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 Component getComponent(GetComponentRequest request) {
+ return getComponentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetComponentRequest request =
+ * GetComponentRequest.newBuilder()
+ * .setName(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getComponentCallable().futureCall(request);
+ * // Do something.
+ * Component response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * for (Component element : designCenterClient.listComponents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which the list of components is requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListComponentsPagedResponse listComponents(
+ @Nullable ApplicationTemplateName parent) {
+ ListComponentsRequest request =
+ ListComponentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listComponents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists components in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * for (Component element : designCenterClient.listComponents(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which the list of components is requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListComponentsPagedResponse listComponents(String parent) {
+ ListComponentsRequest request = ListComponentsRequest.newBuilder().setParent(parent).build();
+ return listComponents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists components in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListComponentsRequest request =
+ * ListComponentsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Component element : designCenterClient.listComponents(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 ListComponentsPagedResponse listComponents(ListComponentsRequest request) {
+ return listComponentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists components in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListComponentsRequest request =
+ * ListComponentsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listComponentsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Component element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListComponentsRequest request =
+ * ListComponentsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListComponentsResponse response = designCenterClient.listComponentsCallable().call(request);
+ * for (Component element : response.getComponentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * Component component = Component.newBuilder().build();
+ * String componentId = "componentId-985933064";
+ * Component response = designCenterClient.createComponent(parent, component, componentId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the component.
+ * @param component Required. The component to create.
+ * @param componentId Required. The ID of the component to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Component createComponent(
+ @Nullable ApplicationTemplateName parent, Component component, String componentId) {
+ CreateComponentRequest request =
+ CreateComponentRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setComponent(component)
+ .setComponentId(componentId)
+ .build();
+ return createComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * Component component = Component.newBuilder().build();
+ * String componentId = "componentId-985933064";
+ * Component response = designCenterClient.createComponent(parent, component, componentId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the component.
+ * @param component Required. The component to create.
+ * @param componentId Required. The ID of the component to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Component createComponent(String parent, Component component, String componentId) {
+ CreateComponentRequest request =
+ CreateComponentRequest.newBuilder()
+ .setParent(parent)
+ .setComponent(component)
+ .setComponentId(componentId)
+ .build();
+ return createComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateComponentRequest request =
+ * CreateComponentRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setComponentId("componentId-985933064")
+ * .setComponent(Component.newBuilder().build())
+ * .build();
+ * Component response = designCenterClient.createComponent(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 Component createComponent(CreateComponentRequest request) {
+ return createComponentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateComponentRequest request =
+ * CreateComponentRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setComponentId("componentId-985933064")
+ * .setComponent(Component.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createComponentCallable().futureCall(request);
+ * // Do something.
+ * Component response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Component component = Component.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Component response = designCenterClient.updateComponent(component, updateMask);
+ * }
+ * }
+ *
+ * @param component Required. The component to update.
+ * @param updateMask Optional. The fields to overwrite in the component update. If you don't
+ * provide a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Component updateComponent(Component component, FieldMask updateMask) {
+ UpdateComponentRequest request =
+ UpdateComponentRequest.newBuilder()
+ .setComponent(component)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateComponentRequest request =
+ * UpdateComponentRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setComponent(Component.newBuilder().build())
+ * .build();
+ * Component response = designCenterClient.updateComponent(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 Component updateComponent(UpdateComponentRequest request) {
+ return updateComponentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateComponentRequest request =
+ * UpdateComponentRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setComponent(Component.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.updateComponentCallable().futureCall(request);
+ * // Do something.
+ * Component response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ComponentName name =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]");
+ * designCenterClient.deleteComponent(name);
+ * }
+ * }
+ *
+ * @param name Required. The component name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteComponent(@Nullable ComponentName name) {
+ DeleteComponentRequest request =
+ DeleteComponentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]")
+ * .toString();
+ * designCenterClient.deleteComponent(name);
+ * }
+ * }
+ *
+ * @param name Required. The component name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteComponent(String name) {
+ DeleteComponentRequest request = DeleteComponentRequest.newBuilder().setName(name).build();
+ deleteComponent(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteComponentRequest request =
+ * DeleteComponentRequest.newBuilder()
+ * .setName(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteComponent(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteComponent(DeleteComponentRequest request) {
+ deleteComponentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a component.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteComponentRequest request =
+ * DeleteComponentRequest.newBuilder()
+ * .setName(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future = designCenterClient.deleteComponentCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ConnectionName name =
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]");
+ * Connection response = designCenterClient.getConnection(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Connection getConnection(@Nullable ConnectionName name) {
+ GetConnectionRequest request =
+ GetConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString();
+ * Connection response = designCenterClient.getConnection(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Connection getConnection(String name) {
+ GetConnectionRequest request = GetConnectionRequest.newBuilder().setName(name).build();
+ return getConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetConnectionRequest request =
+ * GetConnectionRequest.newBuilder()
+ * .setName(
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString())
+ * .build();
+ * Connection response = designCenterClient.getConnection(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 Connection getConnection(GetConnectionRequest request) {
+ return getConnectionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetConnectionRequest request =
+ * GetConnectionRequest.newBuilder()
+ * .setName(
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getConnectionCallable().futureCall(request);
+ * // Do something.
+ * Connection response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ComponentName parent =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]");
+ * for (Connection element : designCenterClient.listConnections(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to request a list of connections.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConnectionsPagedResponse listConnections(@Nullable ComponentName parent) {
+ ListConnectionsRequest request =
+ ListConnectionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listConnections(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists connections in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]")
+ * .toString();
+ * for (Connection element : designCenterClient.listConnections(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to request a list of connections.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConnectionsPagedResponse listConnections(String parent) {
+ ListConnectionsRequest request = ListConnectionsRequest.newBuilder().setParent(parent).build();
+ return listConnections(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists connections in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListConnectionsRequest request =
+ * ListConnectionsRequest.newBuilder()
+ * .setParent(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Connection element : designCenterClient.listConnections(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 ListConnectionsPagedResponse listConnections(ListConnectionsRequest request) {
+ return listConnectionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists connections in an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListConnectionsRequest request =
+ * ListConnectionsRequest.newBuilder()
+ * .setParent(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listConnectionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Connection element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListConnectionsRequest request =
+ * ListConnectionsRequest.newBuilder()
+ * .setParent(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListConnectionsResponse response =
+ * designCenterClient.listConnectionsCallable().call(request);
+ * for (Connection element : response.getConnectionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ComponentName parent =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]");
+ * Connection connection = Connection.newBuilder().build();
+ * String connectionId = "connectionId1923106969";
+ * Connection response = designCenterClient.createConnection(parent, connection, connectionId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create a connection.
+ * @param connection Required. The connection to create.
+ * @param connectionId Required. The ID of the connection to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Connection createConnection(
+ @Nullable ComponentName parent, Connection connection, String connectionId) {
+ CreateConnectionRequest request =
+ CreateConnectionRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConnection(connection)
+ .setConnectionId(connectionId)
+ .build();
+ return createConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ComponentName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[COMPONENT]")
+ * .toString();
+ * Connection connection = Connection.newBuilder().build();
+ * String connectionId = "connectionId1923106969";
+ * Connection response = designCenterClient.createConnection(parent, connection, connectionId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create a connection.
+ * @param connection Required. The connection to create.
+ * @param connectionId Required. The ID of the connection to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Connection createConnection(
+ String parent, Connection connection, String connectionId) {
+ CreateConnectionRequest request =
+ CreateConnectionRequest.newBuilder()
+ .setParent(parent)
+ .setConnection(connection)
+ .setConnectionId(connectionId)
+ .build();
+ return createConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateConnectionRequest request =
+ * CreateConnectionRequest.newBuilder()
+ * .setParent(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setConnectionId("connectionId1923106969")
+ * .setConnection(Connection.newBuilder().build())
+ * .build();
+ * Connection response = designCenterClient.createConnection(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 Connection createConnection(CreateConnectionRequest request) {
+ return createConnectionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateConnectionRequest request =
+ * CreateConnectionRequest.newBuilder()
+ * .setParent(
+ * ComponentName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]")
+ * .toString())
+ * .setConnectionId("connectionId1923106969")
+ * .setConnection(Connection.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createConnectionCallable().futureCall(request);
+ * // Do something.
+ * Connection response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Connection connection = Connection.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Connection response = designCenterClient.updateConnection(connection, updateMask);
+ * }
+ * }
+ *
+ * @param connection Required. The connection to update.
+ * @param updateMask Optional. Fields to overwrite in the connection update. The fields specified
+ * in the update_mask are relative to the resource, not the full request. A field will be
+ * overwritten if it is in the mask. If you don't provide a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Connection updateConnection(Connection connection, FieldMask updateMask) {
+ UpdateConnectionRequest request =
+ UpdateConnectionRequest.newBuilder()
+ .setConnection(connection)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateConnectionRequest request =
+ * UpdateConnectionRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setConnection(Connection.newBuilder().build())
+ * .build();
+ * Connection response = designCenterClient.updateConnection(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 Connection updateConnection(UpdateConnectionRequest request) {
+ return updateConnectionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateConnectionRequest request =
+ * UpdateConnectionRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setConnection(Connection.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.updateConnectionCallable().futureCall(request);
+ * // Do something.
+ * Connection response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ConnectionName name =
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]");
+ * designCenterClient.deleteConnection(name);
+ * }
+ * }
+ *
+ * @param name Required. The connection name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConnection(@Nullable ConnectionName name) {
+ DeleteConnectionRequest request =
+ DeleteConnectionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString();
+ * designCenterClient.deleteConnection(name);
+ * }
+ * }
+ *
+ * @param name Required. The connection name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConnection(String name) {
+ DeleteConnectionRequest request = DeleteConnectionRequest.newBuilder().setName(name).build();
+ deleteConnection(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteConnectionRequest request =
+ * DeleteConnectionRequest.newBuilder()
+ * .setName(
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString())
+ * .build();
+ * designCenterClient.deleteConnection(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteConnection(DeleteConnectionRequest request) {
+ deleteConnectionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a connection.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteConnectionRequest request =
+ * DeleteConnectionRequest.newBuilder()
+ * .setName(
+ * ConnectionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[COMPONENT]",
+ * "[CONNECTION]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.deleteConnectionCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateRevisionName name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * ApplicationTemplateRevision response =
+ * designCenterClient.getApplicationTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateRevision getApplicationTemplateRevision(
+ @Nullable ApplicationTemplateRevisionName name) {
+ GetApplicationTemplateRevisionRequest request =
+ GetApplicationTemplateRevisionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getApplicationTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * ApplicationTemplateRevision response =
+ * designCenterClient.getApplicationTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateRevision getApplicationTemplateRevision(String name) {
+ GetApplicationTemplateRevisionRequest request =
+ GetApplicationTemplateRevisionRequest.newBuilder().setName(name).build();
+ return getApplicationTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateRevisionRequest request =
+ * GetApplicationTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * ApplicationTemplateRevision response =
+ * designCenterClient.getApplicationTemplateRevision(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 ApplicationTemplateRevision getApplicationTemplateRevision(
+ GetApplicationTemplateRevisionRequest request) {
+ return getApplicationTemplateRevisionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateRevisionRequest request =
+ * GetApplicationTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getApplicationTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplateRevision response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * for (ApplicationTemplateRevision element :
+ * designCenterClient.listApplicationTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent from which to list application template revisions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplateRevisionsPagedResponse listApplicationTemplateRevisions(
+ @Nullable ApplicationTemplateName parent) {
+ ListApplicationTemplateRevisionsRequest request =
+ ListApplicationTemplateRevisionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listApplicationTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * for (ApplicationTemplateRevision element :
+ * designCenterClient.listApplicationTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent from which to list application template revisions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplateRevisionsPagedResponse listApplicationTemplateRevisions(
+ String parent) {
+ ListApplicationTemplateRevisionsRequest request =
+ ListApplicationTemplateRevisionsRequest.newBuilder().setParent(parent).build();
+ return listApplicationTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateRevisionsRequest request =
+ * ListApplicationTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (ApplicationTemplateRevision element :
+ * designCenterClient.listApplicationTemplateRevisions(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 ListApplicationTemplateRevisionsPagedResponse listApplicationTemplateRevisions(
+ ListApplicationTemplateRevisionsRequest request) {
+ return listApplicationTemplateRevisionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateRevisionsRequest request =
+ * ListApplicationTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listApplicationTemplateRevisionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ApplicationTemplateRevision element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListApplicationTemplateRevisionsRequest, ListApplicationTemplateRevisionsPagedResponse>
+ listApplicationTemplateRevisionsPagedCallable() {
+ return stub.listApplicationTemplateRevisionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateRevisionsRequest request =
+ * ListApplicationTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListApplicationTemplateRevisionsResponse response =
+ * designCenterClient.listApplicationTemplateRevisionsCallable().call(request);
+ * for (ApplicationTemplateRevision element : response.getApplicationTemplateRevisionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListApplicationTemplateRevisionsRequest, ListApplicationTemplateRevisionsResponse>
+ listApplicationTemplateRevisionsCallable() {
+ return stub.listApplicationTemplateRevisionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateRevisionName name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]");
+ * designCenterClient.deleteApplicationTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplateRevision(
+ @Nullable ApplicationTemplateRevisionName name) {
+ DeleteApplicationTemplateRevisionRequest request =
+ DeleteApplicationTemplateRevisionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteApplicationTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * designCenterClient.deleteApplicationTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The application template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplateRevision(String name) {
+ DeleteApplicationTemplateRevisionRequest request =
+ DeleteApplicationTemplateRevisionRequest.newBuilder().setName(name).build();
+ deleteApplicationTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationTemplateRevisionRequest request =
+ * DeleteApplicationTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * designCenterClient.deleteApplicationTemplateRevision(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteApplicationTemplateRevision(
+ DeleteApplicationTemplateRevisionRequest request) {
+ deleteApplicationTemplateRevisionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an application template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationTemplateRevisionRequest request =
+ * DeleteApplicationTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deleteApplicationTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName name = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * Catalog response = designCenterClient.getCatalog(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Catalog getCatalog(@Nullable CatalogName name) {
+ GetCatalogRequest request =
+ GetCatalogRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getCatalog(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * Catalog response = designCenterClient.getCatalog(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Catalog getCatalog(String name) {
+ GetCatalogRequest request = GetCatalogRequest.newBuilder().setName(name).build();
+ return getCatalog(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogRequest request =
+ * GetCatalogRequest.newBuilder()
+ * .setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .build();
+ * Catalog response = designCenterClient.getCatalog(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 Catalog getCatalog(GetCatalogRequest request) {
+ return getCatalogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogRequest request =
+ * GetCatalogRequest.newBuilder()
+ * .setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getCatalogCallable().futureCall(request);
+ * // Do something.
+ * Catalog response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * for (Catalog element : designCenterClient.listCatalogs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent space from which catalogs are listed. Format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogsPagedResponse listCatalogs(@Nullable SpaceName parent) {
+ ListCatalogsRequest request =
+ ListCatalogsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listCatalogs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalogs in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * for (Catalog element : designCenterClient.listCatalogs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent space from which catalogs are listed. Format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogsPagedResponse listCatalogs(String parent) {
+ ListCatalogsRequest request = ListCatalogsRequest.newBuilder().setParent(parent).build();
+ return listCatalogs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalogs in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogsRequest request =
+ * ListCatalogsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Catalog element : designCenterClient.listCatalogs(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 ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request) {
+ return listCatalogsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalogs in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogsRequest request =
+ * ListCatalogsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listCatalogsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Catalog element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogsRequest request =
+ * ListCatalogsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListCatalogsResponse response = designCenterClient.listCatalogsCallable().call(request);
+ * for (Catalog element : response.getCatalogsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * Catalog catalog = Catalog.newBuilder().build();
+ * String catalogId = "catalogId1455933204";
+ * Catalog response = designCenterClient.createCatalog(parent, catalog, catalogId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent space in which a catalog is created in the following format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @param catalog Required. The catalog to create.
+ * @param catalogId Required. The ID of the catalog to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Catalog createCatalog(
+ @Nullable SpaceName parent, Catalog catalog, String catalogId) {
+ CreateCatalogRequest request =
+ CreateCatalogRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setCatalog(catalog)
+ .setCatalogId(catalogId)
+ .build();
+ return createCatalog(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * Catalog catalog = Catalog.newBuilder().build();
+ * String catalogId = "catalogId1455933204";
+ * Catalog response = designCenterClient.createCatalog(parent, catalog, catalogId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent space in which a catalog is created in the following format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @param catalog Required. The catalog to create.
+ * @param catalogId Required. The ID of the catalog to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Catalog createCatalog(String parent, Catalog catalog, String catalogId) {
+ CreateCatalogRequest request =
+ CreateCatalogRequest.newBuilder()
+ .setParent(parent)
+ .setCatalog(catalog)
+ .setCatalogId(catalogId)
+ .build();
+ return createCatalog(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogRequest request =
+ * CreateCatalogRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setCatalogId("catalogId1455933204")
+ * .setCatalog(Catalog.newBuilder().build())
+ * .build();
+ * Catalog response = designCenterClient.createCatalog(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 Catalog createCatalog(CreateCatalogRequest request) {
+ return createCatalogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogRequest request =
+ * CreateCatalogRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setCatalogId("catalogId1455933204")
+ * .setCatalog(Catalog.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.createCatalogCallable().futureCall(request);
+ * // Do something.
+ * Catalog response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Catalog catalog = Catalog.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Catalog response = designCenterClient.updateCatalog(catalog, updateMask);
+ * }
+ * }
+ *
+ * @param catalog Required. The catalog to update.
+ * @param updateMask Optional. The fields to overwrite in the catalog update. If you don't provide
+ * a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Catalog updateCatalog(Catalog catalog, FieldMask updateMask) {
+ UpdateCatalogRequest request =
+ UpdateCatalogRequest.newBuilder().setCatalog(catalog).setUpdateMask(updateMask).build();
+ return updateCatalog(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateCatalogRequest request =
+ * UpdateCatalogRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setCatalog(Catalog.newBuilder().build())
+ * .build();
+ * Catalog response = designCenterClient.updateCatalog(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 Catalog updateCatalog(UpdateCatalogRequest request) {
+ return updateCatalogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateCatalogRequest request =
+ * UpdateCatalogRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setCatalog(Catalog.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.updateCatalogCallable().futureCall(request);
+ * // Do something.
+ * Catalog response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName name = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * designCenterClient.deleteCatalogAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The catalog name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * designCenterClient.deleteCatalogAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The catalog name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogRequest request =
+ * DeleteCatalogRequest.newBuilder()
+ * .setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteCatalogAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogRequest request =
+ * DeleteCatalogRequest.newBuilder()
+ * .setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deleteCatalogOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogRequest request =
+ * DeleteCatalogRequest.newBuilder()
+ * .setName(CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future = designCenterClient.deleteCatalogCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * CatalogTemplate catalogTemplate = CatalogTemplate.newBuilder().build();
+ * String catalogTemplateId = "catalogTemplateId-1740091346";
+ * CatalogTemplate response =
+ * designCenterClient.createCatalogTemplate(parent, catalogTemplate, catalogTemplateId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which the catalog template is created.
+ * @param catalogTemplate Required. The catalog template to create.
+ * @param catalogTemplateId Required. The ID of the catalog template to create. The ID is appended
+ * to the catalog template's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplate createCatalogTemplate(
+ @Nullable CatalogName parent, CatalogTemplate catalogTemplate, String catalogTemplateId) {
+ CreateCatalogTemplateRequest request =
+ CreateCatalogTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setCatalogTemplate(catalogTemplate)
+ .setCatalogTemplateId(catalogTemplateId)
+ .build();
+ return createCatalogTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a template to a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * CatalogTemplate catalogTemplate = CatalogTemplate.newBuilder().build();
+ * String catalogTemplateId = "catalogTemplateId-1740091346";
+ * CatalogTemplate response =
+ * designCenterClient.createCatalogTemplate(parent, catalogTemplate, catalogTemplateId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which the catalog template is created.
+ * @param catalogTemplate Required. The catalog template to create.
+ * @param catalogTemplateId Required. The ID of the catalog template to create. The ID is appended
+ * to the catalog template's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplate createCatalogTemplate(
+ String parent, CatalogTemplate catalogTemplate, String catalogTemplateId) {
+ CreateCatalogTemplateRequest request =
+ CreateCatalogTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setCatalogTemplate(catalogTemplate)
+ .setCatalogTemplateId(catalogTemplateId)
+ .build();
+ return createCatalogTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a template to a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogTemplateRequest request =
+ * CreateCatalogTemplateRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setCatalogTemplateId("catalogTemplateId-1740091346")
+ * .setCatalogTemplate(CatalogTemplate.newBuilder().build())
+ * .build();
+ * CatalogTemplate response = designCenterClient.createCatalogTemplate(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 CatalogTemplate createCatalogTemplate(CreateCatalogTemplateRequest request) {
+ return createCatalogTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Adds a template to a catalog.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogTemplateRequest request =
+ * CreateCatalogTemplateRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setCatalogTemplateId("catalogTemplateId-1740091346")
+ * .setCatalogTemplate(CatalogTemplate.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createCatalogTemplateCallable().futureCall(request);
+ * // Do something.
+ * CatalogTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateName name =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]");
+ * CatalogTemplate response = designCenterClient.getCatalogTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog template name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplate getCatalogTemplate(@Nullable CatalogTemplateName name) {
+ GetCatalogTemplateRequest request =
+ GetCatalogTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getCatalogTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a catalog template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString();
+ * CatalogTemplate response = designCenterClient.getCatalogTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog template name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplate getCatalogTemplate(String name) {
+ GetCatalogTemplateRequest request =
+ GetCatalogTemplateRequest.newBuilder().setName(name).build();
+ return getCatalogTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a catalog template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogTemplateRequest request =
+ * GetCatalogTemplateRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .build();
+ * CatalogTemplate response = designCenterClient.getCatalogTemplate(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 CatalogTemplate getCatalogTemplate(GetCatalogTemplateRequest request) {
+ return getCatalogTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a catalog template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogTemplateRequest request =
+ * GetCatalogTemplateRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getCatalogTemplateCallable().futureCall(request);
+ * // Do something.
+ * CatalogTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * for (CatalogTemplate element : designCenterClient.listCatalogTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent from which the catalog templates are listed in the following
+ * format: `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogTemplatesPagedResponse listCatalogTemplates(
+ @Nullable CatalogName parent) {
+ ListCatalogTemplatesRequest request =
+ ListCatalogTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listCatalogTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog templates.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * for (CatalogTemplate element : designCenterClient.listCatalogTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent from which the catalog templates are listed in the following
+ * format: `projects/$project/locations/$location/spaces/$space/catalogs/$catalog`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogTemplatesPagedResponse listCatalogTemplates(String parent) {
+ ListCatalogTemplatesRequest request =
+ ListCatalogTemplatesRequest.newBuilder().setParent(parent).build();
+ return listCatalogTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog templates.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplatesRequest request =
+ * ListCatalogTemplatesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (CatalogTemplate element :
+ * designCenterClient.listCatalogTemplates(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 ListCatalogTemplatesPagedResponse listCatalogTemplates(
+ ListCatalogTemplatesRequest request) {
+ return listCatalogTemplatesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog templates.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplatesRequest request =
+ * ListCatalogTemplatesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listCatalogTemplatesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (CatalogTemplate element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplatesRequest request =
+ * ListCatalogTemplatesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListCatalogTemplatesResponse response =
+ * designCenterClient.listCatalogTemplatesCallable().call(request);
+ * for (CatalogTemplate element : response.getCatalogTemplatesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplate catalogTemplate = CatalogTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * CatalogTemplate response =
+ * designCenterClient.updateCatalogTemplate(catalogTemplate, updateMask);
+ * }
+ * }
+ *
+ * @param catalogTemplate Required. The catalog template to update. Format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
+ * @param updateMask Optional. The fields to overwrite in the catalog template update. The fields
+ * specified in the update_mask are relative to the resource, not the full request. A field
+ * will be overwritten if it is in the mask. If you don't provide a mask, all fields are
+ * overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplate updateCatalogTemplate(
+ CatalogTemplate catalogTemplate, FieldMask updateMask) {
+ UpdateCatalogTemplateRequest request =
+ UpdateCatalogTemplateRequest.newBuilder()
+ .setCatalogTemplate(catalogTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateCatalogTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a catalog template resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateCatalogTemplateRequest request =
+ * UpdateCatalogTemplateRequest.newBuilder()
+ * .setCatalogTemplate(CatalogTemplate.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * CatalogTemplate response = designCenterClient.updateCatalogTemplate(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 CatalogTemplate updateCatalogTemplate(UpdateCatalogTemplateRequest request) {
+ return updateCatalogTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a catalog template resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateCatalogTemplateRequest request =
+ * UpdateCatalogTemplateRequest.newBuilder()
+ * .setCatalogTemplate(CatalogTemplate.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.updateCatalogTemplateCallable().futureCall(request);
+ * // Do something.
+ * CatalogTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateName name =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]");
+ * designCenterClient.deleteCatalogTemplateAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The catalog template name. Format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString();
+ * designCenterClient.deleteCatalogTemplateAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The catalog template name. Format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/templates/$template`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRequest request =
+ * DeleteCatalogTemplateRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteCatalogTemplateAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRequest request =
+ * DeleteCatalogTemplateRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deleteCatalogTemplateOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRequest request =
+ * DeleteCatalogTemplateRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deleteCatalogTemplateCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * Share share = Share.newBuilder().build();
+ * String shareId = "shareId2054217050";
+ * Share response = designCenterClient.createShareAsync(parent, share, shareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which shares are created.
+ * @param share Required. The share to create.
+ * @param shareId Required. The ID of the share to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * Share share = Share.newBuilder().build();
+ * String shareId = "shareId2054217050";
+ * Share response = designCenterClient.createShareAsync(parent, share, shareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which shares are created.
+ * @param share Required. The share to create.
+ * @param shareId Required. The ID of the share to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateShareRequest request =
+ * CreateShareRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setShareId("shareId2054217050")
+ * .setShare(Share.newBuilder().build())
+ * .build();
+ * Share response = designCenterClient.createShareAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateShareRequest request =
+ * CreateShareRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setShareId("shareId2054217050")
+ * .setShare(Share.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.createShareOperationCallable().futureCall(request);
+ * // Do something.
+ * Share response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateShareRequest request =
+ * CreateShareRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setShareId("shareId2054217050")
+ * .setShare(Share.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.createShareCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]");
+ * for (Share element : designCenterClient.listShares(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which a list of shares is requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharesPagedResponse listShares(@Nullable CatalogName parent) {
+ ListSharesRequest request =
+ ListSharesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listShares(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog share objects for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString();
+ * for (Share element : designCenterClient.listShares(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which a list of shares is requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharesPagedResponse listShares(String parent) {
+ ListSharesRequest request = ListSharesRequest.newBuilder().setParent(parent).build();
+ return listShares(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog share objects for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Share element : designCenterClient.listShares(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 ListSharesPagedResponse listShares(ListSharesRequest request) {
+ return listSharesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists catalog share objects for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = designCenterClient.listSharesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Share element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharesRequest request =
+ * ListSharesRequest.newBuilder()
+ * .setParent(
+ * CatalogName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSharesResponse response = designCenterClient.listSharesCallable().call(request);
+ * for (Share element : response.getSharesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ShareName name = ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]");
+ * Share response = designCenterClient.getShare(name);
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Share getShare(@Nullable ShareName name) {
+ GetShareRequest request =
+ GetShareRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getShare(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get catalog share object for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]").toString();
+ * Share response = designCenterClient.getShare(name);
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Share getShare(String name) {
+ GetShareRequest request = GetShareRequest.newBuilder().setName(name).build();
+ return getShare(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get catalog share object for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetShareRequest request =
+ * GetShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * Share response = designCenterClient.getShare(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 Share getShare(GetShareRequest request) {
+ return getShareCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get catalog share object for the space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetShareRequest request =
+ * GetShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getShareCallable().futureCall(request);
+ * // Do something.
+ * Share response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ShareName name = ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]");
+ * designCenterClient.deleteShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]").toString();
+ * designCenterClient.deleteShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * designCenterClient.deleteShareAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deleteShareOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteShareRequest request =
+ * DeleteShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.deleteShareCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ShareName name = ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]");
+ * Share response = designCenterClient.syncShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]").toString();
+ * Share response = designCenterClient.syncShareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The share name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/catalogs/$catalog/shares/$share`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SyncShareRequest request =
+ * SyncShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * Share response = designCenterClient.syncShareAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SyncShareRequest request =
+ * SyncShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.syncShareOperationCallable().futureCall(request);
+ * // Do something.
+ * Share response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SyncShareRequest request =
+ * SyncShareRequest.newBuilder()
+ * .setName(
+ * ShareName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[SHARE]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.syncShareCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SharedTemplateName name =
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]");
+ * SharedTemplate response = designCenterClient.getSharedTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The shared template name. Format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SharedTemplate getSharedTemplate(@Nullable SharedTemplateName name) {
+ GetSharedTemplateRequest request =
+ GetSharedTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getSharedTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString();
+ * SharedTemplate response = designCenterClient.getSharedTemplate(name);
+ * }
+ * }
+ *
+ * @param name Required. The shared template name. Format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SharedTemplate getSharedTemplate(String name) {
+ GetSharedTemplateRequest request = GetSharedTemplateRequest.newBuilder().setName(name).build();
+ return getSharedTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSharedTemplateRequest request =
+ * GetSharedTemplateRequest.newBuilder()
+ * .setName(
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString())
+ * .build();
+ * SharedTemplate response = designCenterClient.getSharedTemplate(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 SharedTemplate getSharedTemplate(GetSharedTemplateRequest request) {
+ return getSharedTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSharedTemplateRequest request =
+ * GetSharedTemplateRequest.newBuilder()
+ * .setName(
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getSharedTemplateCallable().futureCall(request);
+ * // Do something.
+ * SharedTemplate response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * for (SharedTemplate element : designCenterClient.listSharedTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent space for which shared templates are listed in the following
+ * format: `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharedTemplatesPagedResponse listSharedTemplates(@Nullable SpaceName parent) {
+ ListSharedTemplatesRequest request =
+ ListSharedTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSharedTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * for (SharedTemplate element : designCenterClient.listSharedTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent space for which shared templates are listed in the following
+ * format: `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharedTemplatesPagedResponse listSharedTemplates(String parent) {
+ ListSharedTemplatesRequest request =
+ ListSharedTemplatesRequest.newBuilder().setParent(parent).build();
+ return listSharedTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplatesRequest request =
+ * ListSharedTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (SharedTemplate element : designCenterClient.listSharedTemplates(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 ListSharedTemplatesPagedResponse listSharedTemplates(
+ ListSharedTemplatesRequest request) {
+ return listSharedTemplatesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared templates in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplatesRequest request =
+ * ListSharedTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listSharedTemplatesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SharedTemplate element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplatesRequest request =
+ * ListSharedTemplatesRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSharedTemplatesResponse response =
+ * designCenterClient.listSharedTemplatesCallable().call(request);
+ * for (SharedTemplate element : response.getSharedTemplatesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SharedTemplateRevisionName name =
+ * SharedTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]", "[REVISION]");
+ * SharedTemplateRevision response = designCenterClient.getSharedTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The shared template revision name, in the following format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate/revisions/$revision`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SharedTemplateRevision getSharedTemplateRevision(
+ @Nullable SharedTemplateRevisionName name) {
+ GetSharedTemplateRevisionRequest request =
+ GetSharedTemplateRevisionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getSharedTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * SharedTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]", "[REVISION]")
+ * .toString();
+ * SharedTemplateRevision response = designCenterClient.getSharedTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The shared template revision name, in the following format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate/revisions/$revision`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SharedTemplateRevision getSharedTemplateRevision(String name) {
+ GetSharedTemplateRevisionRequest request =
+ GetSharedTemplateRevisionRequest.newBuilder().setName(name).build();
+ return getSharedTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSharedTemplateRevisionRequest request =
+ * GetSharedTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * SharedTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]", "[REVISION]")
+ * .toString())
+ * .build();
+ * SharedTemplateRevision response = designCenterClient.getSharedTemplateRevision(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 SharedTemplateRevision getSharedTemplateRevision(
+ GetSharedTemplateRevisionRequest request) {
+ return getSharedTemplateRevisionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a shared template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetSharedTemplateRevisionRequest request =
+ * GetSharedTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * SharedTemplateRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]", "[REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getSharedTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * SharedTemplateRevision response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SharedTemplateName parent =
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]");
+ * for (SharedTemplateRevision element :
+ * designCenterClient.listSharedTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to list shared template revisions, in
+ * the following format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharedTemplateRevisionsPagedResponse listSharedTemplateRevisions(
+ @Nullable SharedTemplateName parent) {
+ ListSharedTemplateRevisionsRequest request =
+ ListSharedTemplateRevisionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSharedTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared template revisions in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString();
+ * for (SharedTemplateRevision element :
+ * designCenterClient.listSharedTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to list shared template revisions, in
+ * the following format:
+ * `projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSharedTemplateRevisionsPagedResponse listSharedTemplateRevisions(String parent) {
+ ListSharedTemplateRevisionsRequest request =
+ ListSharedTemplateRevisionsRequest.newBuilder().setParent(parent).build();
+ return listSharedTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared template revisions in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplateRevisionsRequest request =
+ * ListSharedTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (SharedTemplateRevision element :
+ * designCenterClient.listSharedTemplateRevisions(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 ListSharedTemplateRevisionsPagedResponse listSharedTemplateRevisions(
+ ListSharedTemplateRevisionsRequest request) {
+ return listSharedTemplateRevisionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared template revisions in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplateRevisionsRequest request =
+ * ListSharedTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listSharedTemplateRevisionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SharedTemplateRevision element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListSharedTemplateRevisionsRequest, ListSharedTemplateRevisionsPagedResponse>
+ listSharedTemplateRevisionsPagedCallable() {
+ return stub.listSharedTemplateRevisionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists shared template revisions in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListSharedTemplateRevisionsRequest request =
+ * ListSharedTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * SharedTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[SHARED_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSharedTemplateRevisionsResponse response =
+ * designCenterClient.listSharedTemplateRevisionsCallable().call(request);
+ * for (SharedTemplateRevision element : response.getSharedTemplateRevisionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListSharedTemplateRevisionsRequest, ListSharedTemplateRevisionsResponse>
+ listSharedTemplateRevisionsCallable() {
+ return stub.listSharedTemplateRevisionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateName parent =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]");
+ * CatalogTemplateRevision catalogTemplateRevision =
+ * CatalogTemplateRevision.newBuilder().build();
+ * String catalogTemplateRevisionId = "catalogTemplateRevisionId1620031081";
+ * CatalogTemplateRevision response =
+ * designCenterClient
+ * .createCatalogTemplateRevisionAsync(
+ * parent, catalogTemplateRevision, catalogTemplateRevisionId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent in which the catalog template revisions request is created
+ * in following format:
+ * `projects/$project/locations/$location/spaces/$space/templates/$template`
+ * @param catalogTemplateRevision Required. The template revision to create.
+ * @param catalogTemplateRevisionId Required. The ID of the template revision to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString();
+ * CatalogTemplateRevision catalogTemplateRevision =
+ * CatalogTemplateRevision.newBuilder().build();
+ * String catalogTemplateRevisionId = "catalogTemplateRevisionId1620031081";
+ * CatalogTemplateRevision response =
+ * designCenterClient
+ * .createCatalogTemplateRevisionAsync(
+ * parent, catalogTemplateRevision, catalogTemplateRevisionId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent in which the catalog template revisions request is created
+ * in following format:
+ * `projects/$project/locations/$location/spaces/$space/templates/$template`
+ * @param catalogTemplateRevision Required. The template revision to create.
+ * @param catalogTemplateRevisionId Required. The ID of the template revision to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogTemplateRevisionRequest request =
+ * CreateCatalogTemplateRevisionRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setCatalogTemplateRevisionId("catalogTemplateRevisionId1620031081")
+ * .setCatalogTemplateRevision(CatalogTemplateRevision.newBuilder().build())
+ * .build();
+ * CatalogTemplateRevision response =
+ * designCenterClient.createCatalogTemplateRevisionAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogTemplateRevisionRequest request =
+ * CreateCatalogTemplateRevisionRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setCatalogTemplateRevisionId("catalogTemplateRevisionId1620031081")
+ * .setCatalogTemplateRevision(CatalogTemplateRevision.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.createCatalogTemplateRevisionOperationCallable().futureCall(request);
+ * // Do something.
+ * CatalogTemplateRevision response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ CreateCatalogTemplateRevisionRequest, CatalogTemplateRevision, OperationMetadata>
+ createCatalogTemplateRevisionOperationCallable() {
+ return stub.createCatalogTemplateRevisionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateCatalogTemplateRevisionRequest request =
+ * CreateCatalogTemplateRevisionRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setCatalogTemplateRevisionId("catalogTemplateRevisionId1620031081")
+ * .setCatalogTemplateRevision(CatalogTemplateRevision.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createCatalogTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateRevisionName name =
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]");
+ * CatalogTemplateRevision response = designCenterClient.getCatalogTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog template revisions name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplateRevision getCatalogTemplateRevision(
+ @Nullable CatalogTemplateRevisionName name) {
+ GetCatalogTemplateRevisionRequest request =
+ GetCatalogTemplateRevisionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getCatalogTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString();
+ * CatalogTemplateRevision response = designCenterClient.getCatalogTemplateRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The catalog template revisions name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CatalogTemplateRevision getCatalogTemplateRevision(String name) {
+ GetCatalogTemplateRevisionRequest request =
+ GetCatalogTemplateRevisionRequest.newBuilder().setName(name).build();
+ return getCatalogTemplateRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogTemplateRevisionRequest request =
+ * GetCatalogTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * CatalogTemplateRevision response = designCenterClient.getCatalogTemplateRevision(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 CatalogTemplateRevision getCatalogTemplateRevision(
+ GetCatalogTemplateRevisionRequest request) {
+ return getCatalogTemplateRevisionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetCatalogTemplateRevisionRequest request =
+ * GetCatalogTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getCatalogTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * CatalogTemplateRevision response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateName parent =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]");
+ * for (CatalogTemplateRevision element :
+ * designCenterClient.listCatalogTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which a list of catalog template revisions is
+ * requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogTemplateRevisionsPagedResponse listCatalogTemplateRevisions(
+ @Nullable CatalogTemplateName parent) {
+ ListCatalogTemplateRevisionsRequest request =
+ ListCatalogTemplateRevisionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listCatalogTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists template revisions.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString();
+ * for (CatalogTemplateRevision element :
+ * designCenterClient.listCatalogTemplateRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which a list of catalog template revisions is
+ * requested.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCatalogTemplateRevisionsPagedResponse listCatalogTemplateRevisions(
+ String parent) {
+ ListCatalogTemplateRevisionsRequest request =
+ ListCatalogTemplateRevisionsRequest.newBuilder().setParent(parent).build();
+ return listCatalogTemplateRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists template revisions.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplateRevisionsRequest request =
+ * ListCatalogTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (CatalogTemplateRevision element :
+ * designCenterClient.listCatalogTemplateRevisions(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 ListCatalogTemplateRevisionsPagedResponse listCatalogTemplateRevisions(
+ ListCatalogTemplateRevisionsRequest request) {
+ return listCatalogTemplateRevisionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists template revisions.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplateRevisionsRequest request =
+ * ListCatalogTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listCatalogTemplateRevisionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (CatalogTemplateRevision element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListCatalogTemplateRevisionsRequest, ListCatalogTemplateRevisionsPagedResponse>
+ listCatalogTemplateRevisionsPagedCallable() {
+ return stub.listCatalogTemplateRevisionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists template revisions.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListCatalogTemplateRevisionsRequest request =
+ * ListCatalogTemplateRevisionsRequest.newBuilder()
+ * .setParent(
+ * CatalogTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[CATALOG]", "[CATALOG_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListCatalogTemplateRevisionsResponse response =
+ * designCenterClient.listCatalogTemplateRevisionsCallable().call(request);
+ * for (CatalogTemplateRevision element : response.getCatalogTemplateRevisionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListCatalogTemplateRevisionsRequest, ListCatalogTemplateRevisionsResponse>
+ listCatalogTemplateRevisionsCallable() {
+ return stub.listCatalogTemplateRevisionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a template revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CatalogTemplateRevisionName name =
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]");
+ * designCenterClient.deleteCatalogTemplateRevisionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString();
+ * designCenterClient.deleteCatalogTemplateRevisionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The template revision name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRevisionRequest request =
+ * DeleteCatalogTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * designCenterClient.deleteCatalogTemplateRevisionAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRevisionRequest request =
+ * DeleteCatalogTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deleteCatalogTemplateRevisionOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteCatalogTemplateRevisionRequest request =
+ * DeleteCatalogTemplateRevisionRequest.newBuilder()
+ * .setName(
+ * CatalogTemplateRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[CATALOG]",
+ * "[CATALOG_TEMPLATE]",
+ * "[REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deleteCatalogTemplateRevisionCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * Application application = Application.newBuilder().build();
+ * String applicationId = "applicationId-1011352949";
+ * Application response =
+ * designCenterClient.createApplication(parent, application, applicationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the application. Format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @param application Required. The application to create.
+ * @param applicationId Required. The ID of the application to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Application createApplication(
+ @Nullable SpaceName parent, Application application, String applicationId) {
+ CreateApplicationRequest request =
+ CreateApplicationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setApplication(application)
+ .setApplicationId(applicationId)
+ .build();
+ return createApplication(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * Application application = Application.newBuilder().build();
+ * String applicationId = "applicationId-1011352949";
+ * Application response =
+ * designCenterClient.createApplication(parent, application, applicationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the application. Format:
+ * `projects/$project/locations/$location/spaces/$space`
+ * @param application Required. The application to create.
+ * @param applicationId Required. The ID of the application to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Application createApplication(
+ String parent, Application application, String applicationId) {
+ CreateApplicationRequest request =
+ CreateApplicationRequest.newBuilder()
+ .setParent(parent)
+ .setApplication(application)
+ .setApplicationId(applicationId)
+ .build();
+ return createApplication(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateApplicationRequest request =
+ * CreateApplicationRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setApplicationId("applicationId-1011352949")
+ * .setApplication(Application.newBuilder().build())
+ * .build();
+ * Application response = designCenterClient.createApplication(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 Application createApplication(CreateApplicationRequest request) {
+ return createApplicationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreateApplicationRequest request =
+ * CreateApplicationRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setApplicationId("applicationId-1011352949")
+ * .setApplication(Application.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.createApplicationCallable().futureCall(request);
+ * // Do something.
+ * Application response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * Application response = designCenterClient.getApplication(name);
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Application getApplication(@Nullable ApplicationName name) {
+ GetApplicationRequest request =
+ GetApplicationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getApplication(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * Application response = designCenterClient.getApplication(name);
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Application getApplication(String name) {
+ GetApplicationRequest request = GetApplicationRequest.newBuilder().setName(name).build();
+ return getApplication(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationRequest request =
+ * GetApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * Application response = designCenterClient.getApplication(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 Application getApplication(GetApplicationRequest request) {
+ return getApplicationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationRequest request =
+ * GetApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getApplicationCallable().futureCall(request);
+ * // Do something.
+ * Application response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * for (Application element : designCenterClient.listApplications(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to request a list of applications.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationsPagedResponse listApplications(@Nullable SpaceName parent) {
+ ListApplicationsRequest request =
+ ListApplicationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listApplications(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists applications in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * for (Application element : designCenterClient.listApplications(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource from which to request a list of applications.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationsPagedResponse listApplications(String parent) {
+ ListApplicationsRequest request =
+ ListApplicationsRequest.newBuilder().setParent(parent).build();
+ return listApplications(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists applications in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationsRequest request =
+ * ListApplicationsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Application element : designCenterClient.listApplications(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 ListApplicationsPagedResponse listApplications(ListApplicationsRequest request) {
+ return listApplicationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists applications in a given space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationsRequest request =
+ * ListApplicationsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listApplicationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Application element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationsRequest request =
+ * ListApplicationsRequest.newBuilder()
+ * .setParent(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListApplicationsResponse response =
+ * designCenterClient.listApplicationsCallable().call(request);
+ * for (Application element : response.getApplicationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Application application = Application.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Application response = designCenterClient.updateApplication(application, updateMask);
+ * }
+ * }
+ *
+ * @param application Required. The application to update.
+ * @param updateMask Optional. The fields to overwrite in the application update. If you don't
+ * provide a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Application updateApplication(Application application, FieldMask updateMask) {
+ UpdateApplicationRequest request =
+ UpdateApplicationRequest.newBuilder()
+ .setApplication(application)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateApplication(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateApplicationRequest request =
+ * UpdateApplicationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setApplication(Application.newBuilder().build())
+ * .build();
+ * Application response = designCenterClient.updateApplication(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 Application updateApplication(UpdateApplicationRequest request) {
+ return updateApplicationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdateApplicationRequest request =
+ * UpdateApplicationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setApplication(Application.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.updateApplicationCallable().futureCall(request);
+ * // Do something.
+ * Application response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * designCenterClient.deleteApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * designCenterClient.deleteApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationRequest request =
+ * DeleteApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * designCenterClient.deleteApplicationAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationRequest request =
+ * DeleteApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deleteApplicationOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeleteApplicationRequest request =
+ * DeleteApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deleteApplicationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * DeployApplicationResponse response = designCenterClient.deployApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * DeployApplicationResponse response = designCenterClient.deployApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name. Format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeployApplicationRequest request =
+ * DeployApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setReplace(true)
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .setValidateOnly(true)
+ * .build();
+ * DeployApplicationResponse response = designCenterClient.deployApplicationAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeployApplicationRequest request =
+ * DeployApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setReplace(true)
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.deployApplicationOperationCallable().futureCall(request);
+ * // Do something.
+ * DeployApplicationResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeployApplicationRequest, DeployApplicationResponse, OperationMetadata>
+ deployApplicationOperationCallable() {
+ return stub.deployApplicationOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deploys an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeployApplicationRequest request =
+ * DeployApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setReplace(true)
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.deployApplicationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * PreviewApplicationResponse response = designCenterClient.previewApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * PreviewApplicationResponse response = designCenterClient.previewApplicationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * PreviewApplicationRequest request =
+ * PreviewApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * PreviewApplicationResponse response =
+ * designCenterClient.previewApplicationAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * PreviewApplicationRequest request =
+ * PreviewApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.previewApplicationOperationCallable().futureCall(request);
+ * // Do something.
+ * PreviewApplicationResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ PreviewApplicationRequest, PreviewApplicationResponse, OperationMetadata>
+ previewApplicationOperationCallable() {
+ return stub.previewApplicationOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Previews deployment of an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * PreviewApplicationRequest request =
+ * PreviewApplicationRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setWorkerPool("workerPool-384405318")
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.previewApplicationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * FetchApplicationAssessmentReportResponse response =
+ * designCenterClient.fetchApplicationAssessmentReport(name);
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchApplicationAssessmentReportResponse fetchApplicationAssessmentReport(
+ @Nullable ApplicationName name) {
+ FetchApplicationAssessmentReportRequest request =
+ FetchApplicationAssessmentReportRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return fetchApplicationAssessmentReport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches the assessment report of a deployed application if present.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * FetchApplicationAssessmentReportResponse response =
+ * designCenterClient.fetchApplicationAssessmentReport(name);
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchApplicationAssessmentReportResponse fetchApplicationAssessmentReport(
+ String name) {
+ FetchApplicationAssessmentReportRequest request =
+ FetchApplicationAssessmentReportRequest.newBuilder().setName(name).build();
+ return fetchApplicationAssessmentReport(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches the assessment report of a deployed application if present.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * FetchApplicationAssessmentReportRequest request =
+ * FetchApplicationAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * FetchApplicationAssessmentReportResponse response =
+ * designCenterClient.fetchApplicationAssessmentReport(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 FetchApplicationAssessmentReportResponse fetchApplicationAssessmentReport(
+ FetchApplicationAssessmentReportRequest request) {
+ return fetchApplicationAssessmentReportCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches the assessment report of a deployed application if present.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * FetchApplicationAssessmentReportRequest request =
+ * FetchApplicationAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.fetchApplicationAssessmentReportCallable().futureCall(request);
+ * // Do something.
+ * FetchApplicationAssessmentReportResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ FetchApplicationAssessmentReportRequest, FetchApplicationAssessmentReportResponse>
+ fetchApplicationAssessmentReportCallable() {
+ return stub.fetchApplicationAssessmentReportCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * GenerateApplicationAssessmentReportResponse response =
+ * designCenterClient.generateApplicationAssessmentReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * GenerateApplicationAssessmentReportResponse response =
+ * designCenterClient.generateApplicationAssessmentReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applications/$application`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationAssessmentReportRequest request =
+ * GenerateApplicationAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * GenerateApplicationAssessmentReportResponse response =
+ * designCenterClient.generateApplicationAssessmentReportAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationAssessmentReportRequest request =
+ * GenerateApplicationAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient
+ * .generateApplicationAssessmentReportOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * GenerateApplicationAssessmentReportResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ GenerateApplicationAssessmentReportRequest,
+ GenerateApplicationAssessmentReportResponse,
+ OperationMetadata>
+ generateApplicationAssessmentReportOperationCallable() {
+ return stub.generateApplicationAssessmentReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationAssessmentReportRequest request =
+ * GenerateApplicationAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateApplicationAssessmentReportCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * GenerateApplicationTemplateAssessmentReportResponse response =
+ * designCenterClient.generateApplicationTemplateAssessmentReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application template name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture<
+ GenerateApplicationTemplateAssessmentReportResponse, OperationMetadata>
+ generateApplicationTemplateAssessmentReportAsync(@Nullable ApplicationTemplateName name) {
+ GenerateApplicationTemplateAssessmentReportRequest request =
+ GenerateApplicationTemplateAssessmentReportRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return generateApplicationTemplateAssessmentReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * GenerateApplicationTemplateAssessmentReportResponse response =
+ * designCenterClient.generateApplicationTemplateAssessmentReportAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The application template name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture<
+ GenerateApplicationTemplateAssessmentReportResponse, OperationMetadata>
+ generateApplicationTemplateAssessmentReportAsync(String name) {
+ GenerateApplicationTemplateAssessmentReportRequest request =
+ GenerateApplicationTemplateAssessmentReportRequest.newBuilder().setName(name).build();
+ return generateApplicationTemplateAssessmentReportAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateAssessmentReportRequest request =
+ * GenerateApplicationTemplateAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * GenerateApplicationTemplateAssessmentReportResponse response =
+ * designCenterClient.generateApplicationTemplateAssessmentReportAsync(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<
+ GenerateApplicationTemplateAssessmentReportResponse, OperationMetadata>
+ generateApplicationTemplateAssessmentReportAsync(
+ GenerateApplicationTemplateAssessmentReportRequest request) {
+ return generateApplicationTemplateAssessmentReportOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateAssessmentReportRequest request =
+ * GenerateApplicationTemplateAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * OperationFuture
+ * future =
+ * designCenterClient
+ * .generateApplicationTemplateAssessmentReportOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * GenerateApplicationTemplateAssessmentReportResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ GenerateApplicationTemplateAssessmentReportRequest,
+ GenerateApplicationTemplateAssessmentReportResponse,
+ OperationMetadata>
+ generateApplicationTemplateAssessmentReportOperationCallable() {
+ return stub.generateApplicationTemplateAssessmentReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate Assessment Reports of an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationTemplateAssessmentReportRequest request =
+ * GenerateApplicationTemplateAssessmentReportRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setServiceAccount("serviceAccount1079137720")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient
+ * .generateApplicationTemplateAssessmentReportCallable()
+ * .futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableGenerate a best practice report for a given Terraform plan. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName spaceName = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * GenerateAssessmentReportResponse response =
+ * designCenterClient.generateAssessmentReportAsync(spaceName).get();
+ * }
+ * }
+ *
+ * @param spaceName Required. The name of the space at which Generate Assessment Report is called.
+ * Format: `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final OperationFutureGenerate a best practice report for a given Terraform plan. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String spaceName = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * GenerateAssessmentReportResponse response =
+ * designCenterClient.generateAssessmentReportAsync(spaceName).get();
+ * }
+ * }
+ *
+ * @param spaceName Required. The name of the space at which Generate Assessment Report is called.
+ * Format: `projects/$project/locations/$location/spaces/$space`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final OperationFutureGenerate a best practice report for a given Terraform plan. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateAssessmentReportRequest request =
+ * GenerateAssessmentReportRequest.newBuilder()
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .setSpaceName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .build();
+ * GenerateAssessmentReportResponse response =
+ * designCenterClient.generateAssessmentReportAsync(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
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final OperationFutureGenerate a best practice report for a given Terraform plan. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateAssessmentReportRequest request =
+ * GenerateAssessmentReportRequest.newBuilder()
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .setSpaceName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.generateAssessmentReportOperationCallable().futureCall(request);
+ * // Do something.
+ * GenerateAssessmentReportResponse response = future.get();
+ * }
+ * }
+ *
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final OperationCallable<
+ GenerateAssessmentReportRequest, GenerateAssessmentReportResponse, OperationMetadata>
+ generateAssessmentReportOperationCallable() {
+ return stub.generateAssessmentReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deprecated: Use GenerateTerraformPlanAssessmentReport instead.
+ *
+ * Generate a best practice report for a given Terraform plan. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateAssessmentReportRequest request =
+ * GenerateAssessmentReportRequest.newBuilder()
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .setSpaceName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateAssessmentReportCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ *
+ * @deprecated This method is deprecated and will be removed in the next major version update.
+ */
+ @Deprecated
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SpaceName name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]");
+ * ByteString terraformPlan = ByteString.EMPTY;
+ * GenerateTerraformPlanAssessmentReportResponse response =
+ * designCenterClient.generateTerraformPlanAssessmentReportAsync(name, terraformPlan).get();
+ * }
+ * }
+ *
+ * @param name Required. The parent resource in which to generate the assessment report. Format:
+ * projects/$project/locations/$location/spaces/$space
+ * @param terraformPlan Required. The raw JSON representation of the generated Terraform plan,
+ * provided as bytes.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name = SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString();
+ * ByteString terraformPlan = ByteString.EMPTY;
+ * GenerateTerraformPlanAssessmentReportResponse response =
+ * designCenterClient.generateTerraformPlanAssessmentReportAsync(name, terraformPlan).get();
+ * }
+ * }
+ *
+ * @param name Required. The parent resource in which to generate the assessment report. Format:
+ * projects/$project/locations/$location/spaces/$space
+ * @param terraformPlan Required. The raw JSON representation of the generated Terraform plan,
+ * provided as bytes.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateTerraformPlanAssessmentReportRequest request =
+ * GenerateTerraformPlanAssessmentReportRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .build();
+ * GenerateTerraformPlanAssessmentReportResponse response =
+ * designCenterClient.generateTerraformPlanAssessmentReportAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateTerraformPlanAssessmentReportRequest request =
+ * GenerateTerraformPlanAssessmentReportRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient
+ * .generateTerraformPlanAssessmentReportOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * GenerateTerraformPlanAssessmentReportResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ GenerateTerraformPlanAssessmentReportRequest,
+ GenerateTerraformPlanAssessmentReportResponse,
+ OperationMetadata>
+ generateTerraformPlanAssessmentReportOperationCallable() {
+ return stub.generateTerraformPlanAssessmentReportOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate a Terraform plan assessment report for a given Terraform plan.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateTerraformPlanAssessmentReportRequest request =
+ * GenerateTerraformPlanAssessmentReportRequest.newBuilder()
+ * .setName(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setTerraformPlan(ByteString.EMPTY)
+ * .addAllAdditionalFrameworks(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateTerraformPlanAssessmentReportCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * PolicyName name =
+ * PolicyName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[POLICY]");
+ * Policy response = designCenterClient.getPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The policy name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final com.google.cloud.designcenter.v1.Policy getPolicy(@Nullable PolicyName name) {
+ GetPolicyRequest request =
+ GetPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Policy related APIs. Get a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * PolicyName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[POLICY]")
+ * .toString();
+ * Policy response = designCenterClient.getPolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The policy name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final com.google.cloud.designcenter.v1.Policy getPolicy(String name) {
+ GetPolicyRequest request = GetPolicyRequest.newBuilder().setName(name).build();
+ return getPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Policy related APIs. Get a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetPolicyRequest request =
+ * GetPolicyRequest.newBuilder()
+ * .setName(
+ * PolicyName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[POLICY]")
+ * .toString())
+ * .build();
+ * Policy response = designCenterClient.getPolicy(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 com.google.cloud.designcenter.v1.Policy getPolicy(GetPolicyRequest request) {
+ return getPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Policy related APIs. Get a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetPolicyRequest request =
+ * GetPolicyRequest.newBuilder()
+ * .setName(
+ * PolicyName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[POLICY]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.getPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * for (Policy element : designCenterClient.listPolicies(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent application template from which policies are listed in the
+ * following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPoliciesPagedResponse listPolicies(@Nullable ApplicationTemplateName parent) {
+ ListPoliciesRequest request =
+ ListPoliciesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists policies for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * for (Policy element : designCenterClient.listPolicies(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent application template from which policies are listed in the
+ * following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPoliciesPagedResponse listPolicies(String parent) {
+ ListPoliciesRequest request = ListPoliciesRequest.newBuilder().setParent(parent).build();
+ return listPolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists policies for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListPoliciesRequest request =
+ * ListPoliciesRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Policy element : designCenterClient.listPolicies(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 ListPoliciesPagedResponse listPolicies(ListPoliciesRequest request) {
+ return listPoliciesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists policies for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListPoliciesRequest request =
+ * ListPoliciesRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = designCenterClient.listPoliciesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Policy element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListPoliciesRequest request =
+ * ListPoliciesRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListPoliciesResponse response = designCenterClient.listPoliciesCallable().call(request);
+ * for (Policy element : response.getPoliciesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * Policy policy = Policy.newBuilder().build();
+ * String policyId = "policyId546908653";
+ * Policy response = designCenterClient.createPolicy(parent, policy, policyId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the policy in the following
+ * format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @param policy Required. The policy to create.
+ * @param policyId Required. The ID of the policy to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final com.google.cloud.designcenter.v1.Policy createPolicy(
+ @Nullable ApplicationTemplateName parent,
+ com.google.cloud.designcenter.v1.Policy policy,
+ String policyId) {
+ CreatePolicyRequest request =
+ CreatePolicyRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setPolicy(policy)
+ .setPolicyId(policyId)
+ .build();
+ return createPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * Policy policy = Policy.newBuilder().build();
+ * String policyId = "policyId546908653";
+ * Policy response = designCenterClient.createPolicy(parent, policy, policyId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource in which to create the policy in the following
+ * format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate`
+ * @param policy Required. The policy to create.
+ * @param policyId Required. The ID of the policy to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final com.google.cloud.designcenter.v1.Policy createPolicy(
+ String parent, com.google.cloud.designcenter.v1.Policy policy, String policyId) {
+ CreatePolicyRequest request =
+ CreatePolicyRequest.newBuilder()
+ .setParent(parent)
+ .setPolicy(policy)
+ .setPolicyId(policyId)
+ .build();
+ return createPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreatePolicyRequest request =
+ * CreatePolicyRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPolicyId("policyId546908653")
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = designCenterClient.createPolicy(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 com.google.cloud.designcenter.v1.Policy createPolicy(CreatePolicyRequest request) {
+ return createPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a policy for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * CreatePolicyRequest request =
+ * CreatePolicyRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPolicyId("policyId546908653")
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.createPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * Policy policy = Policy.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Policy response = designCenterClient.updatePolicy(policy, updateMask);
+ * }
+ * }
+ *
+ * @param policy Required. The policy to update.
+ * @param updateMask Optional. The fields to overwrite in the policy update. The fields specified
+ * in the update_mask are relative to the resource, not the full request. A field will be
+ * overwritten if it is in the mask. If you don't provide a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final com.google.cloud.designcenter.v1.Policy updatePolicy(
+ com.google.cloud.designcenter.v1.Policy policy, FieldMask updateMask) {
+ UpdatePolicyRequest request =
+ UpdatePolicyRequest.newBuilder().setPolicy(policy).setUpdateMask(updateMask).build();
+ return updatePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdatePolicyRequest request =
+ * UpdatePolicyRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * Policy response = designCenterClient.updatePolicy(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 com.google.cloud.designcenter.v1.Policy updatePolicy(UpdatePolicyRequest request) {
+ return updatePolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * UpdatePolicyRequest request =
+ * UpdatePolicyRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPolicy(Policy.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.updatePolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * PolicyName name =
+ * PolicyName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[POLICY]");
+ * designCenterClient.deletePolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The policy name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePolicy(@Nullable PolicyName name) {
+ DeletePolicyRequest request =
+ DeletePolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deletePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * PolicyName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[POLICY]")
+ * .toString();
+ * designCenterClient.deletePolicy(name);
+ * }
+ * }
+ *
+ * @param name Required. The policy name in the following format:
+ * `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePolicy(String name) {
+ DeletePolicyRequest request = DeletePolicyRequest.newBuilder().setName(name).build();
+ deletePolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeletePolicyRequest request =
+ * DeletePolicyRequest.newBuilder()
+ * .setName(
+ * PolicyName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[POLICY]")
+ * .toString())
+ * .build();
+ * designCenterClient.deletePolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePolicy(DeletePolicyRequest request) {
+ deletePolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * DeletePolicyRequest request =
+ * DeletePolicyRequest.newBuilder()
+ * .setName(
+ * PolicyName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[POLICY]")
+ * .toString())
+ * .build();
+ * ApiFuture future = designCenterClient.deletePolicyCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = "parent-995424086";
+ * for (Framework element : designCenterClient.fetchFrameworks(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource name. Format:
+ * projects/{project}/locations/{location}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final FetchFrameworksPagedResponse fetchFrameworks(String parent) {
+ FetchFrameworksRequest request = FetchFrameworksRequest.newBuilder().setParent(parent).build();
+ return fetchFrameworks(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches all frameworks for assessment report.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * FetchFrameworksRequest request =
+ * FetchFrameworksRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .addAllProjects(new ArrayList())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Framework element : designCenterClient.fetchFrameworks(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 FetchFrameworksPagedResponse fetchFrameworks(FetchFrameworksRequest request) {
+ return fetchFrameworksPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Fetches all frameworks for assessment report.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * FetchFrameworksRequest request =
+ * FetchFrameworksRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .addAllProjects(new ArrayList())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.fetchFrameworksPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Framework element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * FetchFrameworksRequest request =
+ * FetchFrameworksRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .addAllProjects(new ArrayList())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * FetchFrameworksResponse response =
+ * designCenterClient.fetchFrameworksCallable().call(request);
+ * for (Framework element : response.getFrameworksList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * GenerateApplicationIaCResponse response = designCenterClient.generateApplicationIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationIaCResponse generateApplicationIaC(
+ @Nullable ApplicationName name) {
+ GenerateApplicationIaCRequest request =
+ GenerateApplicationIaCRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return generateApplicationIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * GenerateApplicationIaCResponse response = designCenterClient.generateApplicationIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateApplicationIaCResponse generateApplicationIaC(String name) {
+ GenerateApplicationIaCRequest request =
+ GenerateApplicationIaCRequest.newBuilder().setName(name).build();
+ return generateApplicationIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationIaCRequest request =
+ * GenerateApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setIacFormat(IACFormat.forNumber(0))
+ * .setGcsUri("gcsUri-1251224875")
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * GenerateApplicationIaCResponse response = designCenterClient.generateApplicationIaC(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 GenerateApplicationIaCResponse generateApplicationIaC(
+ GenerateApplicationIaCRequest request) {
+ return generateApplicationIaCCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates Terraform files for an application.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GenerateApplicationIaCRequest request =
+ * GenerateApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setIacFormat(IACFormat.forNumber(0))
+ * .setGcsUri("gcsUri-1251224875")
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.generateApplicationIaCCallable().futureCall(request);
+ * // Do something.
+ * GenerateApplicationIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * ExportApplicationIaCResponse response =
+ * designCenterClient.exportApplicationIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * ExportApplicationIaCResponse response =
+ * designCenterClient.exportApplicationIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationIaCRequest request =
+ * ExportApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setIacFormat(IACFormat.forNumber(0))
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ExportApplicationIaCResponse response =
+ * designCenterClient.exportApplicationIaCAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationIaCRequest request =
+ * ExportApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setIacFormat(IACFormat.forNumber(0))
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.exportApplicationIaCOperationCallable().futureCall(request);
+ * // Do something.
+ * ExportApplicationIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ ExportApplicationIaCRequest, ExportApplicationIaCResponse, OperationMetadata>
+ exportApplicationIaCOperationCallable() {
+ return stub.exportApplicationIaCOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Exports Terraform files for an application asynchronously.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ExportApplicationIaCRequest request =
+ * ExportApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setIacFormat(IACFormat.forNumber(0))
+ * .setArtifactLocation(ArtifactLocation.newBuilder().build())
+ * .setExportIacConfig(ExportIaCConfig.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.exportApplicationIaCCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * ImportApplicationTemplateIaCResponse response =
+ * designCenterClient.importApplicationTemplateIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportApplicationTemplateIaCResponse importApplicationTemplateIaC(
+ @Nullable ApplicationTemplateName name) {
+ ImportApplicationTemplateIaCRequest request =
+ ImportApplicationTemplateIaCRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return importApplicationTemplateIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * ImportApplicationTemplateIaCResponse response =
+ * designCenterClient.importApplicationTemplateIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportApplicationTemplateIaCResponse importApplicationTemplateIaC(String name) {
+ ImportApplicationTemplateIaCRequest request =
+ ImportApplicationTemplateIaCRequest.newBuilder().setName(name).build();
+ return importApplicationTemplateIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationTemplateIaCRequest request =
+ * ImportApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setAllowPartialImport(true)
+ * .setValidateIac(true)
+ * .build();
+ * ImportApplicationTemplateIaCResponse response =
+ * designCenterClient.importApplicationTemplateIaC(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 ImportApplicationTemplateIaCResponse importApplicationTemplateIaC(
+ ImportApplicationTemplateIaCRequest request) {
+ return importApplicationTemplateIaCCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationTemplateIaCRequest request =
+ * ImportApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setAllowPartialImport(true)
+ * .setValidateIac(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.importApplicationTemplateIaCCallable().futureCall(request);
+ * // Do something.
+ * ImportApplicationTemplateIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ImportApplicationTemplateIaCRequest, ImportApplicationTemplateIaCResponse>
+ importApplicationTemplateIaCCallable() {
+ return stub.importApplicationTemplateIaCCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Ingests IaC for an application template asynchronously.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName name =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * IngestApplicationTemplateIaCResponse response =
+ * designCenterClient.ingestApplicationTemplateIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * IngestApplicationTemplateIaCResponse response =
+ * designCenterClient.ingestApplicationTemplateIaCAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application template.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * IngestApplicationTemplateIaCRequest request =
+ * IngestApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setValidateCatalogCompatibility(true)
+ * .setRawTerraformImportEnabled(true)
+ * .build();
+ * IngestApplicationTemplateIaCResponse response =
+ * designCenterClient.ingestApplicationTemplateIaCAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * IngestApplicationTemplateIaCRequest request =
+ * IngestApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setValidateCatalogCompatibility(true)
+ * .setRawTerraformImportEnabled(true)
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.ingestApplicationTemplateIaCOperationCallable().futureCall(request);
+ * // Do something.
+ * IngestApplicationTemplateIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ IngestApplicationTemplateIaCRequest,
+ IngestApplicationTemplateIaCResponse,
+ OperationMetadata>
+ ingestApplicationTemplateIaCOperationCallable() {
+ return stub.ingestApplicationTemplateIaCOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Ingests IaC for an application template asynchronously.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * IngestApplicationTemplateIaCRequest request =
+ * IngestApplicationTemplateIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setValidateCatalogCompatibility(true)
+ * .setRawTerraformImportEnabled(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.ingestApplicationTemplateIaCCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * ImportApplicationIaCResponse response = designCenterClient.importApplicationIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportApplicationIaCResponse importApplicationIaC(@Nullable ApplicationName name) {
+ ImportApplicationIaCRequest request =
+ ImportApplicationIaCRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return importApplicationIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * ImportApplicationIaCResponse response = designCenterClient.importApplicationIaC(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the application.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ImportApplicationIaCResponse importApplicationIaC(String name) {
+ ImportApplicationIaCRequest request =
+ ImportApplicationIaCRequest.newBuilder().setName(name).build();
+ return importApplicationIaC(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationIaCRequest request =
+ * ImportApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setAllowPartialImport(true)
+ * .setValidateIac(true)
+ * .build();
+ * ImportApplicationIaCResponse response = designCenterClient.importApplicationIaC(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 ImportApplicationIaCResponse importApplicationIaC(
+ ImportApplicationIaCRequest request) {
+ return importApplicationIaCCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Imports IaC for an application resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ImportApplicationIaCRequest request =
+ * ImportApplicationIaCRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .setAllowPartialImport(true)
+ * .setValidateIac(true)
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.importApplicationIaCCallable().futureCall(request);
+ * // Do something.
+ * ImportApplicationIaCResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * String apphubApplication = "apphubApplication104302972";
+ * String tfstateContent = "tfstateContent-1547770342";
+ * RegisterAppHubApplicationResourcesResponse response =
+ * designCenterClient
+ * .registerAppHubApplicationResourcesAsync(parent, apphubApplication, tfstateContent)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location. Format: projects/{project}/locations/{location}
+ * @param apphubApplication Required. The name of the AppHub Application. Format:
+ * projects/{project}/locations/{location}/applications/{application}
+ * @param tfstateContent Optional. The Terraform state (tfstate) content as a raw string. For
+ * large state files exceeding 10MB, use the 'tfstate_signed_gcs_uri' field instead.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * String apphubApplication = "apphubApplication104302972";
+ * String tfstateContent = "tfstateContent-1547770342";
+ * RegisterAppHubApplicationResourcesResponse response =
+ * designCenterClient
+ * .registerAppHubApplicationResourcesAsync(parent, apphubApplication, tfstateContent)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent location. Format: projects/{project}/locations/{location}
+ * @param apphubApplication Required. The name of the AppHub Application. Format:
+ * projects/{project}/locations/{location}/applications/{application}
+ * @param tfstateContent Optional. The Terraform state (tfstate) content as a raw string. For
+ * large state files exceeding 10MB, use the 'tfstate_signed_gcs_uri' field instead.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RegisterAppHubApplicationResourcesRequest request =
+ * RegisterAppHubApplicationResourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setApphubApplication("apphubApplication104302972")
+ * .build();
+ * RegisterAppHubApplicationResourcesResponse response =
+ * designCenterClient.registerAppHubApplicationResourcesAsync(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 OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RegisterAppHubApplicationResourcesRequest request =
+ * RegisterAppHubApplicationResourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setApphubApplication("apphubApplication104302972")
+ * .build();
+ * OperationFuture future =
+ * designCenterClient
+ * .registerAppHubApplicationResourcesOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * RegisterAppHubApplicationResourcesResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ RegisterAppHubApplicationResourcesRequest,
+ RegisterAppHubApplicationResourcesResponse,
+ OperationMetadata>
+ registerAppHubApplicationResourcesOperationCallable() {
+ return stub.registerAppHubApplicationResourcesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Register deployed resources from terraform state file with App Hub without needing a space.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RegisterAppHubApplicationResourcesRequest request =
+ * RegisterAppHubApplicationResourcesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setApphubApplication("apphubApplication104302972")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.registerAppHubApplicationResourcesCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateName parent =
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]");
+ * for (ApplicationTemplateSystemRevision element :
+ * designCenterClient.listApplicationTemplateSystemRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent Application Template from which to list the system
+ * revisions. Format:
+ * projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplateSystemRevisionsPagedResponse
+ listApplicationTemplateSystemRevisions(@Nullable ApplicationTemplateName parent) {
+ ListApplicationTemplateSystemRevisionsRequest request =
+ ListApplicationTemplateSystemRevisionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listApplicationTemplateSystemRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template system revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String parent =
+ * ApplicationTemplateName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString();
+ * for (ApplicationTemplateSystemRevision element :
+ * designCenterClient.listApplicationTemplateSystemRevisions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent Application Template from which to list the system
+ * revisions. Format:
+ * projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListApplicationTemplateSystemRevisionsPagedResponse
+ listApplicationTemplateSystemRevisions(String parent) {
+ ListApplicationTemplateSystemRevisionsRequest request =
+ ListApplicationTemplateSystemRevisionsRequest.newBuilder().setParent(parent).build();
+ return listApplicationTemplateSystemRevisions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template system revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateSystemRevisionsRequest request =
+ * ListApplicationTemplateSystemRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (ApplicationTemplateSystemRevision element :
+ * designCenterClient.listApplicationTemplateSystemRevisions(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 ListApplicationTemplateSystemRevisionsPagedResponse
+ listApplicationTemplateSystemRevisions(
+ ListApplicationTemplateSystemRevisionsRequest request) {
+ return listApplicationTemplateSystemRevisionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template system revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateSystemRevisionsRequest request =
+ * ListApplicationTemplateSystemRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient
+ * .listApplicationTemplateSystemRevisionsPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (ApplicationTemplateSystemRevision element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListApplicationTemplateSystemRevisionsRequest,
+ ListApplicationTemplateSystemRevisionsPagedResponse>
+ listApplicationTemplateSystemRevisionsPagedCallable() {
+ return stub.listApplicationTemplateSystemRevisionsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists application template system revisions in a given application template.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListApplicationTemplateSystemRevisionsRequest request =
+ * ListApplicationTemplateSystemRevisionsRequest.newBuilder()
+ * .setParent(
+ * ApplicationTemplateName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListApplicationTemplateSystemRevisionsResponse response =
+ * designCenterClient.listApplicationTemplateSystemRevisionsCallable().call(request);
+ * for (ApplicationTemplateSystemRevision element :
+ * response.getApplicationTemplateSystemRevisionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListApplicationTemplateSystemRevisionsRequest,
+ ListApplicationTemplateSystemRevisionsResponse>
+ listApplicationTemplateSystemRevisionsCallable() {
+ return stub.listApplicationTemplateSystemRevisionsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the given application template system revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationTemplateSystemRevisionName name =
+ * ApplicationTemplateSystemRevisionName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION_TEMPLATE]", "[SYSTEM_REVISION]");
+ * ApplicationTemplateSystemRevision response =
+ * designCenterClient.getApplicationTemplateSystemRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the ApplicationTemplateSystemRevision to retrieve. Format:
+ * projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/systemRevisions/{system_revision}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateSystemRevision getApplicationTemplateSystemRevision(
+ @Nullable ApplicationTemplateSystemRevisionName name) {
+ GetApplicationTemplateSystemRevisionRequest request =
+ GetApplicationTemplateSystemRevisionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getApplicationTemplateSystemRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the given application template system revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationTemplateSystemRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[SYSTEM_REVISION]")
+ * .toString();
+ * ApplicationTemplateSystemRevision response =
+ * designCenterClient.getApplicationTemplateSystemRevision(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the ApplicationTemplateSystemRevision to retrieve. Format:
+ * projects/{project}/locations/{location}/spaces/{space}/applicationTemplates/{application_template}/systemRevisions/{system_revision}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ApplicationTemplateSystemRevision getApplicationTemplateSystemRevision(String name) {
+ GetApplicationTemplateSystemRevisionRequest request =
+ GetApplicationTemplateSystemRevisionRequest.newBuilder().setName(name).build();
+ return getApplicationTemplateSystemRevision(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the given application template system revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateSystemRevisionRequest request =
+ * GetApplicationTemplateSystemRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateSystemRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[SYSTEM_REVISION]")
+ * .toString())
+ * .build();
+ * ApplicationTemplateSystemRevision response =
+ * designCenterClient.getApplicationTemplateSystemRevision(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 ApplicationTemplateSystemRevision getApplicationTemplateSystemRevision(
+ GetApplicationTemplateSystemRevisionRequest request) {
+ return getApplicationTemplateSystemRevisionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the given application template system revision.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetApplicationTemplateSystemRevisionRequest request =
+ * GetApplicationTemplateSystemRevisionRequest.newBuilder()
+ * .setName(
+ * ApplicationTemplateSystemRevisionName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[SPACE]",
+ * "[APPLICATION_TEMPLATE]",
+ * "[SYSTEM_REVISION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.getApplicationTemplateSystemRevisionCallable().futureCall(request);
+ * // Do something.
+ * ApplicationTemplateSystemRevision response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GetApplicationTemplateSystemRevisionRequest, ApplicationTemplateSystemRevision>
+ getApplicationTemplateSystemRevisionCallable() {
+ return stub.getApplicationTemplateSystemRevisionCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets recommended IAM roles for an application.
+ *
+ * Evaluates the infrastructure resources defined by an application (including its template + * configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you + * must configure before you deploy across target projects. + * + *
The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, + * the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API + * recommendations. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ApplicationName name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]");
+ * RecommendIAMRolesResponse response = designCenterClient.recommendIAMRolesAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application resource for which to recommend IAM roles.
+ * Format: projects/$project/locations/$location/spaces/$space/applications/$application
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureEvaluates the infrastructure resources defined by an application (including its template + * configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you + * must configure before you deploy across target projects. + * + *
The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, + * the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API + * recommendations. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * String name =
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]").toString();
+ * RecommendIAMRolesResponse response = designCenterClient.recommendIAMRolesAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the application resource for which to recommend IAM roles.
+ * Format: projects/$project/locations/$location/spaces/$space/applications/$application
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureEvaluates the infrastructure resources defined by an application (including its template + * configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you + * must configure before you deploy across target projects. + * + *
The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, + * the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API + * recommendations. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RecommendIAMRolesRequest request =
+ * RecommendIAMRolesRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * RecommendIAMRolesResponse response = designCenterClient.recommendIAMRolesAsync(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 OperationFutureEvaluates the infrastructure resources defined by an application (including its template + * configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you + * must configure before you deploy across target projects. + * + *
The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, + * the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API + * recommendations. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RecommendIAMRolesRequest request =
+ * RecommendIAMRolesRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * OperationFuture future =
+ * designCenterClient.recommendIAMRolesOperationCallable().futureCall(request);
+ * // Do something.
+ * RecommendIAMRolesResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ RecommendIAMRolesRequest, RecommendIAMRolesResponse, OperationMetadata>
+ recommendIAMRolesOperationCallable() {
+ return stub.recommendIAMRolesOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets recommended IAM roles for an application.
+ *
+ * Evaluates the infrastructure resources defined by an application (including its template + * configuration and parameters) to determine the set of IAM roles and Google Cloud APIs that you + * must configure before you deploy across target projects. + * + *
The operation is asynchronous and returns a `google.longrunning.Operation`. Upon completion, + * the operation result contains a `RecommendIAMRolesResponse` with project-level IAM role and API + * recommendations. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * RecommendIAMRolesRequest request =
+ * RecommendIAMRolesRequest.newBuilder()
+ * .setName(
+ * ApplicationName.of("[PROJECT]", "[LOCATION]", "[SPACE]", "[APPLICATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.recommendIAMRolesCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThis method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : designCenterClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableThis method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = designCenterClient.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 UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = designCenterClient.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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = designCenterClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableCan 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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = designCenterClient.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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = designCenterClient.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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = designCenterClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableNote: 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 (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = designCenterClient.testIamPermissions(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (DesignCenterClient designCenterClient = DesignCenterClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(SpaceName.of("[PROJECT]", "[LOCATION]", "[SPACE]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * designCenterClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable