Cloud AI Platform v1beta1 API - Class ExtensionRegistryServiceClient (1.0.0-beta08)

public abstract class ExtensionRegistryServiceClient

Reference documentation and code samples for the Cloud AI Platform v1beta1 API class ExtensionRegistryServiceClient.

ExtensionRegistryService client wrapper, for convenient use.

Inheritance

object > ExtensionRegistryServiceClient

Namespace

Google.Cloud.AIPlatform.V1Beta1

Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

Remarks

A service for managing Vertex AI's Extension registry.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ExtensionRegistryService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ExtensionRegistryService scopes are:

DeleteExtensionOperationsClient

public virtual OperationsClient DeleteExtensionOperationsClient { get; }

The long-running operations client for DeleteExtension.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual ExtensionRegistryService.ExtensionRegistryServiceClient GrpcClient { get; }

The underlying gRPC ExtensionRegistryService client

Property Value
Type Description
ExtensionRegistryServiceExtensionRegistryServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

ImportExtensionOperationsClient

public virtual OperationsClient ImportExtensionOperationsClient { get; }

The long-running operations client for ImportExtension.

Property Value
Type Description
OperationsClient

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

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

Returns
Type Description
ExtensionRegistryServiceClient

The created ExtensionRegistryServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskExtensionRegistryServiceClient

The task representing the created ExtensionRegistryServiceClient.

DeleteExtension(DeleteExtensionRequest, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteExtension(DeleteExtensionRequest request, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
request DeleteExtensionRequest

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
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
DeleteExtensionRequest request = new DeleteExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = extensionRegistryServiceClient.DeleteExtension(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceDeleteExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtension(ExtensionName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteExtension(ExtensionName name, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = extensionRegistryServiceClient.DeleteExtension(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceDeleteExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtension(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteExtension(string name, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = extensionRegistryServiceClient.DeleteExtension(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceDeleteExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(DeleteExtensionRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(DeleteExtensionRequest request, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
request DeleteExtensionRequest

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
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteExtensionRequest request = new DeleteExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(DeleteExtensionRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(DeleteExtensionRequest request, CancellationToken cancellationToken)

Deletes an Extension.

Parameters
Name Description
request DeleteExtensionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteExtensionRequest request = new DeleteExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(ExtensionName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(ExtensionName name, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(ExtensionName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(ExtensionName name, CancellationToken cancellationToken)

Deletes an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(string name, CallSettings callSettings = null)

Deletes an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteExtensionAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteExtensionAsync(string name, CancellationToken cancellationToken)

Deletes an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource to be deleted. Format: projects/{project}/locations/{location}/extensions/{extension}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await extensionRegistryServiceClient.DeleteExtensionAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceDeleteExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

GetExtension(ExtensionName, CallSettings)

public virtual Extension GetExtension(ExtensionName name, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Extension

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Extension response = extensionRegistryServiceClient.GetExtension(name);

GetExtension(GetExtensionRequest, CallSettings)

public virtual Extension GetExtension(GetExtensionRequest request, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
request GetExtensionRequest

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
Extension

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
GetExtensionRequest request = new GetExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Extension response = extensionRegistryServiceClient.GetExtension(request);

GetExtension(string, CallSettings)

public virtual Extension GetExtension(string name, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Extension

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Extension response = extensionRegistryServiceClient.GetExtension(name);

GetExtensionAsync(ExtensionName, CallSettings)

public virtual Task<Extension> GetExtensionAsync(ExtensionName name, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(name);

GetExtensionAsync(ExtensionName, CancellationToken)

public virtual Task<Extension> GetExtensionAsync(ExtensionName name, CancellationToken cancellationToken)

Gets an Extension.

Parameters
Name Description
name ExtensionName

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ExtensionName name = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]");
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(name);

GetExtensionAsync(GetExtensionRequest, CallSettings)

public virtual Task<Extension> GetExtensionAsync(GetExtensionRequest request, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
request GetExtensionRequest

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
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
GetExtensionRequest request = new GetExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(request);

GetExtensionAsync(GetExtensionRequest, CancellationToken)

public virtual Task<Extension> GetExtensionAsync(GetExtensionRequest request, CancellationToken cancellationToken)

Gets an Extension.

Parameters
Name Description
request GetExtensionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
GetExtensionRequest request = new GetExtensionRequest
{
    ExtensionName = ExtensionName.FromProjectLocationExtension("[PROJECT]", "[LOCATION]", "[EXTENSION]"),
};
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(request);

GetExtensionAsync(string, CallSettings)

public virtual Task<Extension> GetExtensionAsync(string name, CallSettings callSettings = null)

Gets an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(name);

GetExtensionAsync(string, CancellationToken)

public virtual Task<Extension> GetExtensionAsync(string name, CancellationToken cancellationToken)

Gets an Extension.

Parameters
Name Description
name string

Required. The name of the Extension resource. Format: projects/{project}/locations/{location}/extensions/{extension}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/extensions/[EXTENSION]";
// Make the request
Extension response = await extensionRegistryServiceClient.GetExtensionAsync(name);

ImportExtension(LocationName, Extension, CallSettings)

public virtual Operation<Extension, ImportExtensionOperationMetadata> ImportExtension(LocationName parent, Extension extension, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExtensionImportExtensionOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = extensionRegistryServiceClient.ImportExtension(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceImportExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtension(ImportExtensionRequest, CallSettings)

public virtual Operation<Extension, ImportExtensionOperationMetadata> ImportExtension(ImportExtensionRequest request, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
request ImportExtensionRequest

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
OperationExtensionImportExtensionOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
ImportExtensionRequest request = new ImportExtensionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Extension = new Extension(),
};
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = extensionRegistryServiceClient.ImportExtension(request);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceImportExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtension(string, Extension, CallSettings)

public virtual Operation<Extension, ImportExtensionOperationMetadata> ImportExtension(string parent, Extension extension, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
parent string

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExtensionImportExtensionOperationMetadata

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = extensionRegistryServiceClient.ImportExtension(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = extensionRegistryServiceClient.PollOnceImportExtension(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(LocationName, Extension, CallSettings)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(LocationName parent, Extension extension, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(LocationName, Extension, CancellationToken)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(LocationName parent, Extension extension, CancellationToken cancellationToken)

Imports an Extension.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(ImportExtensionRequest, CallSettings)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(ImportExtensionRequest request, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
request ImportExtensionRequest

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
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ImportExtensionRequest request = new ImportExtensionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Extension = new Extension(),
};
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(ImportExtensionRequest, CancellationToken)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(ImportExtensionRequest request, CancellationToken cancellationToken)

Imports an Extension.

Parameters
Name Description
request ImportExtensionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ImportExtensionRequest request = new ImportExtensionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Extension = new Extension(),
};
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(request);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(string, Extension, CallSettings)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(string parent, Extension extension, CallSettings callSettings = null)

Imports an Extension.

Parameters
Name Description
parent string

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ImportExtensionAsync(string, Extension, CancellationToken)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> ImportExtensionAsync(string parent, Extension extension, CancellationToken cancellationToken)

Imports an Extension.

Parameters
Name Description
parent string

Required. The resource name of the Location to import the Extension in. Format: projects/{project}/locations/{location}

extension Extension

Required. The Extension to import.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Extension extension = new Extension();
// Make the request
Operation<Extension, ImportExtensionOperationMetadata> response = await extensionRegistryServiceClient.ImportExtensionAsync(parent, extension);

// Poll until the returned long-running operation is complete
Operation<Extension, ImportExtensionOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Extension result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Extension, ImportExtensionOperationMetadata> retrievedResponse = await extensionRegistryServiceClient.PollOnceImportExtensionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Extension retrievedResult = retrievedResponse.Result;
}

ListExtensions(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListExtensionsResponse, Extension> ListExtensions(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the Extensions from. 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
PagedEnumerableListExtensionsResponseExtension

A pageable sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Extension 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 (ListExtensionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

ListExtensions(ListExtensionsRequest, CallSettings)

public virtual PagedEnumerable<ListExtensionsResponse, Extension> ListExtensions(ListExtensionsRequest request, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
request ListExtensionsRequest

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
PagedEnumerableListExtensionsResponseExtension

A pageable sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
ListExtensionsRequest request = new ListExtensionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensions(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Extension 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 (ListExtensionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

ListExtensions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListExtensionsResponse, Extension> ListExtensions(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the Extensions from. 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
PagedEnumerableListExtensionsResponseExtension

A pageable sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensions(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Extension 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 (ListExtensionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

ListExtensionsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExtensionsResponse, Extension> ListExtensionsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the Extensions from. 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
PagedAsyncEnumerableListExtensionsResponseExtension

A pageable asynchronous sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Extension 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((ListExtensionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

ListExtensionsAsync(ListExtensionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListExtensionsResponse, Extension> ListExtensionsAsync(ListExtensionsRequest request, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
request ListExtensionsRequest

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
PagedAsyncEnumerableListExtensionsResponseExtension

A pageable asynchronous sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
ListExtensionsRequest request = new ListExtensionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Extension 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((ListExtensionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

ListExtensionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExtensionsResponse, Extension> ListExtensionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Extensions in a location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the Extensions from. 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
PagedAsyncEnumerableListExtensionsResponseExtension

A pageable asynchronous sequence of Extension resources.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListExtensionsResponse, Extension> response = extensionRegistryServiceClient.ListExtensionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Extension 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((ListExtensionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Extension 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<Extension> 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 (Extension 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;

PollOnceDeleteExtension(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteExtension(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteExtension.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteExtensionAsync(string, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteExtensionAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteExtension.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

PollOnceImportExtension(string, CallSettings)

public virtual Operation<Extension, ImportExtensionOperationMetadata> PollOnceImportExtension(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ImportExtension.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExtensionImportExtensionOperationMetadata

The result of polling the operation.

PollOnceImportExtensionAsync(string, CallSettings)

public virtual Task<Operation<Extension, ImportExtensionOperationMetadata>> PollOnceImportExtensionAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ImportExtension.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExtensionImportExtensionOperationMetadata

A task representing the result of polling the operation.

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.

UpdateExtension(Extension, FieldMask, CallSettings)

public virtual Extension UpdateExtension(Extension extension, FieldMask updateMask, CallSettings callSettings = null)

Updates an Extension.

Parameters
Name Description
extension Extension

Required. The Extension which replaces the resource on the server.

updateMask FieldMask

Required. Mask specifying which fields to update. Supported fields:

  • display_name
  • description
  • runtime_config
  • tool_use_examples
  • manifest.description
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Extension

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
Extension extension = new Extension();
FieldMask updateMask = new FieldMask();
// Make the request
Extension response = extensionRegistryServiceClient.UpdateExtension(extension, updateMask);

UpdateExtension(UpdateExtensionRequest, CallSettings)

public virtual Extension UpdateExtension(UpdateExtensionRequest request, CallSettings callSettings = null)

Updates an Extension.

Parameters
Name Description
request UpdateExtensionRequest

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
Extension

The RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = ExtensionRegistryServiceClient.Create();
// Initialize request argument(s)
UpdateExtensionRequest request = new UpdateExtensionRequest
{
    Extension = new Extension(),
    UpdateMask = new FieldMask(),
};
// Make the request
Extension response = extensionRegistryServiceClient.UpdateExtension(request);

UpdateExtensionAsync(Extension, FieldMask, CallSettings)

public virtual Task<Extension> UpdateExtensionAsync(Extension extension, FieldMask updateMask, CallSettings callSettings = null)

Updates an Extension.

Parameters
Name Description
extension Extension

Required. The Extension which replaces the resource on the server.

updateMask FieldMask

Required. Mask specifying which fields to update. Supported fields:

  • display_name
  • description
  • runtime_config
  • tool_use_examples
  • manifest.description
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
Extension extension = new Extension();
FieldMask updateMask = new FieldMask();
// Make the request
Extension response = await extensionRegistryServiceClient.UpdateExtensionAsync(extension, updateMask);

UpdateExtensionAsync(Extension, FieldMask, CancellationToken)

public virtual Task<Extension> UpdateExtensionAsync(Extension extension, FieldMask updateMask, CancellationToken cancellationToken)

Updates an Extension.

Parameters
Name Description
extension Extension

Required. The Extension which replaces the resource on the server.

updateMask FieldMask

Required. Mask specifying which fields to update. Supported fields:

  • display_name
  • description
  • runtime_config
  • tool_use_examples
  • manifest.description
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
Extension extension = new Extension();
FieldMask updateMask = new FieldMask();
// Make the request
Extension response = await extensionRegistryServiceClient.UpdateExtensionAsync(extension, updateMask);

UpdateExtensionAsync(UpdateExtensionRequest, CallSettings)

public virtual Task<Extension> UpdateExtensionAsync(UpdateExtensionRequest request, CallSettings callSettings = null)

Updates an Extension.

Parameters
Name Description
request UpdateExtensionRequest

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
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExtensionRequest request = new UpdateExtensionRequest
{
    Extension = new Extension(),
    UpdateMask = new FieldMask(),
};
// Make the request
Extension response = await extensionRegistryServiceClient.UpdateExtensionAsync(request);

UpdateExtensionAsync(UpdateExtensionRequest, CancellationToken)

public virtual Task<Extension> UpdateExtensionAsync(UpdateExtensionRequest request, CancellationToken cancellationToken)

Updates an Extension.

Parameters
Name Description
request UpdateExtensionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExtension

A Task containing the RPC response.

Example
// Create client
ExtensionRegistryServiceClient extensionRegistryServiceClient = await ExtensionRegistryServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExtensionRequest request = new UpdateExtensionRequest
{
    Extension = new Extension(),
    UpdateMask = new FieldMask(),
};
// Make the request
Extension response = await extensionRegistryServiceClient.UpdateExtensionAsync(request);