Google Cloud Dialogflow v2 API - Class FulfillmentsClient (4.22.0)

public abstract class FulfillmentsClient

Reference documentation and code samples for the Google Cloud Dialogflow v2 API class FulfillmentsClient.

Fulfillments client wrapper, for convenient use.

Inheritance

object > FulfillmentsClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2

Assembly

Google.Cloud.Dialogflow.V2.dll

Remarks

Service for managing [Fulfillments][google.cloud.dialogflow.v2.Fulfillment].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Fulfillments scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual Fulfillments.FulfillmentsClient GrpcClient { get; }

The underlying gRPC Fulfillments client

Property Value
Type Description
FulfillmentsFulfillmentsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static FulfillmentsClient Create()

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

Returns
Type Description
FulfillmentsClient

The created FulfillmentsClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskFulfillmentsClient

The task representing the created FulfillmentsClient.

GetFulfillment(FulfillmentName, CallSettings)

public virtual Fulfillment GetFulfillment(FulfillmentName name, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
name FulfillmentName

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Fulfillment

The RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = FulfillmentsClient.Create();
// Initialize request argument(s)
FulfillmentName name = FulfillmentName.FromProject("[PROJECT]");
// Make the request
Fulfillment response = fulfillmentsClient.GetFulfillment(name);

GetFulfillment(GetFulfillmentRequest, CallSettings)

public virtual Fulfillment GetFulfillment(GetFulfillmentRequest request, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
request GetFulfillmentRequest

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
Fulfillment

The RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = FulfillmentsClient.Create();
// Initialize request argument(s)
GetFulfillmentRequest request = new GetFulfillmentRequest
{
    FulfillmentName = FulfillmentName.FromProject("[PROJECT]"),
};
// Make the request
Fulfillment response = fulfillmentsClient.GetFulfillment(request);

GetFulfillment(string, CallSettings)

public virtual Fulfillment GetFulfillment(string name, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
name string

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Fulfillment

The RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = FulfillmentsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/fulfillment";
// Make the request
Fulfillment response = fulfillmentsClient.GetFulfillment(name);

GetFulfillmentAsync(FulfillmentName, CallSettings)

public virtual Task<Fulfillment> GetFulfillmentAsync(FulfillmentName name, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
name FulfillmentName

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
FulfillmentName name = FulfillmentName.FromProject("[PROJECT]");
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(name);

GetFulfillmentAsync(FulfillmentName, CancellationToken)

public virtual Task<Fulfillment> GetFulfillmentAsync(FulfillmentName name, CancellationToken cancellationToken)

Retrieves the fulfillment.

Parameters
Name Description
name FulfillmentName

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
FulfillmentName name = FulfillmentName.FromProject("[PROJECT]");
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(name);

GetFulfillmentAsync(GetFulfillmentRequest, CallSettings)

public virtual Task<Fulfillment> GetFulfillmentAsync(GetFulfillmentRequest request, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
request GetFulfillmentRequest

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
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
GetFulfillmentRequest request = new GetFulfillmentRequest
{
    FulfillmentName = FulfillmentName.FromProject("[PROJECT]"),
};
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(request);

GetFulfillmentAsync(GetFulfillmentRequest, CancellationToken)

public virtual Task<Fulfillment> GetFulfillmentAsync(GetFulfillmentRequest request, CancellationToken cancellationToken)

Retrieves the fulfillment.

Parameters
Name Description
request GetFulfillmentRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
GetFulfillmentRequest request = new GetFulfillmentRequest
{
    FulfillmentName = FulfillmentName.FromProject("[PROJECT]"),
};
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(request);

GetFulfillmentAsync(string, CallSettings)

public virtual Task<Fulfillment> GetFulfillmentAsync(string name, CallSettings callSettings = null)

Retrieves the fulfillment.

Parameters
Name Description
name string

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/fulfillment";
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(name);

GetFulfillmentAsync(string, CancellationToken)

public virtual Task<Fulfillment> GetFulfillmentAsync(string name, CancellationToken cancellationToken)

Retrieves the fulfillment.

Parameters
Name Description
name string

Required. The name of the fulfillment. Format: projects/<Project ID>/agent/fulfillment.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/agent/fulfillment";
// Make the request
Fulfillment response = await fulfillmentsClient.GetFulfillmentAsync(name);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

UpdateFulfillment(Fulfillment, FieldMask, CallSettings)

public virtual Fulfillment UpdateFulfillment(Fulfillment fulfillment, FieldMask updateMask, CallSettings callSettings = null)

Updates the fulfillment.

Parameters
Name Description
fulfillment Fulfillment

Required. The fulfillment to update.

updateMask FieldMask

Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Fulfillment

The RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = FulfillmentsClient.Create();
// Initialize request argument(s)
Fulfillment fulfillment = new Fulfillment();
FieldMask updateMask = new FieldMask();
// Make the request
Fulfillment response = fulfillmentsClient.UpdateFulfillment(fulfillment, updateMask);

UpdateFulfillment(UpdateFulfillmentRequest, CallSettings)

public virtual Fulfillment UpdateFulfillment(UpdateFulfillmentRequest request, CallSettings callSettings = null)

Updates the fulfillment.

Parameters
Name Description
request UpdateFulfillmentRequest

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
Fulfillment

The RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = FulfillmentsClient.Create();
// Initialize request argument(s)
UpdateFulfillmentRequest request = new UpdateFulfillmentRequest
{
    Fulfillment = new Fulfillment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Fulfillment response = fulfillmentsClient.UpdateFulfillment(request);

UpdateFulfillmentAsync(Fulfillment, FieldMask, CallSettings)

public virtual Task<Fulfillment> UpdateFulfillmentAsync(Fulfillment fulfillment, FieldMask updateMask, CallSettings callSettings = null)

Updates the fulfillment.

Parameters
Name Description
fulfillment Fulfillment

Required. The fulfillment to update.

updateMask FieldMask

Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
Fulfillment fulfillment = new Fulfillment();
FieldMask updateMask = new FieldMask();
// Make the request
Fulfillment response = await fulfillmentsClient.UpdateFulfillmentAsync(fulfillment, updateMask);

UpdateFulfillmentAsync(Fulfillment, FieldMask, CancellationToken)

public virtual Task<Fulfillment> UpdateFulfillmentAsync(Fulfillment fulfillment, FieldMask updateMask, CancellationToken cancellationToken)

Updates the fulfillment.

Parameters
Name Description
fulfillment Fulfillment

Required. The fulfillment to update.

updateMask FieldMask

Required. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
Fulfillment fulfillment = new Fulfillment();
FieldMask updateMask = new FieldMask();
// Make the request
Fulfillment response = await fulfillmentsClient.UpdateFulfillmentAsync(fulfillment, updateMask);

UpdateFulfillmentAsync(UpdateFulfillmentRequest, CallSettings)

public virtual Task<Fulfillment> UpdateFulfillmentAsync(UpdateFulfillmentRequest request, CallSettings callSettings = null)

Updates the fulfillment.

Parameters
Name Description
request UpdateFulfillmentRequest

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
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
UpdateFulfillmentRequest request = new UpdateFulfillmentRequest
{
    Fulfillment = new Fulfillment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Fulfillment response = await fulfillmentsClient.UpdateFulfillmentAsync(request);

UpdateFulfillmentAsync(UpdateFulfillmentRequest, CancellationToken)

public virtual Task<Fulfillment> UpdateFulfillmentAsync(UpdateFulfillmentRequest request, CancellationToken cancellationToken)

Updates the fulfillment.

Parameters
Name Description
request UpdateFulfillmentRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskFulfillment

A Task containing the RPC response.

Example
// Create client
FulfillmentsClient fulfillmentsClient = await FulfillmentsClient.CreateAsync();
// Initialize request argument(s)
UpdateFulfillmentRequest request = new UpdateFulfillmentRequest
{
    Fulfillment = new Fulfillment(),
    UpdateMask = new FieldMask(),
};
// Make the request
Fulfillment response = await fulfillmentsClient.UpdateFulfillmentAsync(request);