Class ApiHubPluginClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) {
PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]");
Plugin response = apiHubPluginClient.getPlugin(name);
}
Note: close() needs to be called on the ApiHubPluginClient 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 |
|---|---|---|
GetPlugin |
Get an API Hub plugin. |
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.
|
EnablePlugin |
Enables a plugin. The `state` of the plugin after enabling is `ENABLED` |
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.
|
DisablePlugin |
Disables a plugin. The `state` of the plugin after disabling is `DISABLED` |
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.
|
CreatePlugin |
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances. |
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.
|
ListPlugins |
List all the plugins 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.
|
DeletePlugin |
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method. |
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.
|
CreatePluginInstance |
Creates a Plugin instance in the API hub. |
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.
|
ExecutePluginInstanceAction |
Executes a plugin instance in the API hub. |
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.
|
GetPluginInstance |
Get an API Hub plugin instance. |
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.
|
ListPluginInstances |
List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id} |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
EnablePluginInstanceAction |
Enables a plugin instance in the API hub. |
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.
|
DisablePluginInstanceAction |
Disables a plugin instance in the API hub. |
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.
|
UpdatePluginInstance |
Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:
The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated. To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method. |
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.
|
DeletePluginInstance |
Deletes a plugin instance in the API hub. |
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. |
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.
|
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 ApiHubPluginSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ApiHubPluginSettings apiHubPluginSettings =
ApiHubPluginSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create(apiHubPluginSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ApiHubPluginSettings apiHubPluginSettings =
ApiHubPluginSettings.newBuilder().setEndpoint(myEndpoint).build();
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create(apiHubPluginSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApiHubPluginClient(ApiHubPluginSettings settings) Constructs an instance of ApiHubPluginClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final ApiHubPluginClientcreate()Constructs an instance of ApiHubPluginClient with default settings.static final ApiHubPluginClientcreate(ApiHubPluginSettings settings) Constructs an instance of ApiHubPluginClient, using the given settings.static final ApiHubPluginClientcreate(ApiHubPluginStub stub) Constructs an instance of ApiHubPluginClient, using the given stub for making calls.final PlugincreatePlugin(CreatePluginRequest request) Create an API Hub plugin resource in the API hub.final PlugincreatePlugin(LocationName parent, Plugin plugin, String pluginId) Create an API Hub plugin resource in the API hub.final PlugincreatePlugin(String parent, Plugin plugin, String pluginId) Create an API Hub plugin resource in the API hub.Create an API Hub plugin resource in the API hub.Creates a Plugin instance in the API hub.createPluginInstanceAsync(PluginName parent, PluginInstance pluginInstance, String pluginInstanceId) Creates a Plugin instance in the API hub.createPluginInstanceAsync(String parent, PluginInstance pluginInstance, String pluginInstanceId) Creates a Plugin instance in the API hub.Creates a Plugin instance in the API hub.Creates a Plugin instance in the API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(DeletePluginRequest request) Delete a Plugin in API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(PluginName name) Delete a Plugin in API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(String name) Delete a Plugin in API hub.Delete a Plugin in API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a plugin instance in the API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a plugin instance in the API hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a plugin instance in the API hub.Deletes a plugin instance in the API hub.final OperationCallable<DeletePluginInstanceRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a plugin instance in the API hub.final OperationCallable<DeletePluginRequest,com.google.protobuf.Empty, OperationMetadata> Delete a Plugin in API hub.final PlugindisablePlugin(DisablePluginRequest request) Disables a plugin.final PlugindisablePlugin(PluginName name) Disables a plugin.final PlugindisablePlugin(String name) Disables a plugin.Disables a plugin.Disables a plugin instance in the API hub.disablePluginInstanceActionAsync(PluginInstanceName name, String actionId) Disables a plugin instance in the API hub.disablePluginInstanceActionAsync(String name, String actionId) Disables a plugin instance in the API hub.Disables a plugin instance in the API hub.final OperationCallable<DisablePluginInstanceActionRequest,DisablePluginInstanceActionResponse, OperationMetadata> Disables a plugin instance in the API hub.final PluginenablePlugin(EnablePluginRequest request) Enables a plugin.final PluginenablePlugin(PluginName name) Enables a plugin.final PluginenablePlugin(String name) Enables a plugin.Enables a plugin.Enables a plugin instance in the API hub.enablePluginInstanceActionAsync(PluginInstanceName name, String actionId) Enables a plugin instance in the API hub.enablePluginInstanceActionAsync(String name, String actionId) Enables a plugin instance in the API hub.Enables a plugin instance in the API hub.final OperationCallable<EnablePluginInstanceActionRequest,EnablePluginInstanceActionResponse, OperationMetadata> Enables a plugin instance in the API hub.Executes a plugin instance in the API hub.executePluginInstanceActionAsync(PluginInstanceName name, ActionExecutionDetail actionExecutionDetail) Executes a plugin instance in the API hub.executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail) Executes a plugin instance in the API hub.Executes a plugin instance in the API hub.final OperationCallable<ExecutePluginInstanceActionRequest,ExecutePluginInstanceActionResponse, OperationMetadata> Executes a plugin instance in the API hub.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final PlugingetPlugin(GetPluginRequest request) Get an API Hub plugin.final PlugingetPlugin(PluginName name) Get an API Hub plugin.final PluginGet an API Hub plugin.final UnaryCallable<GetPluginRequest,Plugin> Get an API Hub plugin.final PluginInstanceGet an API Hub plugin instance.final PluginInstanceGet an API Hub plugin instance.final PluginInstancegetPluginInstance(String name) Get an API Hub plugin instance.Get an API Hub plugin instance.final ApiHubPluginSettingsgetStub()booleanbooleanlistLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}listPluginInstances(PluginName parent) List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}listPluginInstances(String parent) List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}listPlugins(ListPluginsRequest request) List all the plugins in a given project and location.listPlugins(LocationName parent) List all the plugins in a given project and location.listPlugins(String parent) List all the plugins in a given project and location.List all the plugins in a given project and location.List all the plugins in a given project and location.voidshutdown()voidfinal PluginInstanceupdatePluginInstance(PluginInstance pluginInstance, com.google.protobuf.FieldMask updateMask) Updates a plugin instance in the API hub.final PluginInstanceUpdates a plugin instance in the API hub.Updates a plugin instance in the API hub.
-
Constructor Details
-
ApiHubPluginClient
Constructs an instance of ApiHubPluginClient, 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.- Throws:
IOException
-
ApiHubPluginClient
-
-
Method Details
-
create
Constructs an instance of ApiHubPluginClient with default settings.- Throws:
IOException
-
create
Constructs an instance of ApiHubPluginClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of ApiHubPluginClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiHubPluginSettings). -
getSettings
-
getStub
-
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getPlugin
Get an API Hub plugin.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); Plugin response = apiHubPluginClient.getPlugin(name); }- Parameters:
name- Required. The name of the plugin to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
getPlugin
Get an API Hub plugin.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); Plugin response = apiHubPluginClient.getPlugin(name); }- Parameters:
name- Required. The name of the plugin to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
getPlugin
Get an API Hub plugin.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetPluginRequest request = GetPluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); Plugin response = apiHubPluginClient.getPlugin(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPluginCallable
Get an API Hub plugin.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetPluginRequest request = GetPluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); ApiFuture<Plugin> future = apiHubPluginClient.getPluginCallable().futureCall(request); // Do something. Plugin response = future.get(); } -
enablePlugin
Enables a plugin. The `state` of the plugin after enabling is `ENABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); Plugin response = apiHubPluginClient.enablePlugin(name); }- Parameters:
name- Required. The name of the plugin to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
enablePlugin
Enables a plugin. The `state` of the plugin after enabling is `ENABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); Plugin response = apiHubPluginClient.enablePlugin(name); }- Parameters:
name- Required. The name of the plugin to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
enablePlugin
Enables a plugin. The `state` of the plugin after enabling is `ENABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { EnablePluginRequest request = EnablePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); Plugin response = apiHubPluginClient.enablePlugin(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
enablePluginCallable
Enables a plugin. The `state` of the plugin after enabling is `ENABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { EnablePluginRequest request = EnablePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); ApiFuture<Plugin> future = apiHubPluginClient.enablePluginCallable().futureCall(request); // Do something. Plugin response = future.get(); } -
disablePlugin
Disables a plugin. The `state` of the plugin after disabling is `DISABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); Plugin response = apiHubPluginClient.disablePlugin(name); }- Parameters:
name- Required. The name of the plugin to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
disablePlugin
Disables a plugin. The `state` of the plugin after disabling is `DISABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); Plugin response = apiHubPluginClient.disablePlugin(name); }- Parameters:
name- Required. The name of the plugin to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}`.- Throws:
ApiException- if the remote call fails
-
disablePlugin
Disables a plugin. The `state` of the plugin after disabling is `DISABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DisablePluginRequest request = DisablePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); Plugin response = apiHubPluginClient.disablePlugin(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
disablePluginCallable
Disables a plugin. The `state` of the plugin after disabling is `DISABLED`Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DisablePluginRequest request = DisablePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); ApiFuture<Plugin> future = apiHubPluginClient.disablePluginCallable().futureCall(request); // Do something. Plugin response = future.get(); } -
createPlugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Plugin plugin = Plugin.newBuilder().build(); String pluginId = "pluginId-1859618898"; Plugin response = apiHubPluginClient.createPlugin(parent, plugin, pluginId); }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`.plugin- Required. The plugin to create.pluginId- Optional. The ID to use for the Plugin resource, which will become the final component of the Plugin's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if the specified id is already used by another Plugin resource in the API hub instance.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, overall resource name which will be of format `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/.
- Throws:
ApiException- if the remote call fails
-
createPlugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Plugin plugin = Plugin.newBuilder().build(); String pluginId = "pluginId-1859618898"; Plugin response = apiHubPluginClient.createPlugin(parent, plugin, pluginId); }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`.plugin- Required. The plugin to create.pluginId- Optional. The ID to use for the Plugin resource, which will become the final component of the Plugin's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if the specified id is already used by another Plugin resource in the API hub instance.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, overall resource name which will be of format `projects/{project}/locations/{location}/plugins/{plugin}`, its length is limited to 1000 characters and valid characters are /[a-z][A-Z][0-9]-_/.
- Throws:
ApiException- if the remote call fails
-
createPlugin
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { CreatePluginRequest request = CreatePluginRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPluginId("pluginId-1859618898") .setPlugin(Plugin.newBuilder().build()) .build(); Plugin response = apiHubPluginClient.createPlugin(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPluginCallable
Create an API Hub plugin resource in the API hub. Once a plugin is created, it can be used to create plugin instances.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { CreatePluginRequest request = CreatePluginRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPluginId("pluginId-1859618898") .setPlugin(Plugin.newBuilder().build()) .build(); ApiFuture<Plugin> future = apiHubPluginClient.createPluginCallable().futureCall(request); // Do something. Plugin response = future.get(); } -
listPlugins
List all the plugins in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Plugin element : apiHubPluginClient.listPlugins(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listPlugins
List all the plugins in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Plugin element : apiHubPluginClient.listPlugins(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listPlugins
List all the plugins in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginsRequest request = ListPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Plugin element : apiHubPluginClient.listPlugins(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPluginsPagedCallable
public final UnaryCallable<ListPluginsRequest,ApiHubPluginClient.ListPluginsPagedResponse> listPluginsPagedCallable()List all the plugins in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginsRequest request = ListPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Plugin> future = apiHubPluginClient.listPluginsPagedCallable().futureCall(request); // Do something. for (Plugin element : future.get().iterateAll()) { // doThingsWith(element); } } -
listPluginsCallable
List all the plugins in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginsRequest request = ListPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListPluginsResponse response = apiHubPluginClient.listPluginsCallable().call(request); for (Plugin element : response.getPluginsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
deletePluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(PluginName name) Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); apiHubPluginClient.deletePluginAsync(name).get(); }- Parameters:
name- Required. The name of the Plugin resource to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}`- Throws:
ApiException- if the remote call fails
-
deletePluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(String name) Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); apiHubPluginClient.deletePluginAsync(name).get(); }- Parameters:
name- Required. The name of the Plugin resource to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}`- Throws:
ApiException- if the remote call fails
-
deletePluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginAsync(DeletePluginRequest request) Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginRequest request = DeletePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); apiHubPluginClient.deletePluginAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deletePluginOperationCallable
public final OperationCallable<DeletePluginRequest,com.google.protobuf.Empty, deletePluginOperationCallable()OperationMetadata> Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginRequest request = DeletePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = apiHubPluginClient.deletePluginOperationCallable().futureCall(request); // Do something. future.get(); } -
deletePluginCallable
Delete a Plugin in API hub. Note, only user owned plugins can be deleted via this method.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginRequest request = DeletePluginRequest.newBuilder() .setName(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .build(); ApiFuture<Operation> future = apiHubPluginClient.deletePluginCallable().futureCall(request); // Do something. future.get(); } -
createPluginInstanceAsync
public final OperationFuture<PluginInstance,OperationMetadata> createPluginInstanceAsync(PluginName parent, PluginInstance pluginInstance, String pluginInstanceId) Creates a Plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); PluginInstance pluginInstance = PluginInstance.newBuilder().build(); String pluginInstanceId = "pluginInstanceId-1741818845"; PluginInstance response = apiHubPluginClient .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId) .get(); }- Parameters:
parent- Required. The parent of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}`pluginInstance- Required. The plugin instance to create.pluginInstanceId- Optional. The ID to use for the plugin instance, which will become the final component of the plugin instance's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if the specified id is already used by another plugin instance in the plugin resource.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
- Throws:
ApiException- if the remote call fails
-
createPluginInstanceAsync
public final OperationFuture<PluginInstance,OperationMetadata> createPluginInstanceAsync(String parent, PluginInstance pluginInstance, String pluginInstanceId) Creates a Plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); PluginInstance pluginInstance = PluginInstance.newBuilder().build(); String pluginInstanceId = "pluginInstanceId-1741818845"; PluginInstance response = apiHubPluginClient .createPluginInstanceAsync(parent, pluginInstance, pluginInstanceId) .get(); }- Parameters:
parent- Required. The parent of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}`pluginInstance- Required. The plugin instance to create.pluginInstanceId- Optional. The ID to use for the plugin instance, which will become the final component of the plugin instance's resource name. This field is optional.- If provided, the same will be used. The service will throw an error if the specified id is already used by another plugin instance in the plugin resource.
- If not provided, a system generated id will be used.
This value should be 4-63 characters, and valid characters are /[a-z][A-Z][0-9]-_/.
- Throws:
ApiException- if the remote call fails
-
createPluginInstanceAsync
public final OperationFuture<PluginInstance,OperationMetadata> createPluginInstanceAsync(CreatePluginInstanceRequest request) Creates a Plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { CreatePluginInstanceRequest request = CreatePluginInstanceRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setPluginInstanceId("pluginInstanceId-1741818845") .setPluginInstance(PluginInstance.newBuilder().build()) .build(); PluginInstance response = apiHubPluginClient.createPluginInstanceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createPluginInstanceOperationCallable
public final OperationCallable<CreatePluginInstanceRequest,PluginInstance, createPluginInstanceOperationCallable()OperationMetadata> Creates a Plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { CreatePluginInstanceRequest request = CreatePluginInstanceRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setPluginInstanceId("pluginInstanceId-1741818845") .setPluginInstance(PluginInstance.newBuilder().build()) .build(); OperationFuture<PluginInstance, OperationMetadata> future = apiHubPluginClient.createPluginInstanceOperationCallable().futureCall(request); // Do something. PluginInstance response = future.get(); } -
createPluginInstanceCallable
Creates a Plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { CreatePluginInstanceRequest request = CreatePluginInstanceRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setPluginInstanceId("pluginInstanceId-1741818845") .setPluginInstance(PluginInstance.newBuilder().build()) .build(); ApiFuture<Operation> future = apiHubPluginClient.createPluginInstanceCallable().futureCall(request); // Do something. Operation response = future.get(); } -
executePluginInstanceActionAsync
public final OperationFuture<ExecutePluginInstanceActionResponse,OperationMetadata> executePluginInstanceActionAsync(PluginInstanceName name, ActionExecutionDetail actionExecutionDetail) Executes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstanceName name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); ExecutePluginInstanceActionResponse response = apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); }- Parameters:
name- Required. The name of the plugin instance to execute. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionExecutionDetail- Required. The execution details for the action to execute.- Throws:
ApiException- if the remote call fails
-
executePluginInstanceActionAsync
public final OperationFuture<ExecutePluginInstanceActionResponse,OperationMetadata> executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail) Executes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString(); ActionExecutionDetail actionExecutionDetail = ActionExecutionDetail.newBuilder().build(); ExecutePluginInstanceActionResponse response = apiHubPluginClient.executePluginInstanceActionAsync(name, actionExecutionDetail).get(); }- Parameters:
name- Required. The name of the plugin instance to execute. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionExecutionDetail- Required. The execution details for the action to execute.- Throws:
ApiException- if the remote call fails
-
executePluginInstanceActionAsync
public final OperationFuture<ExecutePluginInstanceActionResponse,OperationMetadata> executePluginInstanceActionAsync(ExecutePluginInstanceActionRequest request) Executes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ExecutePluginInstanceActionRequest request = ExecutePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build()) .build(); ExecutePluginInstanceActionResponse response = apiHubPluginClient.executePluginInstanceActionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
executePluginInstanceActionOperationCallable
public final OperationCallable<ExecutePluginInstanceActionRequest,ExecutePluginInstanceActionResponse, executePluginInstanceActionOperationCallable()OperationMetadata> Executes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ExecutePluginInstanceActionRequest request = ExecutePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build()) .build(); OperationFuture<ExecutePluginInstanceActionResponse, OperationMetadata> future = apiHubPluginClient.executePluginInstanceActionOperationCallable().futureCall(request); // Do something. ExecutePluginInstanceActionResponse response = future.get(); } -
executePluginInstanceActionCallable
public final UnaryCallable<ExecutePluginInstanceActionRequest,Operation> executePluginInstanceActionCallable()Executes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ExecutePluginInstanceActionRequest request = ExecutePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionExecutionDetail(ActionExecutionDetail.newBuilder().build()) .build(); ApiFuture<Operation> future = apiHubPluginClient.executePluginInstanceActionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getPluginInstance
Get an API Hub plugin instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstanceName name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); PluginInstance response = apiHubPluginClient.getPluginInstance(name); }- Parameters:
name- Required. The name of the plugin instance to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`- Throws:
ApiException- if the remote call fails
-
getPluginInstance
Get an API Hub plugin instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString(); PluginInstance response = apiHubPluginClient.getPluginInstance(name); }- Parameters:
name- Required. The name of the plugin instance to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`- Throws:
ApiException- if the remote call fails
-
getPluginInstance
Get an API Hub plugin instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetPluginInstanceRequest request = GetPluginInstanceRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .build(); PluginInstance response = apiHubPluginClient.getPluginInstance(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getPluginInstanceCallable
Get an API Hub plugin instance.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetPluginInstanceRequest request = GetPluginInstanceRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .build(); ApiFuture<PluginInstance> future = apiHubPluginClient.getPluginInstanceCallable().futureCall(request); // Do something. PluginInstance response = future.get(); } -
listPluginInstances
public final ApiHubPluginClient.ListPluginInstancesPagedResponse listPluginInstances(PluginName parent) List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginName parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]"); for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for multiple plugins, use the - character instead of the plugin ID.- Throws:
ApiException- if the remote call fails
-
listPluginInstances
List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String parent = PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString(); for (PluginInstance element : apiHubPluginClient.listPluginInstances(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource where this plugin will be created. Format: `projects/{project}/locations/{location}/plugins/{plugin}`. To list plugin instances for multiple plugins, use the - character instead of the plugin ID.- Throws:
ApiException- if the remote call fails
-
listPluginInstances
public final ApiHubPluginClient.ListPluginInstancesPagedResponse listPluginInstances(ListPluginInstancesRequest request) List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginInstancesRequest request = ListPluginInstancesRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (PluginInstance element : apiHubPluginClient.listPluginInstances(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listPluginInstancesPagedCallable
public final UnaryCallable<ListPluginInstancesRequest,ApiHubPluginClient.ListPluginInstancesPagedResponse> listPluginInstancesPagedCallable()List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginInstancesRequest request = ListPluginInstancesRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<PluginInstance> future = apiHubPluginClient.listPluginInstancesPagedCallable().futureCall(request); // Do something. for (PluginInstance element : future.get().iterateAll()) { // doThingsWith(element); } } -
listPluginInstancesCallable
public final UnaryCallable<ListPluginInstancesRequest,ListPluginInstancesResponse> listPluginInstancesCallable()List all the plugins in a given project and location. `-` can be used as wildcard value for {plugin_id}Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListPluginInstancesRequest request = ListPluginInstancesRequest.newBuilder() .setParent(PluginName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListPluginInstancesResponse response = apiHubPluginClient.listPluginInstancesCallable().call(request); for (PluginInstance element : response.getPluginInstancesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
enablePluginInstanceActionAsync
public final OperationFuture<EnablePluginInstanceActionResponse,OperationMetadata> enablePluginInstanceActionAsync(PluginInstanceName name, String actionId) Enables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstanceName name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); String actionId = "actionId-1656172047"; EnablePluginInstanceActionResponse response = apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get(); }- Parameters:
name- Required. The name of the plugin instance to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionId- Required. The action id to enable.- Throws:
ApiException- if the remote call fails
-
enablePluginInstanceActionAsync
public final OperationFuture<EnablePluginInstanceActionResponse,OperationMetadata> enablePluginInstanceActionAsync(String name, String actionId) Enables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString(); String actionId = "actionId-1656172047"; EnablePluginInstanceActionResponse response = apiHubPluginClient.enablePluginInstanceActionAsync(name, actionId).get(); }- Parameters:
name- Required. The name of the plugin instance to enable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionId- Required. The action id to enable.- Throws:
ApiException- if the remote call fails
-
enablePluginInstanceActionAsync
public final OperationFuture<EnablePluginInstanceActionResponse,OperationMetadata> enablePluginInstanceActionAsync(EnablePluginInstanceActionRequest request) Enables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { EnablePluginInstanceActionRequest request = EnablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); EnablePluginInstanceActionResponse response = apiHubPluginClient.enablePluginInstanceActionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
enablePluginInstanceActionOperationCallable
public final OperationCallable<EnablePluginInstanceActionRequest,EnablePluginInstanceActionResponse, enablePluginInstanceActionOperationCallable()OperationMetadata> Enables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { EnablePluginInstanceActionRequest request = EnablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); OperationFuture<EnablePluginInstanceActionResponse, OperationMetadata> future = apiHubPluginClient.enablePluginInstanceActionOperationCallable().futureCall(request); // Do something. EnablePluginInstanceActionResponse response = future.get(); } -
enablePluginInstanceActionCallable
public final UnaryCallable<EnablePluginInstanceActionRequest,Operation> enablePluginInstanceActionCallable()Enables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { EnablePluginInstanceActionRequest request = EnablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); ApiFuture<Operation> future = apiHubPluginClient.enablePluginInstanceActionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
disablePluginInstanceActionAsync
public final OperationFuture<DisablePluginInstanceActionResponse,OperationMetadata> disablePluginInstanceActionAsync(PluginInstanceName name, String actionId) Disables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstanceName name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); String actionId = "actionId-1656172047"; DisablePluginInstanceActionResponse response = apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get(); }- Parameters:
name- Required. The name of the plugin instance to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionId- Required. The action id to disable.- Throws:
ApiException- if the remote call fails
-
disablePluginInstanceActionAsync
public final OperationFuture<DisablePluginInstanceActionResponse,OperationMetadata> disablePluginInstanceActionAsync(String name, String actionId) Disables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString(); String actionId = "actionId-1656172047"; DisablePluginInstanceActionResponse response = apiHubPluginClient.disablePluginInstanceActionAsync(name, actionId).get(); }- Parameters:
name- Required. The name of the plugin instance to disable. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`actionId- Required. The action id to disable.- Throws:
ApiException- if the remote call fails
-
disablePluginInstanceActionAsync
public final OperationFuture<DisablePluginInstanceActionResponse,OperationMetadata> disablePluginInstanceActionAsync(DisablePluginInstanceActionRequest request) Disables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DisablePluginInstanceActionRequest request = DisablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); DisablePluginInstanceActionResponse response = apiHubPluginClient.disablePluginInstanceActionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
disablePluginInstanceActionOperationCallable
public final OperationCallable<DisablePluginInstanceActionRequest,DisablePluginInstanceActionResponse, disablePluginInstanceActionOperationCallable()OperationMetadata> Disables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DisablePluginInstanceActionRequest request = DisablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); OperationFuture<DisablePluginInstanceActionResponse, OperationMetadata> future = apiHubPluginClient.disablePluginInstanceActionOperationCallable().futureCall(request); // Do something. DisablePluginInstanceActionResponse response = future.get(); } -
disablePluginInstanceActionCallable
public final UnaryCallable<DisablePluginInstanceActionRequest,Operation> disablePluginInstanceActionCallable()Disables a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DisablePluginInstanceActionRequest request = DisablePluginInstanceActionRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .setActionId("actionId-1656172047") .build(); ApiFuture<Operation> future = apiHubPluginClient.disablePluginInstanceActionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updatePluginInstance
public final PluginInstance updatePluginInstance(PluginInstance pluginInstance, com.google.protobuf.FieldMask updateMask) Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:- [display_name][google.cloud.apihub.v1.PluginInstance.display_name]
- [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression]
The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated.
To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstance pluginInstance = PluginInstance.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); PluginInstance response = apiHubPluginClient.updatePluginInstance(pluginInstance, updateMask); }- Parameters:
pluginInstance- Required. The plugin instance to update.updateMask- Optional. The list of fields to update.- Throws:
ApiException- if the remote call fails
-
updatePluginInstance
Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:- [display_name][google.cloud.apihub.v1.PluginInstance.display_name]
- [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression]
The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated.
To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { UpdatePluginInstanceRequest request = UpdatePluginInstanceRequest.newBuilder() .setPluginInstance(PluginInstance.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); PluginInstance response = apiHubPluginClient.updatePluginInstance(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updatePluginInstanceCallable
public final UnaryCallable<UpdatePluginInstanceRequest,PluginInstance> updatePluginInstanceCallable()Updates a plugin instance in the API hub. The following fields in the [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated currently:- [display_name][google.cloud.apihub.v1.PluginInstance.display_name]
- [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression]
The [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] should be used to specify the fields being updated.
To update the [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] of the plugin instance, use the [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { UpdatePluginInstanceRequest request = UpdatePluginInstanceRequest.newBuilder() .setPluginInstance(PluginInstance.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<PluginInstance> future = apiHubPluginClient.updatePluginInstanceCallable().futureCall(request); // Do something. PluginInstance response = future.get(); } -
deletePluginInstanceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginInstanceAsync(PluginInstanceName name) Deletes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { PluginInstanceName name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"); apiHubPluginClient.deletePluginInstanceAsync(name).get(); }- Parameters:
name- Required. The name of the plugin instance to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.- Throws:
ApiException- if the remote call fails
-
deletePluginInstanceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginInstanceAsync(String name) Deletes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { String name = PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]").toString(); apiHubPluginClient.deletePluginInstanceAsync(name).get(); }- Parameters:
name- Required. The name of the plugin instance to delete. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.- Throws:
ApiException- if the remote call fails
-
deletePluginInstanceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deletePluginInstanceAsync(DeletePluginInstanceRequest request) Deletes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginInstanceRequest request = DeletePluginInstanceRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .build(); apiHubPluginClient.deletePluginInstanceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deletePluginInstanceOperationCallable
public final OperationCallable<DeletePluginInstanceRequest,com.google.protobuf.Empty, deletePluginInstanceOperationCallable()OperationMetadata> Deletes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginInstanceRequest request = DeletePluginInstanceRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = apiHubPluginClient.deletePluginInstanceOperationCallable().futureCall(request); // Do something. future.get(); } -
deletePluginInstanceCallable
Deletes a plugin instance in the API hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { DeletePluginInstanceRequest request = DeletePluginInstanceRequest.newBuilder() .setName( PluginInstanceName.of("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]") .toString()) .build(); ApiFuture<Operation> future = apiHubPluginClient.deletePluginInstanceCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final ApiHubPluginClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : apiHubPluginClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,ApiHubPluginClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = apiHubPluginClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = apiHubPluginClient.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; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = apiHubPluginClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = apiHubPluginClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-