Vertex AI v1beta1 API - Class ExampleStoreServiceClient (1.0.0-beta24)

public abstract class ExampleStoreServiceClient

Reference documentation and code samples for the Vertex AI v1beta1 API class ExampleStoreServiceClient.

ExampleStoreService client wrapper, for convenient use.

Inheritance

object > ExampleStoreServiceClient

Namespace

Google.Cloud.AIPlatform.V1Beta1

Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

Remarks

A service for managing and retrieving few-shot examples.

Properties

CreateExampleStoreOperationsClient

public virtual OperationsClient CreateExampleStoreOperationsClient { get; }

The long-running operations client for CreateExampleStore.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ExampleStoreService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default ExampleStoreService scopes are:

DeleteExampleStoreOperationsClient

public virtual OperationsClient DeleteExampleStoreOperationsClient { get; }

The long-running operations client for DeleteExampleStore.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual ExampleStoreService.ExampleStoreServiceClient GrpcClient { get; }

The underlying gRPC ExampleStoreService client

Property Value
Type Description
ExampleStoreServiceExampleStoreServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

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

UpdateExampleStoreOperationsClient

public virtual OperationsClient UpdateExampleStoreOperationsClient { get; }

The long-running operations client for UpdateExampleStore.

Property Value
Type Description
OperationsClient

Methods

Create()

public static ExampleStoreServiceClient Create()

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

Returns
Type Description
ExampleStoreServiceClient

The created ExampleStoreServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskExampleStoreServiceClient

The task representing the created ExampleStoreServiceClient.

CreateExampleStore(LocationName, ExampleStore, CallSettings)

public virtual Operation<ExampleStore, CreateExampleStoreOperationMetadata> CreateExampleStore(LocationName parent, ExampleStore exampleStore, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
parent LocationName

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

exampleStore ExampleStore

Required. The Example Store to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExampleStoreCreateExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = exampleStoreServiceClient.CreateExampleStore(parent, exampleStore);

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

CreateExampleStore(CreateExampleStoreRequest, CallSettings)

public virtual Operation<ExampleStore, CreateExampleStoreOperationMetadata> CreateExampleStore(CreateExampleStoreRequest request, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
request CreateExampleStoreRequest

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
OperationExampleStoreCreateExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
CreateExampleStoreRequest request = new CreateExampleStoreRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExampleStore = new ExampleStore(),
};
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = exampleStoreServiceClient.CreateExampleStore(request);

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

CreateExampleStore(string, ExampleStore, CallSettings)

public virtual Operation<ExampleStore, CreateExampleStoreOperationMetadata> CreateExampleStore(string parent, ExampleStore exampleStore, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
parent string

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

exampleStore ExampleStore

Required. The Example Store to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExampleStoreCreateExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = exampleStoreServiceClient.CreateExampleStore(parent, exampleStore);

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

CreateExampleStoreAsync(LocationName, ExampleStore, CallSettings)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(LocationName parent, ExampleStore exampleStore, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
parent LocationName

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

exampleStore ExampleStore

Required. The Example Store to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(parent, exampleStore);

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

CreateExampleStoreAsync(LocationName, ExampleStore, CancellationToken)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(LocationName parent, ExampleStore exampleStore, CancellationToken cancellationToken)

Create an ExampleStore.

Parameters
Name Description
parent LocationName

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

exampleStore ExampleStore

Required. The Example Store to be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(parent, exampleStore);

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

CreateExampleStoreAsync(CreateExampleStoreRequest, CallSettings)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(CreateExampleStoreRequest request, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
request CreateExampleStoreRequest

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
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExampleStoreRequest request = new CreateExampleStoreRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExampleStore = new ExampleStore(),
};
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(request);

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

CreateExampleStoreAsync(CreateExampleStoreRequest, CancellationToken)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(CreateExampleStoreRequest request, CancellationToken cancellationToken)

Create an ExampleStore.

Parameters
Name Description
request CreateExampleStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
CreateExampleStoreRequest request = new CreateExampleStoreRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ExampleStore = new ExampleStore(),
};
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(request);

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

CreateExampleStoreAsync(string, ExampleStore, CallSettings)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(string parent, ExampleStore exampleStore, CallSettings callSettings = null)

Create an ExampleStore.

Parameters
Name Description
parent string

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

exampleStore ExampleStore

Required. The Example Store to be created.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(parent, exampleStore);

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

CreateExampleStoreAsync(string, ExampleStore, CancellationToken)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> CreateExampleStoreAsync(string parent, ExampleStore exampleStore, CancellationToken cancellationToken)

Create an ExampleStore.

Parameters
Name Description
parent string

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

exampleStore ExampleStore

Required. The Example Store to be created.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ExampleStore exampleStore = new ExampleStore();
// Make the request
Operation<ExampleStore, CreateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.CreateExampleStoreAsync(parent, exampleStore);

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

DeleteExampleStore(DeleteExampleStoreRequest, CallSettings)

public virtual Operation<Empty, DeleteExampleStoreOperationMetadata> DeleteExampleStore(DeleteExampleStoreRequest request, CallSettings callSettings = null)

Delete an ExampleStore.

Parameters
Name Description
request DeleteExampleStoreRequest

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
OperationEmptyDeleteExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
DeleteExampleStoreRequest request = new DeleteExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = exampleStoreServiceClient.DeleteExampleStore(request);

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

DeleteExampleStore(ExampleStoreName, CallSettings)

public virtual Operation<Empty, DeleteExampleStoreOperationMetadata> DeleteExampleStore(ExampleStoreName name, CallSettings callSettings = null)

Delete an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = exampleStoreServiceClient.DeleteExampleStore(name);

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

DeleteExampleStore(string, CallSettings)

public virtual Operation<Empty, DeleteExampleStoreOperationMetadata> DeleteExampleStore(string name, CallSettings callSettings = null)

Delete an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyDeleteExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = exampleStoreServiceClient.DeleteExampleStore(name);

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

DeleteExampleStoreAsync(DeleteExampleStoreRequest, CallSettings)

public virtual Task<Operation<Empty, DeleteExampleStoreOperationMetadata>> DeleteExampleStoreAsync(DeleteExampleStoreRequest request, CallSettings callSettings = null)

Delete an ExampleStore.

Parameters
Name Description
request DeleteExampleStoreRequest

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
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteExampleStoreRequest request = new DeleteExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(request);

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

DeleteExampleStoreAsync(DeleteExampleStoreRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteExampleStoreOperationMetadata>> DeleteExampleStoreAsync(DeleteExampleStoreRequest request, CancellationToken cancellationToken)

Delete an ExampleStore.

Parameters
Name Description
request DeleteExampleStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteExampleStoreRequest request = new DeleteExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(request);

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

DeleteExampleStoreAsync(ExampleStoreName, CallSettings)

public virtual Task<Operation<Empty, DeleteExampleStoreOperationMetadata>> DeleteExampleStoreAsync(ExampleStoreName name, CallSettings callSettings = null)

Delete an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(name);

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

DeleteExampleStoreAsync(ExampleStoreName, CancellationToken)

public virtual Task<Operation<Empty, DeleteExampleStoreOperationMetadata>> DeleteExampleStoreAsync(ExampleStoreName name, CancellationToken cancellationToken)

Delete an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(name);

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

DeleteExampleStoreAsync(string, CallSettings)

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

Delete an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(name);

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

DeleteExampleStoreAsync(string, CancellationToken)

public virtual Task<Operation<Empty, DeleteExampleStoreOperationMetadata>> DeleteExampleStoreAsync(string name, CancellationToken cancellationToken)

Delete an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore to be deleted. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
Operation<Empty, DeleteExampleStoreOperationMetadata> response = await exampleStoreServiceClient.DeleteExampleStoreAsync(name);

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

FetchExamples(FetchExamplesRequest, CallSettings)

public virtual PagedEnumerable<FetchExamplesResponse, Example> FetchExamples(FetchExamplesRequest request, CallSettings callSettings = null)

Get Examples from the Example Store.

Parameters
Name Description
request FetchExamplesRequest

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
PagedEnumerableFetchExamplesResponseExample

A pageable sequence of Example resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
FetchExamplesRequest request = new FetchExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    ExampleIds = { "", },
    StoredContentsExampleFilter = new StoredContentsExampleFilter(),
};
// Make the request
PagedEnumerable<FetchExamplesResponse, Example> response = exampleStoreServiceClient.FetchExamples(request);

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

FetchExamplesAsync(FetchExamplesRequest, CallSettings)

public virtual PagedAsyncEnumerable<FetchExamplesResponse, Example> FetchExamplesAsync(FetchExamplesRequest request, CallSettings callSettings = null)

Get Examples from the Example Store.

Parameters
Name Description
request FetchExamplesRequest

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
PagedAsyncEnumerableFetchExamplesResponseExample

A pageable asynchronous sequence of Example resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
FetchExamplesRequest request = new FetchExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    ExampleIds = { "", },
    StoredContentsExampleFilter = new StoredContentsExampleFilter(),
};
// Make the request
PagedAsyncEnumerable<FetchExamplesResponse, Example> response = exampleStoreServiceClient.FetchExamplesAsync(request);

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

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

GetExampleStore(ExampleStoreName, CallSettings)

public virtual ExampleStore GetExampleStore(ExampleStoreName name, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExampleStore

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
ExampleStore response = exampleStoreServiceClient.GetExampleStore(name);

GetExampleStore(GetExampleStoreRequest, CallSettings)

public virtual ExampleStore GetExampleStore(GetExampleStoreRequest request, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
request GetExampleStoreRequest

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
ExampleStore

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
GetExampleStoreRequest request = new GetExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
ExampleStore response = exampleStoreServiceClient.GetExampleStore(request);

GetExampleStore(string, CallSettings)

public virtual ExampleStore GetExampleStore(string name, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ExampleStore

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
ExampleStore response = exampleStoreServiceClient.GetExampleStore(name);

GetExampleStoreAsync(ExampleStoreName, CallSettings)

public virtual Task<ExampleStore> GetExampleStoreAsync(ExampleStoreName name, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(name);

GetExampleStoreAsync(ExampleStoreName, CancellationToken)

public virtual Task<ExampleStore> GetExampleStoreAsync(ExampleStoreName name, CancellationToken cancellationToken)

Get an ExampleStore.

Parameters
Name Description
name ExampleStoreName

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStoreName name = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]");
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(name);

GetExampleStoreAsync(GetExampleStoreRequest, CallSettings)

public virtual Task<ExampleStore> GetExampleStoreAsync(GetExampleStoreRequest request, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
request GetExampleStoreRequest

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
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
GetExampleStoreRequest request = new GetExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(request);

GetExampleStoreAsync(GetExampleStoreRequest, CancellationToken)

public virtual Task<ExampleStore> GetExampleStoreAsync(GetExampleStoreRequest request, CancellationToken cancellationToken)

Get an ExampleStore.

Parameters
Name Description
request GetExampleStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
GetExampleStoreRequest request = new GetExampleStoreRequest
{
    ExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
};
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(request);

GetExampleStoreAsync(string, CallSettings)

public virtual Task<ExampleStore> GetExampleStoreAsync(string name, CallSettings callSettings = null)

Get an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(name);

GetExampleStoreAsync(string, CancellationToken)

public virtual Task<ExampleStore> GetExampleStoreAsync(string name, CancellationToken cancellationToken)

Get an ExampleStore.

Parameters
Name Description
name string

Required. The resource name of the ExampleStore. Format: projects/{project}/locations/{location}/exampleStores/{example_store}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskExampleStore

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/exampleStores/[EXAMPLE_STORE]";
// Make the request
ExampleStore response = await exampleStoreServiceClient.GetExampleStoreAsync(name);

ListExampleStores(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStores(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the ExampleStores from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListExampleStoresResponseExampleStore

A pageable sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStores(parent);

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

ListExampleStores(ListExampleStoresRequest, CallSettings)

public virtual PagedEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStores(ListExampleStoresRequest request, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
request ListExampleStoresRequest

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
PagedEnumerableListExampleStoresResponseExampleStore

A pageable sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
ListExampleStoresRequest request = new ListExampleStoresRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStores(request);

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

ListExampleStores(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStores(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the ExampleStores from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListExampleStoresResponseExampleStore

A pageable sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStores(parent);

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

ListExampleStoresAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStoresAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
parent LocationName

Required. The resource name of the Location to list the ExampleStores from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListExampleStoresResponseExampleStore

A pageable asynchronous sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStoresAsync(parent);

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

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

ListExampleStoresAsync(ListExampleStoresRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStoresAsync(ListExampleStoresRequest request, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
request ListExampleStoresRequest

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
PagedAsyncEnumerableListExampleStoresResponseExampleStore

A pageable asynchronous sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ListExampleStoresRequest request = new ListExampleStoresRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStoresAsync(request);

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

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

ListExampleStoresAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> ListExampleStoresAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List ExampleStores in a Location.

Parameters
Name Description
parent string

Required. The resource name of the Location to list the ExampleStores from. Format: projects/{project}/locations/{location}

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListExampleStoresResponseExampleStore

A pageable asynchronous sequence of ExampleStore resources.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListExampleStoresResponse, ExampleStore> response = exampleStoreServiceClient.ListExampleStoresAsync(parent);

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

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

PollOnceCreateExampleStore(string, CallSettings)

public virtual Operation<ExampleStore, CreateExampleStoreOperationMetadata> PollOnceCreateExampleStore(string operationName, CallSettings callSettings = null)

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

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
OperationExampleStoreCreateExampleStoreOperationMetadata

The result of polling the operation.

PollOnceCreateExampleStoreAsync(string, CallSettings)

public virtual Task<Operation<ExampleStore, CreateExampleStoreOperationMetadata>> PollOnceCreateExampleStoreAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationExampleStoreCreateExampleStoreOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteExampleStore(string, CallSettings)

public virtual Operation<Empty, DeleteExampleStoreOperationMetadata> PollOnceDeleteExampleStore(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyDeleteExampleStoreOperationMetadata

The result of polling the operation.

PollOnceDeleteExampleStoreAsync(string, CallSettings)

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

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

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
TaskOperationEmptyDeleteExampleStoreOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateExampleStore(string, CallSettings)

public virtual Operation<ExampleStore, UpdateExampleStoreOperationMetadata> PollOnceUpdateExampleStore(string operationName, CallSettings callSettings = null)

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

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
OperationExampleStoreUpdateExampleStoreOperationMetadata

The result of polling the operation.

PollOnceUpdateExampleStoreAsync(string, CallSettings)

public virtual Task<Operation<ExampleStore, UpdateExampleStoreOperationMetadata>> PollOnceUpdateExampleStoreAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationExampleStoreUpdateExampleStoreOperationMetadata

A task representing the result of polling the operation.

RemoveExamples(RemoveExamplesRequest, CallSettings)

public virtual RemoveExamplesResponse RemoveExamples(RemoveExamplesRequest request, CallSettings callSettings = null)

Remove Examples from the Example Store.

Parameters
Name Description
request RemoveExamplesRequest

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
RemoveExamplesResponse

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
RemoveExamplesRequest request = new RemoveExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    ExampleIds = { "", },
    StoredContentsExampleFilter = new StoredContentsExampleFilter(),
};
// Make the request
RemoveExamplesResponse response = exampleStoreServiceClient.RemoveExamples(request);

RemoveExamplesAsync(RemoveExamplesRequest, CallSettings)

public virtual Task<RemoveExamplesResponse> RemoveExamplesAsync(RemoveExamplesRequest request, CallSettings callSettings = null)

Remove Examples from the Example Store.

Parameters
Name Description
request RemoveExamplesRequest

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
TaskRemoveExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveExamplesRequest request = new RemoveExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    ExampleIds = { "", },
    StoredContentsExampleFilter = new StoredContentsExampleFilter(),
};
// Make the request
RemoveExamplesResponse response = await exampleStoreServiceClient.RemoveExamplesAsync(request);

RemoveExamplesAsync(RemoveExamplesRequest, CancellationToken)

public virtual Task<RemoveExamplesResponse> RemoveExamplesAsync(RemoveExamplesRequest request, CancellationToken cancellationToken)

Remove Examples from the Example Store.

Parameters
Name Description
request RemoveExamplesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRemoveExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveExamplesRequest request = new RemoveExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    ExampleIds = { "", },
    StoredContentsExampleFilter = new StoredContentsExampleFilter(),
};
// Make the request
RemoveExamplesResponse response = await exampleStoreServiceClient.RemoveExamplesAsync(request);

SearchExamples(SearchExamplesRequest, CallSettings)

public virtual SearchExamplesResponse SearchExamples(SearchExamplesRequest request, CallSettings callSettings = null)

Search for similar Examples for given selection criteria.

Parameters
Name Description
request SearchExamplesRequest

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
SearchExamplesResponse

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
SearchExamplesRequest request = new SearchExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    TopK = 0L,
    StoredContentsExampleParameters = new StoredContentsExampleParameters(),
};
// Make the request
SearchExamplesResponse response = exampleStoreServiceClient.SearchExamples(request);

SearchExamplesAsync(SearchExamplesRequest, CallSettings)

public virtual Task<SearchExamplesResponse> SearchExamplesAsync(SearchExamplesRequest request, CallSettings callSettings = null)

Search for similar Examples for given selection criteria.

Parameters
Name Description
request SearchExamplesRequest

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
TaskSearchExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
SearchExamplesRequest request = new SearchExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    TopK = 0L,
    StoredContentsExampleParameters = new StoredContentsExampleParameters(),
};
// Make the request
SearchExamplesResponse response = await exampleStoreServiceClient.SearchExamplesAsync(request);

SearchExamplesAsync(SearchExamplesRequest, CancellationToken)

public virtual Task<SearchExamplesResponse> SearchExamplesAsync(SearchExamplesRequest request, CancellationToken cancellationToken)

Search for similar Examples for given selection criteria.

Parameters
Name Description
request SearchExamplesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSearchExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
SearchExamplesRequest request = new SearchExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    TopK = 0L,
    StoredContentsExampleParameters = new StoredContentsExampleParameters(),
};
// Make the request
SearchExamplesResponse response = await exampleStoreServiceClient.SearchExamplesAsync(request);

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.

UpdateExampleStore(ExampleStore, FieldMask, CallSettings)

public virtual Operation<ExampleStore, UpdateExampleStoreOperationMetadata> UpdateExampleStore(ExampleStore exampleStore, FieldMask updateMask, CallSettings callSettings = null)

Update an ExampleStore.

Parameters
Name Description
exampleStore ExampleStore

Required. The Example Store which replaces the resource on the server.

updateMask FieldMask

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

  • display_name
  • description
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationExampleStoreUpdateExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
ExampleStore exampleStore = new ExampleStore();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = exampleStoreServiceClient.UpdateExampleStore(exampleStore, updateMask);

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

UpdateExampleStore(UpdateExampleStoreRequest, CallSettings)

public virtual Operation<ExampleStore, UpdateExampleStoreOperationMetadata> UpdateExampleStore(UpdateExampleStoreRequest request, CallSettings callSettings = null)

Update an ExampleStore.

Parameters
Name Description
request UpdateExampleStoreRequest

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
OperationExampleStoreUpdateExampleStoreOperationMetadata

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
UpdateExampleStoreRequest request = new UpdateExampleStoreRequest
{
    ExampleStore = new ExampleStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = exampleStoreServiceClient.UpdateExampleStore(request);

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

UpdateExampleStoreAsync(ExampleStore, FieldMask, CallSettings)

public virtual Task<Operation<ExampleStore, UpdateExampleStoreOperationMetadata>> UpdateExampleStoreAsync(ExampleStore exampleStore, FieldMask updateMask, CallSettings callSettings = null)

Update an ExampleStore.

Parameters
Name Description
exampleStore ExampleStore

Required. The Example Store which replaces the resource on the server.

updateMask FieldMask

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

  • display_name
  • description
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationExampleStoreUpdateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStore exampleStore = new ExampleStore();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.UpdateExampleStoreAsync(exampleStore, updateMask);

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

UpdateExampleStoreAsync(ExampleStore, FieldMask, CancellationToken)

public virtual Task<Operation<ExampleStore, UpdateExampleStoreOperationMetadata>> UpdateExampleStoreAsync(ExampleStore exampleStore, FieldMask updateMask, CancellationToken cancellationToken)

Update an ExampleStore.

Parameters
Name Description
exampleStore ExampleStore

Required. The Example Store which replaces the resource on the server.

updateMask FieldMask

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

  • display_name
  • description
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExampleStoreUpdateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
ExampleStore exampleStore = new ExampleStore();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.UpdateExampleStoreAsync(exampleStore, updateMask);

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

UpdateExampleStoreAsync(UpdateExampleStoreRequest, CallSettings)

public virtual Task<Operation<ExampleStore, UpdateExampleStoreOperationMetadata>> UpdateExampleStoreAsync(UpdateExampleStoreRequest request, CallSettings callSettings = null)

Update an ExampleStore.

Parameters
Name Description
request UpdateExampleStoreRequest

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
TaskOperationExampleStoreUpdateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExampleStoreRequest request = new UpdateExampleStoreRequest
{
    ExampleStore = new ExampleStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.UpdateExampleStoreAsync(request);

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

UpdateExampleStoreAsync(UpdateExampleStoreRequest, CancellationToken)

public virtual Task<Operation<ExampleStore, UpdateExampleStoreOperationMetadata>> UpdateExampleStoreAsync(UpdateExampleStoreRequest request, CancellationToken cancellationToken)

Update an ExampleStore.

Parameters
Name Description
request UpdateExampleStoreRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationExampleStoreUpdateExampleStoreOperationMetadata

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExampleStoreRequest request = new UpdateExampleStoreRequest
{
    ExampleStore = new ExampleStore(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<ExampleStore, UpdateExampleStoreOperationMetadata> response = await exampleStoreServiceClient.UpdateExampleStoreAsync(request);

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

UpsertExamples(UpsertExamplesRequest, CallSettings)

public virtual UpsertExamplesResponse UpsertExamples(UpsertExamplesRequest request, CallSettings callSettings = null)

Create or update Examples in the Example Store.

Parameters
Name Description
request UpsertExamplesRequest

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
UpsertExamplesResponse

The RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = ExampleStoreServiceClient.Create();
// Initialize request argument(s)
UpsertExamplesRequest request = new UpsertExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    Examples = { new Example(), },
    Overwrite = false,
};
// Make the request
UpsertExamplesResponse response = exampleStoreServiceClient.UpsertExamples(request);

UpsertExamplesAsync(UpsertExamplesRequest, CallSettings)

public virtual Task<UpsertExamplesResponse> UpsertExamplesAsync(UpsertExamplesRequest request, CallSettings callSettings = null)

Create or update Examples in the Example Store.

Parameters
Name Description
request UpsertExamplesRequest

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
TaskUpsertExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpsertExamplesRequest request = new UpsertExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    Examples = { new Example(), },
    Overwrite = false,
};
// Make the request
UpsertExamplesResponse response = await exampleStoreServiceClient.UpsertExamplesAsync(request);

UpsertExamplesAsync(UpsertExamplesRequest, CancellationToken)

public virtual Task<UpsertExamplesResponse> UpsertExamplesAsync(UpsertExamplesRequest request, CancellationToken cancellationToken)

Create or update Examples in the Example Store.

Parameters
Name Description
request UpsertExamplesRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskUpsertExamplesResponse

A Task containing the RPC response.

Example
// Create client
ExampleStoreServiceClient exampleStoreServiceClient = await ExampleStoreServiceClient.CreateAsync();
// Initialize request argument(s)
UpsertExamplesRequest request = new UpsertExamplesRequest
{
    ExampleStoreAsExampleStoreName = ExampleStoreName.FromProjectLocationExampleStore("[PROJECT]", "[LOCATION]", "[EXAMPLE_STORE]"),
    Examples = { new Example(), },
    Overwrite = false,
};
// Make the request
UpsertExamplesResponse response = await exampleStoreServiceClient.UpsertExamplesAsync(request);