API hub v1 API - Class ApiHubPluginClient (1.0.0-beta02)

public abstract class ApiHubPluginClient

Reference documentation and code samples for the API hub v1 API class ApiHubPluginClient.

ApiHubPlugin client wrapper, for convenient use.

Inheritance

object > ApiHubPluginClient

Derived Types

Namespace

Google.Cloud.ApiHub.V1

Assembly

Google.Cloud.ApiHub.V1.dll

Remarks

This service is used for managing plugins inside the API Hub.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ApiHubPlugin service, which is a host of "apihub.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ApiHubPlugin scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ApiHubPlugin scopes are:

GrpcClient

public virtual ApiHubPlugin.ApiHubPluginClient GrpcClient { get; }

The underlying gRPC ApiHubPlugin client

Property Value
Type Description
ApiHubPluginApiHubPluginClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static ApiHubPluginClient Create()

Synchronously creates a ApiHubPluginClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApiHubPluginClientBuilder.

Returns
Type Description
ApiHubPluginClient

The created ApiHubPluginClient.

CreateAsync(CancellationToken)

public static Task<ApiHubPluginClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ApiHubPluginClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApiHubPluginClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskApiHubPluginClient

The task representing the created ApiHubPluginClient.

DisablePlugin(DisablePluginRequest, CallSettings)

public virtual Plugin DisablePlugin(DisablePluginRequest request, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
request DisablePluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
DisablePluginRequest request = new DisablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = apiHubPluginClient.DisablePlugin(request);

DisablePlugin(PluginName, CallSettings)

public virtual Plugin DisablePlugin(PluginName name, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = apiHubPluginClient.DisablePlugin(name);

DisablePlugin(string, CallSettings)

public virtual Plugin DisablePlugin(string name, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name string

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = apiHubPluginClient.DisablePlugin(name);

DisablePluginAsync(DisablePluginRequest, CallSettings)

public virtual Task<Plugin> DisablePluginAsync(DisablePluginRequest request, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
request DisablePluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
DisablePluginRequest request = new DisablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(request);

DisablePluginAsync(DisablePluginRequest, CancellationToken)

public virtual Task<Plugin> DisablePluginAsync(DisablePluginRequest request, CancellationToken cancellationToken)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
request DisablePluginRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
DisablePluginRequest request = new DisablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(request);

DisablePluginAsync(PluginName, CallSettings)

public virtual Task<Plugin> DisablePluginAsync(PluginName name, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(name);

DisablePluginAsync(PluginName, CancellationToken)

public virtual Task<Plugin> DisablePluginAsync(PluginName name, CancellationToken cancellationToken)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(name);

DisablePluginAsync(string, CallSettings)

public virtual Task<Plugin> DisablePluginAsync(string name, CallSettings callSettings = null)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name string

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(name);

DisablePluginAsync(string, CancellationToken)

public virtual Task<Plugin> DisablePluginAsync(string name, CancellationToken cancellationToken)

Disables a plugin. The state of the plugin after disabling is DISABLED

Parameters
Name Description
name string

Required. The name of the plugin to disable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.DisablePluginAsync(name);

EnablePlugin(EnablePluginRequest, CallSettings)

public virtual Plugin EnablePlugin(EnablePluginRequest request, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
request EnablePluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
EnablePluginRequest request = new EnablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = apiHubPluginClient.EnablePlugin(request);

EnablePlugin(PluginName, CallSettings)

public virtual Plugin EnablePlugin(PluginName name, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = apiHubPluginClient.EnablePlugin(name);

EnablePlugin(string, CallSettings)

public virtual Plugin EnablePlugin(string name, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name string

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = apiHubPluginClient.EnablePlugin(name);

EnablePluginAsync(EnablePluginRequest, CallSettings)

public virtual Task<Plugin> EnablePluginAsync(EnablePluginRequest request, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
request EnablePluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
EnablePluginRequest request = new EnablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(request);

EnablePluginAsync(EnablePluginRequest, CancellationToken)

public virtual Task<Plugin> EnablePluginAsync(EnablePluginRequest request, CancellationToken cancellationToken)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
request EnablePluginRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
EnablePluginRequest request = new EnablePluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(request);

EnablePluginAsync(PluginName, CallSettings)

public virtual Task<Plugin> EnablePluginAsync(PluginName name, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(name);

EnablePluginAsync(PluginName, CancellationToken)

public virtual Task<Plugin> EnablePluginAsync(PluginName name, CancellationToken cancellationToken)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name PluginName

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(name);

EnablePluginAsync(string, CallSettings)

public virtual Task<Plugin> EnablePluginAsync(string name, CallSettings callSettings = null)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name string

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(name);

EnablePluginAsync(string, CancellationToken)

public virtual Task<Plugin> EnablePluginAsync(string name, CancellationToken cancellationToken)

Enables a plugin. The state of the plugin after enabling is ENABLED

Parameters
Name Description
name string

Required. The name of the plugin to enable. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.EnablePluginAsync(name);

GetPlugin(GetPluginRequest, CallSettings)

public virtual Plugin GetPlugin(GetPluginRequest request, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
request GetPluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
GetPluginRequest request = new GetPluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = apiHubPluginClient.GetPlugin(request);

GetPlugin(PluginName, CallSettings)

public virtual Plugin GetPlugin(PluginName name, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
name PluginName

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = apiHubPluginClient.GetPlugin(name);

GetPlugin(string, CallSettings)

public virtual Plugin GetPlugin(string name, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
name string

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Plugin

The RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = ApiHubPluginClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = apiHubPluginClient.GetPlugin(name);

GetPluginAsync(GetPluginRequest, CallSettings)

public virtual Task<Plugin> GetPluginAsync(GetPluginRequest request, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
request GetPluginRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
GetPluginRequest request = new GetPluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(request);

GetPluginAsync(GetPluginRequest, CancellationToken)

public virtual Task<Plugin> GetPluginAsync(GetPluginRequest request, CancellationToken cancellationToken)

Get details about an API Hub plugin.

Parameters
Name Description
request GetPluginRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
GetPluginRequest request = new GetPluginRequest
{
    PluginName = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]"),
};
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(request);

GetPluginAsync(PluginName, CallSettings)

public virtual Task<Plugin> GetPluginAsync(PluginName name, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
name PluginName

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(name);

GetPluginAsync(PluginName, CancellationToken)

public virtual Task<Plugin> GetPluginAsync(PluginName name, CancellationToken cancellationToken)

Get details about an API Hub plugin.

Parameters
Name Description
name PluginName

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
PluginName name = PluginName.FromProjectLocationPlugin("[PROJECT]", "[LOCATION]", "[PLUGIN]");
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(name);

GetPluginAsync(string, CallSettings)

public virtual Task<Plugin> GetPluginAsync(string name, CallSettings callSettings = null)

Get details about an API Hub plugin.

Parameters
Name Description
name string

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(name);

GetPluginAsync(string, CancellationToken)

public virtual Task<Plugin> GetPluginAsync(string name, CancellationToken cancellationToken)

Get details about an API Hub plugin.

Parameters
Name Description
name string

Required. The name of the plugin to retrieve. Format: projects/{project}/locations/{location}/plugins/{plugin}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPlugin

A Task containing the RPC response.

Example
// Create client
ApiHubPluginClient apiHubPluginClient = await ApiHubPluginClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/plugins/[PLUGIN]";
// Make the request
Plugin response = await apiHubPluginClient.GetPluginAsync(name);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.