Class ApiHubPluginClient

java.lang.Object
com.google.cloud.apihub.v1.ApiHubPluginClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class ApiHubPluginClient extends Object implements BackgroundResource
Service Description: This service is used for managing plugins inside the API Hub.

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().

Methods
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.

  • getPlugin(GetPluginRequest request)

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

  • getPlugin(PluginName name)

  • getPlugin(String name)

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

  • getPluginCallable()

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.

  • enablePlugin(EnablePluginRequest request)

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

  • enablePlugin(PluginName name)

  • enablePlugin(String name)

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

  • enablePluginCallable()

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.

  • disablePlugin(DisablePluginRequest request)

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

  • disablePlugin(PluginName name)

  • disablePlugin(String name)

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

  • disablePluginCallable()

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.

  • createPlugin(CreatePluginRequest request)

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

  • createPlugin(LocationName parent, Plugin plugin, String pluginId)

  • createPlugin(String parent, Plugin plugin, String pluginId)

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

  • createPluginCallable()

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.

  • listPlugins(ListPluginsRequest request)

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

  • listPlugins(LocationName parent)

  • listPlugins(String parent)

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

  • listPluginsPagedCallable()

  • listPluginsCallable()

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.

  • deletePluginAsync(DeletePluginRequest request)

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

  • deletePluginAsync(PluginName name)

  • deletePluginAsync(String name)

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

  • deletePluginOperationCallable()

  • deletePluginCallable()

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.

  • createPluginInstanceAsync(CreatePluginInstanceRequest request)

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

  • createPluginInstanceAsync(PluginName parent, PluginInstance pluginInstance, String pluginInstanceId)

  • createPluginInstanceAsync(String parent, PluginInstance pluginInstance, String pluginInstanceId)

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

  • createPluginInstanceOperationCallable()

  • createPluginInstanceCallable()

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.

  • executePluginInstanceActionAsync(ExecutePluginInstanceActionRequest request)

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

  • executePluginInstanceActionAsync(PluginInstanceName name, ActionExecutionDetail actionExecutionDetail)

  • executePluginInstanceActionAsync(String name, ActionExecutionDetail actionExecutionDetail)

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

  • executePluginInstanceActionOperationCallable()

  • executePluginInstanceActionCallable()

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.

  • getPluginInstance(GetPluginInstanceRequest request)

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

  • getPluginInstance(PluginInstanceName name)

  • getPluginInstance(String name)

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

  • getPluginInstanceCallable()

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.

  • listPluginInstances(ListPluginInstancesRequest request)

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

  • listPluginInstances(PluginName parent)

  • listPluginInstances(String parent)

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

  • listPluginInstancesPagedCallable()

  • listPluginInstancesCallable()

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.

  • enablePluginInstanceActionAsync(EnablePluginInstanceActionRequest request)

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

  • enablePluginInstanceActionAsync(PluginInstanceName name, String actionId)

  • enablePluginInstanceActionAsync(String name, String actionId)

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

  • enablePluginInstanceActionOperationCallable()

  • enablePluginInstanceActionCallable()

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.

  • disablePluginInstanceActionAsync(DisablePluginInstanceActionRequest request)

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

  • disablePluginInstanceActionAsync(PluginInstanceName name, String actionId)

  • disablePluginInstanceActionAsync(String name, String actionId)

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

  • disablePluginInstanceActionOperationCallable()

  • disablePluginInstanceActionCallable()

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.

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

  • updatePluginInstance(UpdatePluginInstanceRequest request)

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

  • updatePluginInstance(PluginInstance pluginInstance, FieldMask updateMask)

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

  • updatePluginInstanceCallable()

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.

  • deletePluginInstanceAsync(DeletePluginInstanceRequest request)

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

  • deletePluginInstanceAsync(PluginInstanceName name)

  • deletePluginInstanceAsync(String name)

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

  • deletePluginInstanceOperationCallable()

  • deletePluginInstanceCallable()

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.

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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.

  • Constructor Details

    • ApiHubPluginClient

      protected ApiHubPluginClient(ApiHubPluginSettings settings) throws IOException
      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

      protected ApiHubPluginClient(ApiHubPluginStub stub)
  • Method Details

    • create

      public static final ApiHubPluginClient create() throws IOException
      Constructs an instance of ApiHubPluginClient with default settings.
      Throws:
      IOException
    • create

      public static final ApiHubPluginClient create(ApiHubPluginSettings settings) throws IOException
      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

      public static final ApiHubPluginClient create(ApiHubPluginStub stub)
      Constructs an instance of ApiHubPluginClient, using the given stub for making calls. This is for advanced usage - prefer using create(ApiHubPluginSettings).
    • getSettings

      public final ApiHubPluginSettings getSettings()
    • getStub

      public ApiHubPluginStub getStub()
    • getHttpJsonOperationsClient

      public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getPlugin

      public final Plugin getPlugin(PluginName name)
      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

      public final Plugin getPlugin(String name)
      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

      public final Plugin getPlugin(GetPluginRequest request)
      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

      public final UnaryCallable<GetPluginRequest,Plugin> 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

      public final Plugin enablePlugin(PluginName name)
      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

      public final Plugin enablePlugin(String name)
      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

      public final Plugin enablePlugin(EnablePluginRequest request)
      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

      public final UnaryCallable<EnablePluginRequest,Plugin> 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

      public final Plugin disablePlugin(PluginName name)
      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

      public final Plugin disablePlugin(String name)
      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

      public final Plugin disablePlugin(DisablePluginRequest request)
      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

      public final UnaryCallable<DisablePluginRequest,Plugin> 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

      public final Plugin createPlugin(LocationName parent, Plugin plugin, String pluginId)
      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

      public final Plugin createPlugin(String parent, Plugin plugin, String pluginId)
      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

      public final Plugin createPlugin(CreatePluginRequest request)
      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

      public final UnaryCallable<CreatePluginRequest,Plugin> 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

      public final ApiHubPluginClient.ListPluginsPagedResponse listPlugins(LocationName parent)
      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

      public final ApiHubPluginClient.ListPluginsPagedResponse listPlugins(String parent)
      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

      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

      public final UnaryCallable<ListPluginsRequest,ListPluginsResponse> 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,OperationMetadata> deletePluginOperationCallable()
      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

      public final UnaryCallable<DeletePluginRequest,Operation> 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,OperationMetadata> createPluginInstanceOperationCallable()
      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

      public final UnaryCallable<CreatePluginInstanceRequest,Operation> 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

      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

      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

      public final PluginInstance getPluginInstance(PluginInstanceName name)
      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

      public final PluginInstance getPluginInstance(String name)
      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

      public final PluginInstance getPluginInstance(GetPluginInstanceRequest request)
      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

      public final UnaryCallable<GetPluginInstanceRequest,PluginInstance> 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

      public final ApiHubPluginClient.ListPluginInstancesPagedResponse listPluginInstances(String 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()) {
         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

      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

      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

      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

      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

      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

      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

      public final PluginInstance updatePluginInstance(UpdatePluginInstanceRequest request)
      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,OperationMetadata> deletePluginInstanceOperationCallable()
      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

      public final UnaryCallable<DeletePluginInstanceRequest,Operation> 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

      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

      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

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> 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

      public final Location getLocation(GetLocationRequest request)
      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

      public final UnaryCallable<GetLocationRequest,Location> 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:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException