Agent Registry v1 API - Class AgentRegistryClient (1.0.0-beta01)

public abstract class AgentRegistryClient

Reference documentation and code samples for the Agent Registry v1 API class AgentRegistryClient.

AgentRegistry client wrapper, for convenient use.

Inheritance

object > AgentRegistryClient

Derived Types

Namespace

Google.Cloud.AgentRegistry.V1

Assembly

Google.Cloud.AgentRegistry.V1.dll

Remarks

Service for managing Agents, Endpoints, McpServers, Services, and Bindings.

Properties

CreateBindingOperationsClient

public virtual OperationsClient CreateBindingOperationsClient { get; }

The long-running operations client for CreateBinding.

Property Value
Type Description
OperationsClient

CreateServiceOperationsClient

public virtual OperationsClient CreateServiceOperationsClient { get; }

The long-running operations client for CreateService.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default AgentRegistry scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

DeleteBindingOperationsClient

public virtual OperationsClient DeleteBindingOperationsClient { get; }

The long-running operations client for DeleteBinding.

Property Value
Type Description
OperationsClient

DeleteServiceOperationsClient

public virtual OperationsClient DeleteServiceOperationsClient { get; }

The long-running operations client for DeleteService.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual AgentRegistry.AgentRegistryClient GrpcClient { get; }

The underlying gRPC AgentRegistry client

Property Value
Type Description
AgentRegistryAgentRegistryClient

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

UpdateBindingOperationsClient

public virtual OperationsClient UpdateBindingOperationsClient { get; }

The long-running operations client for UpdateBinding.

Property Value
Type Description
OperationsClient

UpdateServiceOperationsClient

public virtual OperationsClient UpdateServiceOperationsClient { get; }

The long-running operations client for UpdateService.

Property Value
Type Description
OperationsClient

Methods

Create()

public static AgentRegistryClient Create()

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

Returns
Type Description
AgentRegistryClient

The created AgentRegistryClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskAgentRegistryClient

The task representing the created AgentRegistryClient.

CreateBinding(LocationName, Binding, string, CallSettings)

public virtual Operation<Binding, OperationMetadata> CreateBinding(LocationName parent, Binding binding, string bindingId, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBindingOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = agentRegistryClient.CreateBinding(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBinding(CreateBindingRequest, CallSettings)

public virtual Operation<Binding, OperationMetadata> CreateBinding(CreateBindingRequest request, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
request CreateBindingRequest

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
OperationBindingOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
CreateBindingRequest request = new CreateBindingRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BindingId = "",
    Binding = new Binding(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = agentRegistryClient.CreateBinding(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBinding(string, Binding, string, CallSettings)

public virtual Operation<Binding, OperationMetadata> CreateBinding(string parent, Binding binding, string bindingId, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBindingOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = agentRegistryClient.CreateBinding(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(LocationName, Binding, string, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(LocationName parent, Binding binding, string bindingId, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(LocationName, Binding, string, CancellationToken)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(LocationName parent, Binding binding, string bindingId, CancellationToken cancellationToken)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(CreateBindingRequest, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(CreateBindingRequest request, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
request CreateBindingRequest

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
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
CreateBindingRequest request = new CreateBindingRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BindingId = "",
    Binding = new Binding(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(CreateBindingRequest, CancellationToken)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(CreateBindingRequest request, CancellationToken cancellationToken)

Creates a new Binding in a given project and location.

Parameters
Name Description
request CreateBindingRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
CreateBindingRequest request = new CreateBindingRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    BindingId = "",
    Binding = new Binding(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(string, Binding, string, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(string parent, Binding binding, string bindingId, CallSettings callSettings = null)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateBindingAsync(string, Binding, string, CancellationToken)

public virtual Task<Operation<Binding, OperationMetadata>> CreateBindingAsync(string parent, Binding binding, string bindingId, CancellationToken cancellationToken)

Creates a new Binding in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Binding in. Expected format: projects/{project}/locations/{location}.

binding Binding

Required. The Binding resource that is being created.

bindingId string

Required. The ID to use for the binding, which will become the final component of the binding's resource name.

This value should be 4-63 characters, and must conform to RFC-1034. Specifically, it must match the regular expression ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Binding binding = new Binding();
string bindingId = "";
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.CreateBindingAsync(parent, binding, bindingId);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

CreateService(LocationName, Service, string, CallSettings)

public virtual Operation<Service, OperationMetadata> CreateService(LocationName parent, Service service, string serviceId, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationServiceOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = agentRegistryClient.CreateService(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateService(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateService(CreateServiceRequest, CallSettings)

public virtual Operation<Service, OperationMetadata> CreateService(CreateServiceRequest request, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
request CreateServiceRequest

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
OperationServiceOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
CreateServiceRequest request = new CreateServiceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ServiceId = "",
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = agentRegistryClient.CreateService(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateService(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateService(string, Service, string, CallSettings)

public virtual Operation<Service, OperationMetadata> CreateService(string parent, Service service, string serviceId, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationServiceOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = agentRegistryClient.CreateService(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceCreateService(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(LocationName, Service, string, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(LocationName parent, Service service, string serviceId, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(LocationName, Service, string, CancellationToken)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(LocationName parent, Service service, string serviceId, CancellationToken cancellationToken)

Creates a new Service in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(CreateServiceRequest, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(CreateServiceRequest request, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
request CreateServiceRequest

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
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
CreateServiceRequest request = new CreateServiceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ServiceId = "",
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(CreateServiceRequest, CancellationToken)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(CreateServiceRequest request, CancellationToken cancellationToken)

Creates a new Service in a given project and location.

Parameters
Name Description
request CreateServiceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
CreateServiceRequest request = new CreateServiceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ServiceId = "",
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(string, Service, string, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(string parent, Service service, string serviceId, CallSettings callSettings = null)

Creates a new Service in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

CreateServiceAsync(string, Service, string, CancellationToken)

public virtual Task<Operation<Service, OperationMetadata>> CreateServiceAsync(string parent, Service service, string serviceId, CancellationToken cancellationToken)

Creates a new Service in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to create the Service in. Expected format: projects/{project}/locations/{location}.

service Service

Required. The Service resource that is being created. Format: projects/{project}/locations/{location}/services/{service}.

serviceId string

Required. The ID to use for the service, which will become the final component of the service's resource name.

This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Service service = new Service();
string serviceId = "";
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.CreateServiceAsync(parent, service, serviceId);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceCreateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

DeleteBinding(BindingName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBinding(BindingName name, CallSettings callSettings = null)

Deletes a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteBinding(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteBinding(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;
}

DeleteBinding(DeleteBindingRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBinding(DeleteBindingRequest request, CallSettings callSettings = null)

Deletes a single Binding.

Parameters
Name Description
request DeleteBindingRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
DeleteBindingRequest request = new DeleteBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteBinding(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteBinding(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;
}

DeleteBinding(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteBinding(string name, CallSettings callSettings = null)

Deletes a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteBinding(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteBinding(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;
}

DeleteBindingAsync(BindingName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBindingAsync(BindingName name, CallSettings callSettings = null)

Deletes a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteBindingAsync(BindingName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBindingAsync(BindingName name, CancellationToken cancellationToken)

Deletes a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteBindingAsync(DeleteBindingRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBindingAsync(DeleteBindingRequest request, CallSettings callSettings = null)

Deletes a single Binding.

Parameters
Name Description
request DeleteBindingRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
DeleteBindingRequest request = new DeleteBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteBindingAsync(DeleteBindingRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBindingAsync(DeleteBindingRequest request, CancellationToken cancellationToken)

Deletes a single Binding.

Parameters
Name Description
request DeleteBindingRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
DeleteBindingRequest request = new DeleteBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteBindingAsync(string, CallSettings)

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

Deletes a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteBindingAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteBindingAsync(string name, CancellationToken cancellationToken)

Deletes a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteBindingAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteBindingAsync(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;
}

DeleteService(DeleteServiceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteService(DeleteServiceRequest request, CallSettings callSettings = null)

Deletes a single Service.

Parameters
Name Description
request DeleteServiceRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
DeleteServiceRequest request = new DeleteServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteService(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteService(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;
}

DeleteService(ServiceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteService(ServiceName name, CallSettings callSettings = null)

Deletes a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteService(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteService(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;
}

DeleteService(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteService(string name, CallSettings callSettings = null)

Deletes a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Operation<Empty, OperationMetadata> response = agentRegistryClient.DeleteService(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceDeleteService(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;
}

DeleteServiceAsync(DeleteServiceRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteServiceAsync(DeleteServiceRequest request, CallSettings callSettings = null)

Deletes a single Service.

Parameters
Name Description
request DeleteServiceRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
DeleteServiceRequest request = new DeleteServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

DeleteServiceAsync(DeleteServiceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteServiceAsync(DeleteServiceRequest request, CancellationToken cancellationToken)

Deletes a single Service.

Parameters
Name Description
request DeleteServiceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
DeleteServiceRequest request = new DeleteServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

DeleteServiceAsync(ServiceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteServiceAsync(ServiceName name, CallSettings callSettings = null)

Deletes a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

DeleteServiceAsync(ServiceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteServiceAsync(ServiceName name, CancellationToken cancellationToken)

Deletes a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

DeleteServiceAsync(string, CallSettings)

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

Deletes a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

DeleteServiceAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteServiceAsync(string name, CancellationToken cancellationToken)

Deletes a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Operation<Empty, OperationMetadata> response = await agentRegistryClient.DeleteServiceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceDeleteServiceAsync(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;
}

FetchAvailableBindings(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindings(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
parent LocationName

Required. The parent, in the 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
PagedEnumerableFetchAvailableBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindings(parent);

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

FetchAvailableBindings(FetchAvailableBindingsRequest, CallSettings)

public virtual PagedEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindings(FetchAvailableBindingsRequest request, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
request FetchAvailableBindingsRequest

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
PagedEnumerableFetchAvailableBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
FetchAvailableBindingsRequest request = new FetchAvailableBindingsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SourceIdentifier = "",
    TargetIdentifier = "",
};
// Make the request
PagedEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindings(request);

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

FetchAvailableBindings(string, string, int?, CallSettings)

public virtual PagedEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindings(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
parent string

Required. The parent, in the 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
PagedEnumerableFetchAvailableBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindings(parent);

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

FetchAvailableBindingsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindingsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
parent LocationName

Required. The parent, in the 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
PagedAsyncEnumerableFetchAvailableBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindingsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (FetchAvailableBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

FetchAvailableBindingsAsync(FetchAvailableBindingsRequest, CallSettings)

public virtual PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindingsAsync(FetchAvailableBindingsRequest request, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
request FetchAvailableBindingsRequest

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
PagedAsyncEnumerableFetchAvailableBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
FetchAvailableBindingsRequest request = new FetchAvailableBindingsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SourceIdentifier = "",
    TargetIdentifier = "",
};
// Make the request
PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindingsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (FetchAvailableBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

FetchAvailableBindingsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> FetchAvailableBindingsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Fetches available Bindings.

Parameters
Name Description
parent string

Required. The parent, in the 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
PagedAsyncEnumerableFetchAvailableBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<FetchAvailableBindingsResponse, Binding> response = agentRegistryClient.FetchAvailableBindingsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (FetchAvailableBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

GetAgent(AgentName, CallSettings)

public virtual Agent GetAgent(AgentName name, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
name AgentName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Agent

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
AgentName name = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
Agent response = agentRegistryClient.GetAgent(name);

GetAgent(GetAgentRequest, CallSettings)

public virtual Agent GetAgent(GetAgentRequest request, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
request GetAgentRequest

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
Agent

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
GetAgentRequest request = new GetAgentRequest
{
    AgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
Agent response = agentRegistryClient.GetAgent(request);

GetAgent(string, CallSettings)

public virtual Agent GetAgent(string name, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Agent

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
Agent response = agentRegistryClient.GetAgent(name);

GetAgentAsync(AgentName, CallSettings)

public virtual Task<Agent> GetAgentAsync(AgentName name, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
name AgentName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
AgentName name = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(name);

GetAgentAsync(AgentName, CancellationToken)

public virtual Task<Agent> GetAgentAsync(AgentName name, CancellationToken cancellationToken)

Gets details of a single Agent.

Parameters
Name Description
name AgentName

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
AgentName name = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]");
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(name);

GetAgentAsync(GetAgentRequest, CallSettings)

public virtual Task<Agent> GetAgentAsync(GetAgentRequest request, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
request GetAgentRequest

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
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetAgentRequest request = new GetAgentRequest
{
    AgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(request);

GetAgentAsync(GetAgentRequest, CancellationToken)

public virtual Task<Agent> GetAgentAsync(GetAgentRequest request, CancellationToken cancellationToken)

Gets details of a single Agent.

Parameters
Name Description
request GetAgentRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetAgentRequest request = new GetAgentRequest
{
    AgentName = AgentName.FromProjectLocationAgent("[PROJECT]", "[LOCATION]", "[AGENT]"),
};
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(request);

GetAgentAsync(string, CallSettings)

public virtual Task<Agent> GetAgentAsync(string name, CallSettings callSettings = null)

Gets details of a single Agent.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(name);

GetAgentAsync(string, CancellationToken)

public virtual Task<Agent> GetAgentAsync(string name, CancellationToken cancellationToken)

Gets details of a single Agent.

Parameters
Name Description
name string

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskAgent

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]";
// Make the request
Agent response = await agentRegistryClient.GetAgentAsync(name);

GetBinding(BindingName, CallSettings)

public virtual Binding GetBinding(BindingName name, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Binding

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Binding response = agentRegistryClient.GetBinding(name);

GetBinding(GetBindingRequest, CallSettings)

public virtual Binding GetBinding(GetBindingRequest request, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
request GetBindingRequest

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
Binding

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
GetBindingRequest request = new GetBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
};
// Make the request
Binding response = agentRegistryClient.GetBinding(request);

GetBinding(string, CallSettings)

public virtual Binding GetBinding(string name, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Binding

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Binding response = agentRegistryClient.GetBinding(name);

GetBindingAsync(BindingName, CallSettings)

public virtual Task<Binding> GetBindingAsync(BindingName name, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(name);

GetBindingAsync(BindingName, CancellationToken)

public virtual Task<Binding> GetBindingAsync(BindingName name, CancellationToken cancellationToken)

Gets details of a single Binding.

Parameters
Name Description
name BindingName

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
BindingName name = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]");
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(name);

GetBindingAsync(GetBindingRequest, CallSettings)

public virtual Task<Binding> GetBindingAsync(GetBindingRequest request, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
request GetBindingRequest

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
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetBindingRequest request = new GetBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
};
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(request);

GetBindingAsync(GetBindingRequest, CancellationToken)

public virtual Task<Binding> GetBindingAsync(GetBindingRequest request, CancellationToken cancellationToken)

Gets details of a single Binding.

Parameters
Name Description
request GetBindingRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetBindingRequest request = new GetBindingRequest
{
    BindingName = BindingName.FromProjectLocationBinding("[PROJECT]", "[LOCATION]", "[BINDING]"),
};
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(request);

GetBindingAsync(string, CallSettings)

public virtual Task<Binding> GetBindingAsync(string name, CallSettings callSettings = null)

Gets details of a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(name);

GetBindingAsync(string, CancellationToken)

public virtual Task<Binding> GetBindingAsync(string name, CancellationToken cancellationToken)

Gets details of a single Binding.

Parameters
Name Description
name string

Required. The name of the Binding. Format: projects/{project}/locations/{location}/bindings/{binding}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskBinding

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/bindings/[BINDING]";
// Make the request
Binding response = await agentRegistryClient.GetBindingAsync(name);

GetEndpoint(EndpointName, CallSettings)

public virtual Endpoint GetEndpoint(EndpointName name, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
name EndpointName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = agentRegistryClient.GetEndpoint(name);

GetEndpoint(GetEndpointRequest, CallSettings)

public virtual Endpoint GetEndpoint(GetEndpointRequest request, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
request GetEndpointRequest

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
Endpoint

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = agentRegistryClient.GetEndpoint(request);

GetEndpoint(string, CallSettings)

public virtual Endpoint GetEndpoint(string name, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Endpoint

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = agentRegistryClient.GetEndpoint(name);

GetEndpointAsync(EndpointName, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(EndpointName name, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
name EndpointName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(name);

GetEndpointAsync(EndpointName, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(EndpointName name, CancellationToken cancellationToken)

Gets details of a single Endpoint.

Parameters
Name Description
name EndpointName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
EndpointName name = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(name);

GetEndpointAsync(GetEndpointRequest, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(GetEndpointRequest request, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
request GetEndpointRequest

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
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(request);

GetEndpointAsync(GetEndpointRequest, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(GetEndpointRequest request, CancellationToken cancellationToken)

Gets details of a single Endpoint.

Parameters
Name Description
request GetEndpointRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetEndpointRequest request = new GetEndpointRequest
{
    EndpointName = EndpointName.FromProjectLocationEndpoint("[PROJECT]", "[LOCATION]", "[ENDPOINT]"),
};
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(request);

GetEndpointAsync(string, CallSettings)

public virtual Task<Endpoint> GetEndpointAsync(string name, CallSettings callSettings = null)

Gets details of a single Endpoint.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(name);

GetEndpointAsync(string, CancellationToken)

public virtual Task<Endpoint> GetEndpointAsync(string name, CancellationToken cancellationToken)

Gets details of a single Endpoint.

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskEndpoint

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/endpoints/[ENDPOINT]";
// Make the request
Endpoint response = await agentRegistryClient.GetEndpointAsync(name);

GetMcpServer(GetMcpServerRequest, CallSettings)

public virtual McpServer GetMcpServer(GetMcpServerRequest request, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
request GetMcpServerRequest

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
McpServer

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
GetMcpServerRequest request = new GetMcpServerRequest
{
    McpServerName = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"),
};
// Make the request
McpServer response = agentRegistryClient.GetMcpServer(request);

GetMcpServer(McpServerName, CallSettings)

public virtual McpServer GetMcpServer(McpServerName name, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
name McpServerName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
McpServer

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
McpServerName name = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]");
// Make the request
McpServer response = agentRegistryClient.GetMcpServer(name);

GetMcpServer(string, CallSettings)

public virtual McpServer GetMcpServer(string name, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
McpServer

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/mcpServers/[MCP_SERVER]";
// Make the request
McpServer response = agentRegistryClient.GetMcpServer(name);

GetMcpServerAsync(GetMcpServerRequest, CallSettings)

public virtual Task<McpServer> GetMcpServerAsync(GetMcpServerRequest request, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
request GetMcpServerRequest

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
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetMcpServerRequest request = new GetMcpServerRequest
{
    McpServerName = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"),
};
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(request);

GetMcpServerAsync(GetMcpServerRequest, CancellationToken)

public virtual Task<McpServer> GetMcpServerAsync(GetMcpServerRequest request, CancellationToken cancellationToken)

Gets details of a single McpServer.

Parameters
Name Description
request GetMcpServerRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetMcpServerRequest request = new GetMcpServerRequest
{
    McpServerName = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]"),
};
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(request);

GetMcpServerAsync(McpServerName, CallSettings)

public virtual Task<McpServer> GetMcpServerAsync(McpServerName name, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
name McpServerName

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
McpServerName name = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]");
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(name);

GetMcpServerAsync(McpServerName, CancellationToken)

public virtual Task<McpServer> GetMcpServerAsync(McpServerName name, CancellationToken cancellationToken)

Gets details of a single McpServer.

Parameters
Name Description
name McpServerName

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
McpServerName name = McpServerName.FromProjectLocationMcpServer("[PROJECT]", "[LOCATION]", "[MCP_SERVER]");
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(name);

GetMcpServerAsync(string, CallSettings)

public virtual Task<McpServer> GetMcpServerAsync(string name, CallSettings callSettings = null)

Gets details of a single McpServer.

Parameters
Name Description
name string

Required. Name of the resource

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/mcpServers/[MCP_SERVER]";
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(name);

GetMcpServerAsync(string, CancellationToken)

public virtual Task<McpServer> GetMcpServerAsync(string name, CancellationToken cancellationToken)

Gets details of a single McpServer.

Parameters
Name Description
name string

Required. Name of the resource

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskMcpServer

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/mcpServers/[MCP_SERVER]";
// Make the request
McpServer response = await agentRegistryClient.GetMcpServerAsync(name);

GetService(GetServiceRequest, CallSettings)

public virtual Service GetService(GetServiceRequest request, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
request GetServiceRequest

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
Service

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
GetServiceRequest request = new GetServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
};
// Make the request
Service response = agentRegistryClient.GetService(request);

GetService(ServiceName, CallSettings)

public virtual Service GetService(ServiceName name, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Service

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Service response = agentRegistryClient.GetService(name);

GetService(string, CallSettings)

public virtual Service GetService(string name, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Service

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Service response = agentRegistryClient.GetService(name);

GetServiceAsync(GetServiceRequest, CallSettings)

public virtual Task<Service> GetServiceAsync(GetServiceRequest request, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
request GetServiceRequest

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
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetServiceRequest request = new GetServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
};
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(request);

GetServiceAsync(GetServiceRequest, CancellationToken)

public virtual Task<Service> GetServiceAsync(GetServiceRequest request, CancellationToken cancellationToken)

Gets details of a single Service.

Parameters
Name Description
request GetServiceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
GetServiceRequest request = new GetServiceRequest
{
    ServiceName = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]"),
};
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(request);

GetServiceAsync(ServiceName, CallSettings)

public virtual Task<Service> GetServiceAsync(ServiceName name, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(name);

GetServiceAsync(ServiceName, CancellationToken)

public virtual Task<Service> GetServiceAsync(ServiceName name, CancellationToken cancellationToken)

Gets details of a single Service.

Parameters
Name Description
name ServiceName

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ServiceName name = ServiceName.FromProjectLocationService("[PROJECT]", "[LOCATION]", "[SERVICE]");
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(name);

GetServiceAsync(string, CallSettings)

public virtual Task<Service> GetServiceAsync(string name, CallSettings callSettings = null)

Gets details of a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(name);

GetServiceAsync(string, CancellationToken)

public virtual Task<Service> GetServiceAsync(string name, CancellationToken cancellationToken)

Gets details of a single Service.

Parameters
Name Description
name string

Required. The name of the Service. Format: projects/{project}/locations/{location}/services/{service}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskService

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/services/[SERVICE]";
// Make the request
Service response = await agentRegistryClient.GetServiceAsync(name);

ListAgents(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListAgentsResponse, Agent> ListAgents(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListAgentsRequest

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
PagedEnumerableListAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgents(parent);

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

ListAgents(ListAgentsRequest, CallSettings)

public virtual PagedEnumerable<ListAgentsResponse, Agent> ListAgents(ListAgentsRequest request, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
request ListAgentsRequest

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
PagedEnumerableListAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ListAgentsRequest request = new ListAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgents(request);

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

ListAgents(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListAgentsResponse, Agent> ListAgents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListAgentsRequest

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
PagedEnumerableListAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgents(parent);

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

ListAgentsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentsResponse, Agent> ListAgentsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListAgentsRequest

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
PagedAsyncEnumerableListAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgentsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

ListAgentsAsync(ListAgentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentsResponse, Agent> ListAgentsAsync(ListAgentsRequest request, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
request ListAgentsRequest

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
PagedAsyncEnumerableListAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ListAgentsRequest request = new ListAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgentsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

ListAgentsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListAgentsResponse, Agent> ListAgentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Agents in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListAgentsRequest

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
PagedAsyncEnumerableListAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAgentsResponse, Agent> response = agentRegistryClient.ListAgentsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

ListBindings(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListBindingsResponse, Binding> ListBindings(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list bindings in. Expected 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
PagedEnumerableListBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindings(parent);

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

ListBindings(ListBindingsRequest, CallSettings)

public virtual PagedEnumerable<ListBindingsResponse, Binding> ListBindings(ListBindingsRequest request, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
request ListBindingsRequest

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
PagedEnumerableListBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ListBindingsRequest request = new ListBindingsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindings(request);

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

ListBindings(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListBindingsResponse, Binding> ListBindings(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list bindings in. Expected 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
PagedEnumerableListBindingsResponseBinding

A pageable sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindings(parent);

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

ListBindingsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBindingsResponse, Binding> ListBindingsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list bindings in. Expected 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
PagedAsyncEnumerableListBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindingsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

ListBindingsAsync(ListBindingsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListBindingsResponse, Binding> ListBindingsAsync(ListBindingsRequest request, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
request ListBindingsRequest

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
PagedAsyncEnumerableListBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ListBindingsRequest request = new ListBindingsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindingsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

ListBindingsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListBindingsResponse, Binding> ListBindingsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Bindings in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list bindings in. Expected 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
PagedAsyncEnumerableListBindingsResponseBinding

A pageable asynchronous sequence of Binding resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListBindingsResponse, Binding> response = agentRegistryClient.ListBindingsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListBindingsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Binding 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<Binding> 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 (Binding 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;

ListEndpoints(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list endpoints in. Expected 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
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpoints(parent);

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

ListEndpoints(ListEndpointsRequest, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(ListEndpointsRequest request, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
request ListEndpointsRequest

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
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ListEndpointsRequest request = new ListEndpointsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpoints(request);

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

ListEndpoints(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListEndpointsResponse, Endpoint> ListEndpoints(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list endpoints in. Expected 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
PagedEnumerableListEndpointsResponseEndpoint

A pageable sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpoints(parent);

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

ListEndpointsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list endpoints in. Expected 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
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpointsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint 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<Endpoint> 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 (Endpoint 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;

ListEndpointsAsync(ListEndpointsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(ListEndpointsRequest request, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
request ListEndpointsRequest

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
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ListEndpointsRequest request = new ListEndpointsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpointsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint 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<Endpoint> 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 (Endpoint 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;

ListEndpointsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> ListEndpointsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Endpoints in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list endpoints in. Expected 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
PagedAsyncEnumerableListEndpointsResponseEndpoint

A pageable asynchronous sequence of Endpoint resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEndpointsResponse, Endpoint> response = agentRegistryClient.ListEndpointsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListEndpointsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Endpoint 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<Endpoint> 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 (Endpoint 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;

ListMcpServers(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListMcpServersResponse, McpServer> ListMcpServers(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListMcpServersRequest. 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
PagedEnumerableListMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServers(parent);

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

ListMcpServers(ListMcpServersRequest, CallSettings)

public virtual PagedEnumerable<ListMcpServersResponse, McpServer> ListMcpServers(ListMcpServersRequest request, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
request ListMcpServersRequest

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
PagedEnumerableListMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ListMcpServersRequest request = new ListMcpServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServers(request);

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

ListMcpServers(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListMcpServersResponse, McpServer> ListMcpServers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListMcpServersRequest. 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
PagedEnumerableListMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServers(parent);

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

ListMcpServersAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListMcpServersResponse, McpServer> ListMcpServersAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListMcpServersRequest. 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
PagedAsyncEnumerableListMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServersAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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;

ListMcpServersAsync(ListMcpServersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListMcpServersResponse, McpServer> ListMcpServersAsync(ListMcpServersRequest request, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
request ListMcpServersRequest

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
PagedAsyncEnumerableListMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ListMcpServersRequest request = new ListMcpServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServersAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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;

ListMcpServersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListMcpServersResponse, McpServer> ListMcpServersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists McpServers in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListMcpServersRequest. 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
PagedAsyncEnumerableListMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListMcpServersResponse, McpServer> response = agentRegistryClient.ListMcpServersAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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;

ListServices(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListServicesResponse, Service> ListServices(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list services in. Expected 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
PagedEnumerableListServicesResponseService

A pageable sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServices(parent);

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

ListServices(ListServicesRequest, CallSettings)

public virtual PagedEnumerable<ListServicesResponse, Service> ListServices(ListServicesRequest request, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
request ListServicesRequest

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
PagedEnumerableListServicesResponseService

A pageable sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
ListServicesRequest request = new ListServicesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServices(request);

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

ListServices(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListServicesResponse, Service> ListServices(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list services in. Expected 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
PagedEnumerableListServicesResponseService

A pageable sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServices(parent);

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

ListServicesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListServicesResponse, Service> ListServicesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
parent LocationName

Required. The project and location to list services in. Expected 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
PagedAsyncEnumerableListServicesResponseService

A pageable asynchronous sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServicesAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Service 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<Service> 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 (Service 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;

ListServicesAsync(ListServicesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListServicesResponse, Service> ListServicesAsync(ListServicesRequest request, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
request ListServicesRequest

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
PagedAsyncEnumerableListServicesResponseService

A pageable asynchronous sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
ListServicesRequest request = new ListServicesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServicesAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Service 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<Service> 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 (Service 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;

ListServicesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListServicesResponse, Service> ListServicesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Services in a given project and location.

Parameters
Name Description
parent string

Required. The project and location to list services in. Expected 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
PagedAsyncEnumerableListServicesResponseService

A pageable asynchronous sequence of Service resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListServicesResponse, Service> response = agentRegistryClient.ListServicesAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListServicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Service 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<Service> 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 (Service 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;

PollOnceCreateBinding(string, CallSettings)

public virtual Operation<Binding, OperationMetadata> PollOnceCreateBinding(string operationName, CallSettings callSettings = null)

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

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
OperationBindingOperationMetadata

The result of polling the operation.

PollOnceCreateBindingAsync(string, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> PollOnceCreateBindingAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationBindingOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateService(string, CallSettings)

public virtual Operation<Service, OperationMetadata> PollOnceCreateService(string operationName, CallSettings callSettings = null)

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

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
OperationServiceOperationMetadata

The result of polling the operation.

PollOnceCreateServiceAsync(string, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> PollOnceCreateServiceAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationServiceOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteBinding(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteBinding(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteBindingAsync(string, CallSettings)

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

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

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
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteService(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteService(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteServiceAsync(string, CallSettings)

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

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

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
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateBinding(string, CallSettings)

public virtual Operation<Binding, OperationMetadata> PollOnceUpdateBinding(string operationName, CallSettings callSettings = null)

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

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
OperationBindingOperationMetadata

The result of polling the operation.

PollOnceUpdateBindingAsync(string, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> PollOnceUpdateBindingAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationBindingOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateService(string, CallSettings)

public virtual Operation<Service, OperationMetadata> PollOnceUpdateService(string operationName, CallSettings callSettings = null)

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

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
OperationServiceOperationMetadata

The result of polling the operation.

PollOnceUpdateServiceAsync(string, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> PollOnceUpdateServiceAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationServiceOperationMetadata

A task representing the result of polling the operation.

SearchAgents(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<SearchAgentsResponse, Agent> SearchAgents(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for SearchAgentsRequest. 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
PagedEnumerableSearchAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgents(parent);

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

SearchAgents(SearchAgentsRequest, CallSettings)

public virtual PagedEnumerable<SearchAgentsResponse, Agent> SearchAgents(SearchAgentsRequest request, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
request SearchAgentsRequest

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
PagedEnumerableSearchAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
SearchAgentsRequest request = new SearchAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SearchString = "",
};
// Make the request
PagedEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgents(request);

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

SearchAgents(string, string, int?, CallSettings)

public virtual PagedEnumerable<SearchAgentsResponse, Agent> SearchAgents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for SearchAgentsRequest. 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
PagedEnumerableSearchAgentsResponseAgent

A pageable sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgents(parent);

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

SearchAgentsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<SearchAgentsResponse, Agent> SearchAgentsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for SearchAgentsRequest. 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
PagedAsyncEnumerableSearchAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgentsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

SearchAgentsAsync(SearchAgentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<SearchAgentsResponse, Agent> SearchAgentsAsync(SearchAgentsRequest request, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
request SearchAgentsRequest

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
PagedAsyncEnumerableSearchAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
SearchAgentsRequest request = new SearchAgentsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SearchString = "",
};
// Make the request
PagedAsyncEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgentsAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

SearchAgentsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<SearchAgentsResponse, Agent> SearchAgentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches Agents in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for SearchAgentsRequest. 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
PagedAsyncEnumerableSearchAgentsResponseAgent

A pageable asynchronous sequence of Agent resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<SearchAgentsResponse, Agent> response = agentRegistryClient.SearchAgentsAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchAgentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Agent 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<Agent> 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 (Agent 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;

SearchMcpServers(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServers(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for SearchMcpServersRequest. 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
PagedEnumerableSearchMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServers(parent);

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

SearchMcpServers(SearchMcpServersRequest, CallSettings)

public virtual PagedEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServers(SearchMcpServersRequest request, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
request SearchMcpServersRequest

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
PagedEnumerableSearchMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
SearchMcpServersRequest request = new SearchMcpServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SearchString = "",
};
// Make the request
PagedEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServers(request);

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

SearchMcpServers(string, string, int?, CallSettings)

public virtual PagedEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServers(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for SearchMcpServersRequest. 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
PagedEnumerableSearchMcpServersResponseMcpServer

A pageable sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServers(parent);

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

SearchMcpServersAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServersAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for SearchMcpServersRequest. 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
PagedAsyncEnumerableSearchMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServersAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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;

SearchMcpServersAsync(SearchMcpServersRequest, CallSettings)

public virtual PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServersAsync(SearchMcpServersRequest request, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
request SearchMcpServersRequest

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
PagedAsyncEnumerableSearchMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
SearchMcpServersRequest request = new SearchMcpServersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SearchString = "",
};
// Make the request
PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServersAsync(request);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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;

SearchMcpServersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> SearchMcpServersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Searches McpServers in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for SearchMcpServersRequest. 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
PagedAsyncEnumerableSearchMcpServersResponseMcpServer

A pageable asynchronous sequence of McpServer resources.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<SearchMcpServersResponse, McpServer> response = agentRegistryClient.SearchMcpServersAsync(parent);

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

// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (SearchMcpServersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (McpServer 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<McpServer> 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 (McpServer 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.

UpdateBinding(Binding, FieldMask, CallSettings)

public virtual Operation<Binding, OperationMetadata> UpdateBinding(Binding binding, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Binding.

Parameters
Name Description
binding Binding

Required. The Binding resource that is being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Binding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationBindingOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
Binding binding = new Binding();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Binding, OperationMetadata> response = agentRegistryClient.UpdateBinding(binding, updateMask);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceUpdateBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateBinding(UpdateBindingRequest, CallSettings)

public virtual Operation<Binding, OperationMetadata> UpdateBinding(UpdateBindingRequest request, CallSettings callSettings = null)

Updates the parameters of a single Binding.

Parameters
Name Description
request UpdateBindingRequest

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
OperationBindingOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
UpdateBindingRequest request = new UpdateBindingRequest
{
    Binding = new Binding(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = agentRegistryClient.UpdateBinding(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceUpdateBinding(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateBindingAsync(Binding, FieldMask, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> UpdateBindingAsync(Binding binding, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Binding.

Parameters
Name Description
binding Binding

Required. The Binding resource that is being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Binding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
Binding binding = new Binding();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.UpdateBindingAsync(binding, updateMask);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateBindingAsync(Binding, FieldMask, CancellationToken)

public virtual Task<Operation<Binding, OperationMetadata>> UpdateBindingAsync(Binding binding, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a single Binding.

Parameters
Name Description
binding Binding

Required. The Binding resource that is being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Binding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
Binding binding = new Binding();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.UpdateBindingAsync(binding, updateMask);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateBindingAsync(UpdateBindingRequest, CallSettings)

public virtual Task<Operation<Binding, OperationMetadata>> UpdateBindingAsync(UpdateBindingRequest request, CallSettings callSettings = null)

Updates the parameters of a single Binding.

Parameters
Name Description
request UpdateBindingRequest

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
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
UpdateBindingRequest request = new UpdateBindingRequest
{
    Binding = new Binding(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.UpdateBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateBindingAsync(UpdateBindingRequest, CancellationToken)

public virtual Task<Operation<Binding, OperationMetadata>> UpdateBindingAsync(UpdateBindingRequest request, CancellationToken cancellationToken)

Updates the parameters of a single Binding.

Parameters
Name Description
request UpdateBindingRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationBindingOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
UpdateBindingRequest request = new UpdateBindingRequest
{
    Binding = new Binding(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
Operation<Binding, OperationMetadata> response = await agentRegistryClient.UpdateBindingAsync(request);

// Poll until the returned long-running operation is complete
Operation<Binding, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Binding 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<Binding, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateBindingAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Binding retrievedResult = retrievedResponse.Result;
}

UpdateService(Service, FieldMask, CallSettings)

public virtual Operation<Service, OperationMetadata> UpdateService(Service service, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Service.

Parameters
Name Description
service Service

Required. The Service resource that is being updated. Format: projects/{project}/locations/{location}/services/{service}.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationServiceOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, OperationMetadata> response = agentRegistryClient.UpdateService(service, updateMask);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceUpdateService(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

UpdateService(UpdateServiceRequest, CallSettings)

public virtual Operation<Service, OperationMetadata> UpdateService(UpdateServiceRequest request, CallSettings callSettings = null)

Updates the parameters of a single Service.

Parameters
Name Description
request UpdateServiceRequest

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
OperationServiceOperationMetadata

The RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = AgentRegistryClient.Create();
// Initialize request argument(s)
UpdateServiceRequest request = new UpdateServiceRequest
{
    UpdateMask = new FieldMask(),
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = agentRegistryClient.UpdateService(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = agentRegistryClient.PollOnceUpdateService(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

UpdateServiceAsync(Service, FieldMask, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> UpdateServiceAsync(Service service, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Service.

Parameters
Name Description
service Service

Required. The Service resource that is being updated. Format: projects/{project}/locations/{location}/services/{service}.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.UpdateServiceAsync(service, updateMask);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

UpdateServiceAsync(Service, FieldMask, CancellationToken)

public virtual Task<Operation<Service, OperationMetadata>> UpdateServiceAsync(Service service, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a single Service.

Parameters
Name Description
service Service

Required. The Service resource that is being updated. Format: projects/{project}/locations/{location}/services/{service}.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Service resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
Service service = new Service();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.UpdateServiceAsync(service, updateMask);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

UpdateServiceAsync(UpdateServiceRequest, CallSettings)

public virtual Task<Operation<Service, OperationMetadata>> UpdateServiceAsync(UpdateServiceRequest request, CallSettings callSettings = null)

Updates the parameters of a single Service.

Parameters
Name Description
request UpdateServiceRequest

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
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
UpdateServiceRequest request = new UpdateServiceRequest
{
    UpdateMask = new FieldMask(),
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.UpdateServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}

UpdateServiceAsync(UpdateServiceRequest, CancellationToken)

public virtual Task<Operation<Service, OperationMetadata>> UpdateServiceAsync(UpdateServiceRequest request, CancellationToken cancellationToken)

Updates the parameters of a single Service.

Parameters
Name Description
request UpdateServiceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationServiceOperationMetadata

A Task containing the RPC response.

Example
// Create client
AgentRegistryClient agentRegistryClient = await AgentRegistryClient.CreateAsync();
// Initialize request argument(s)
UpdateServiceRequest request = new UpdateServiceRequest
{
    UpdateMask = new FieldMask(),
    Service = new Service(),
    RequestId = "",
};
// Make the request
Operation<Service, OperationMetadata> response = await agentRegistryClient.UpdateServiceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Service, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Service 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<Service, OperationMetadata> retrievedResponse = await agentRegistryClient.PollOnceUpdateServiceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Service retrievedResult = retrievedResponse.Result;
}