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

public abstract class ApiHubDependenciesClient

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

ApiHubDependencies client wrapper, for convenient use.

Inheritance

object > ApiHubDependenciesClient

Namespace

Google.Cloud.ApiHub.V1

Assembly

Google.Cloud.ApiHub.V1.dll

Remarks

This service provides methods for various operations related to a [Dependency][google.cloud.apihub.v1.Dependency] in the API hub.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ApiHubDependencies 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 ApiHubDependencies scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ApiHubDependencies scopes are:

GrpcClient

public virtual ApiHubDependencies.ApiHubDependenciesClient GrpcClient { get; }

The underlying gRPC ApiHubDependencies client

Property Value
Type Description
ApiHubDependenciesApiHubDependenciesClient

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 ApiHubDependenciesClient Create()

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

Returns
Type Description
ApiHubDependenciesClient

The created ApiHubDependenciesClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskApiHubDependenciesClient

The task representing the created ApiHubDependenciesClient.

CreateDependency(LocationName, Dependency, string, CallSettings)

public virtual Dependency CreateDependency(LocationName parent, Dependency dependency, string dependencyId, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = apiHubDependenciesClient.CreateDependency(parent, dependency, dependencyId);

CreateDependency(CreateDependencyRequest, CallSettings)

public virtual Dependency CreateDependency(CreateDependencyRequest request, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
request CreateDependencyRequest

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
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
CreateDependencyRequest request = new CreateDependencyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DependencyId = "",
    Dependency = new Dependency(),
};
// Make the request
Dependency response = apiHubDependenciesClient.CreateDependency(request);

CreateDependency(string, Dependency, string, CallSettings)

public virtual Dependency CreateDependency(string parent, Dependency dependency, string dependencyId, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent string

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = apiHubDependenciesClient.CreateDependency(parent, dependency, dependencyId);

CreateDependencyAsync(LocationName, Dependency, string, CallSettings)

public virtual Task<Dependency> CreateDependencyAsync(LocationName parent, Dependency dependency, string dependencyId, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(parent, dependency, dependencyId);

CreateDependencyAsync(LocationName, Dependency, string, CancellationToken)

public virtual Task<Dependency> CreateDependencyAsync(LocationName parent, Dependency dependency, string dependencyId, CancellationToken cancellationToken)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(parent, dependency, dependencyId);

CreateDependencyAsync(CreateDependencyRequest, CallSettings)

public virtual Task<Dependency> CreateDependencyAsync(CreateDependencyRequest request, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
request CreateDependencyRequest

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
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
CreateDependencyRequest request = new CreateDependencyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DependencyId = "",
    Dependency = new Dependency(),
};
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(request);

CreateDependencyAsync(CreateDependencyRequest, CancellationToken)

public virtual Task<Dependency> CreateDependencyAsync(CreateDependencyRequest request, CancellationToken cancellationToken)

Create a dependency between two entities in the API hub.

Parameters
Name Description
request CreateDependencyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
CreateDependencyRequest request = new CreateDependencyRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DependencyId = "",
    Dependency = new Dependency(),
};
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(request);

CreateDependencyAsync(string, Dependency, string, CallSettings)

public virtual Task<Dependency> CreateDependencyAsync(string parent, Dependency dependency, string dependencyId, CallSettings callSettings = null)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent string

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(parent, dependency, dependencyId);

CreateDependencyAsync(string, Dependency, string, CancellationToken)

public virtual Task<Dependency> CreateDependencyAsync(string parent, Dependency dependency, string dependencyId, CancellationToken cancellationToken)

Create a dependency between two entities in the API hub.

Parameters
Name Description
parent string

Required. The parent resource for the dependency resource. Format: projects/{project}/locations/{location}

dependency Dependency

Required. The dependency resource to create.

dependencyId string

Optional. The ID to use for the dependency resource, which will become the final component of the dependency's resource name. This field is optional.

  • If provided, the same will be used. The service will throw an error if duplicate id is provided by the client.
  • If not provided, a system generated id will be used.

This value should be 4-500 characters, and valid characters are [a-z][A-Z][0-9]-_.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Dependency dependency = new Dependency();
string dependencyId = "";
// Make the request
Dependency response = await apiHubDependenciesClient.CreateDependencyAsync(parent, dependency, dependencyId);

DeleteDependency(DeleteDependencyRequest, CallSettings)

public virtual void DeleteDependency(DeleteDependencyRequest request, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
request DeleteDependencyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
DeleteDependencyRequest request = new DeleteDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
apiHubDependenciesClient.DeleteDependency(request);

DeleteDependency(DependencyName, CallSettings)

public virtual void DeleteDependency(DependencyName name, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
apiHubDependenciesClient.DeleteDependency(name);

DeleteDependency(string, CallSettings)

public virtual void DeleteDependency(string name, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
name string

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
apiHubDependenciesClient.DeleteDependency(name);

DeleteDependencyAsync(DeleteDependencyRequest, CallSettings)

public virtual Task DeleteDependencyAsync(DeleteDependencyRequest request, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
request DeleteDependencyRequest

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
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DeleteDependencyRequest request = new DeleteDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(request);

DeleteDependencyAsync(DeleteDependencyRequest, CancellationToken)

public virtual Task DeleteDependencyAsync(DeleteDependencyRequest request, CancellationToken cancellationToken)

Delete the dependency resource.

Parameters
Name Description
request DeleteDependencyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DeleteDependencyRequest request = new DeleteDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(request);

DeleteDependencyAsync(DependencyName, CallSettings)

public virtual Task DeleteDependencyAsync(DependencyName name, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(name);

DeleteDependencyAsync(DependencyName, CancellationToken)

public virtual Task DeleteDependencyAsync(DependencyName name, CancellationToken cancellationToken)

Delete the dependency resource.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(name);

DeleteDependencyAsync(string, CallSettings)

public virtual Task DeleteDependencyAsync(string name, CallSettings callSettings = null)

Delete the dependency resource.

Parameters
Name Description
name string

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(name);

DeleteDependencyAsync(string, CancellationToken)

public virtual Task DeleteDependencyAsync(string name, CancellationToken cancellationToken)

Delete the dependency resource.

Parameters
Name Description
name string

Required. The name of the dependency resource to delete. Format: projects/{project}/locations/{location}/dependencies/{dependency}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
await apiHubDependenciesClient.DeleteDependencyAsync(name);

GetDependency(DependencyName, CallSettings)

public virtual Dependency GetDependency(DependencyName name, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
Dependency response = apiHubDependenciesClient.GetDependency(name);

GetDependency(GetDependencyRequest, CallSettings)

public virtual Dependency GetDependency(GetDependencyRequest request, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
request GetDependencyRequest

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
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
GetDependencyRequest request = new GetDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
Dependency response = apiHubDependenciesClient.GetDependency(request);

GetDependency(string, CallSettings)

public virtual Dependency GetDependency(string name, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name string

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
Dependency response = apiHubDependenciesClient.GetDependency(name);

GetDependencyAsync(DependencyName, CallSettings)

public virtual Task<Dependency> GetDependencyAsync(DependencyName name, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(name);

GetDependencyAsync(DependencyName, CancellationToken)

public virtual Task<Dependency> GetDependencyAsync(DependencyName name, CancellationToken cancellationToken)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name DependencyName

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
DependencyName name = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]");
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(name);

GetDependencyAsync(GetDependencyRequest, CallSettings)

public virtual Task<Dependency> GetDependencyAsync(GetDependencyRequest request, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
request GetDependencyRequest

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
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
GetDependencyRequest request = new GetDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(request);

GetDependencyAsync(GetDependencyRequest, CancellationToken)

public virtual Task<Dependency> GetDependencyAsync(GetDependencyRequest request, CancellationToken cancellationToken)

Get details about a dependency resource in the API hub.

Parameters
Name Description
request GetDependencyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
GetDependencyRequest request = new GetDependencyRequest
{
    DependencyName = DependencyName.FromProjectLocationDependency("[PROJECT]", "[LOCATION]", "[DEPENDENCY]"),
};
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(request);

GetDependencyAsync(string, CallSettings)

public virtual Task<Dependency> GetDependencyAsync(string name, CallSettings callSettings = null)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name string

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(name);

GetDependencyAsync(string, CancellationToken)

public virtual Task<Dependency> GetDependencyAsync(string name, CancellationToken cancellationToken)

Get details about a dependency resource in the API hub.

Parameters
Name Description
name string

Required. The name of the dependency resource to retrieve. Format: projects/{project}/locations/{location}/dependencies/{dependency}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dependencies/[DEPENDENCY]";
// Make the request
Dependency response = await apiHubDependenciesClient.GetDependencyAsync(name);

ListDependencies(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDependenciesResponse, Dependency> ListDependencies(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
parent LocationName

Required. The parent which owns this collection of dependency resources. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDependenciesResponseDependency

A pageable sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependencies(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Dependency item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDependenciesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDependencies(ListDependenciesRequest, CallSettings)

public virtual PagedEnumerable<ListDependenciesResponse, Dependency> ListDependencies(ListDependenciesRequest request, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
request ListDependenciesRequest

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
PagedEnumerableListDependenciesResponseDependency

A pageable sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
ListDependenciesRequest request = new ListDependenciesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependencies(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Dependency item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDependenciesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDependencies(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDependenciesResponse, Dependency> ListDependencies(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
parent string

Required. The parent which owns this collection of dependency resources. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDependenciesResponseDependency

A pageable sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependencies(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Dependency item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDependenciesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDependenciesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDependenciesResponse, Dependency> ListDependenciesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
parent LocationName

Required. The parent which owns this collection of dependency resources. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDependenciesResponseDependency

A pageable asynchronous sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependenciesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dependency item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDependenciesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDependenciesAsync(ListDependenciesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDependenciesResponse, Dependency> ListDependenciesAsync(ListDependenciesRequest request, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
request ListDependenciesRequest

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
PagedAsyncEnumerableListDependenciesResponseDependency

A pageable asynchronous sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
ListDependenciesRequest request = new ListDependenciesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependenciesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dependency item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDependenciesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDependenciesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDependenciesResponse, Dependency> ListDependenciesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List dependencies based on the provided filter and pagination parameters.

Parameters
Name Description
parent string

Required. The parent which owns this collection of dependency resources. Format: projects/{project}/locations/{location}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDependenciesResponseDependency

A pageable asynchronous sequence of Dependency resources.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListDependenciesResponse, Dependency> response = apiHubDependenciesClient.ListDependenciesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Dependency item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDependenciesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Dependency item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Dependency> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Dependency item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

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.

UpdateDependency(Dependency, FieldMask, CallSettings)

public virtual Dependency UpdateDependency(Dependency dependency, FieldMask updateMask, CallSettings callSettings = null)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
dependency Dependency

Required. The dependency resource to update.

The dependency's name field is used to identify the dependency to update. Format: projects/{project}/locations/{location}/dependencies/{dependency}

updateMask FieldMask

Required. The list of fields to update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
Dependency dependency = new Dependency();
FieldMask updateMask = new FieldMask();
// Make the request
Dependency response = apiHubDependenciesClient.UpdateDependency(dependency, updateMask);

UpdateDependency(UpdateDependencyRequest, CallSettings)

public virtual Dependency UpdateDependency(UpdateDependencyRequest request, CallSettings callSettings = null)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
request UpdateDependencyRequest

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
Dependency

The RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = ApiHubDependenciesClient.Create();
// Initialize request argument(s)
UpdateDependencyRequest request = new UpdateDependencyRequest
{
    Dependency = new Dependency(),
    UpdateMask = new FieldMask(),
};
// Make the request
Dependency response = apiHubDependenciesClient.UpdateDependency(request);

UpdateDependencyAsync(Dependency, FieldMask, CallSettings)

public virtual Task<Dependency> UpdateDependencyAsync(Dependency dependency, FieldMask updateMask, CallSettings callSettings = null)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
dependency Dependency

Required. The dependency resource to update.

The dependency's name field is used to identify the dependency to update. Format: projects/{project}/locations/{location}/dependencies/{dependency}

updateMask FieldMask

Required. The list of fields to update.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
Dependency dependency = new Dependency();
FieldMask updateMask = new FieldMask();
// Make the request
Dependency response = await apiHubDependenciesClient.UpdateDependencyAsync(dependency, updateMask);

UpdateDependencyAsync(Dependency, FieldMask, CancellationToken)

public virtual Task<Dependency> UpdateDependencyAsync(Dependency dependency, FieldMask updateMask, CancellationToken cancellationToken)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
dependency Dependency

Required. The dependency resource to update.

The dependency's name field is used to identify the dependency to update. Format: projects/{project}/locations/{location}/dependencies/{dependency}

updateMask FieldMask

Required. The list of fields to update.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
Dependency dependency = new Dependency();
FieldMask updateMask = new FieldMask();
// Make the request
Dependency response = await apiHubDependenciesClient.UpdateDependencyAsync(dependency, updateMask);

UpdateDependencyAsync(UpdateDependencyRequest, CallSettings)

public virtual Task<Dependency> UpdateDependencyAsync(UpdateDependencyRequest request, CallSettings callSettings = null)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
request UpdateDependencyRequest

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
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
UpdateDependencyRequest request = new UpdateDependencyRequest
{
    Dependency = new Dependency(),
    UpdateMask = new FieldMask(),
};
// Make the request
Dependency response = await apiHubDependenciesClient.UpdateDependencyAsync(request);

UpdateDependencyAsync(UpdateDependencyRequest, CancellationToken)

public virtual Task<Dependency> UpdateDependencyAsync(UpdateDependencyRequest request, CancellationToken cancellationToken)

Update a dependency based on the [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] provided in the request.

The following fields in the [dependency][google.cloud.apihub.v1.Dependency] can be updated:

  • [description][google.cloud.apihub.v1.Dependency.description]
Parameters
Name Description
request UpdateDependencyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDependency

A Task containing the RPC response.

Example
// Create client
ApiHubDependenciesClient apiHubDependenciesClient = await ApiHubDependenciesClient.CreateAsync();
// Initialize request argument(s)
UpdateDependencyRequest request = new UpdateDependencyRequest
{
    Dependency = new Dependency(),
    UpdateMask = new FieldMask(),
};
// Make the request
Dependency response = await apiHubDependenciesClient.UpdateDependencyAsync(request);