Class Sessions.SessionsClient (1.2.0)

public class SessionsClient : ClientBase<Sessions.SessionsClient>

Client for Sessions

Inheritance

Object > ClientBase > ClientBase<Sessions.SessionsClient> > Sessions.SessionsClient

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Constructors

SessionsClient()

protected SessionsClient()

Protected parameterless constructor to allow creation of test doubles.

SessionsClient(CallInvoker)

public SessionsClient(CallInvoker callInvoker)

Creates a new client for Sessions that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

SessionsClient(ChannelBase)

public SessionsClient(ChannelBase channel)

Creates a new client for Sessions

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

SessionsClient(ClientBase.ClientBaseConfiguration)

protected SessionsClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

DetectIntent(DetectIntentRequest, CallOptions)

public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, CallOptions options)

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments.

Parameters
NameDescription
requestDetectIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
DetectIntentResponse

The response received from the server.

DetectIntent(DetectIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual DetectIntentResponse DetectIntent(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments.

Parameters
NameDescription
requestDetectIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
DetectIntentResponse

The response received from the server.

DetectIntentAsync(DetectIntentRequest, CallOptions)

public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, CallOptions options)

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments.

Parameters
NameDescription
requestDetectIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<DetectIntentResponse>

The call object.

DetectIntentAsync(DetectIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<DetectIntentResponse> DetectIntentAsync(DetectIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause session entity types to be updated, which in turn might affect results of future queries.

Note: Always use agent versions for production traffic. See Versions and environments.

Parameters
NameDescription
requestDetectIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<DetectIntentResponse>

The call object.

FulfillIntent(FulfillIntentRequest, CallOptions)

public virtual FulfillIntentResponse FulfillIntent(FulfillIntentRequest request, CallOptions options)

Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.

Parameters
NameDescription
requestFulfillIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
FulfillIntentResponse

The response received from the server.

FulfillIntent(FulfillIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual FulfillIntentResponse FulfillIntent(FulfillIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.

Parameters
NameDescription
requestFulfillIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
FulfillIntentResponse

The response received from the server.

FulfillIntentAsync(FulfillIntentRequest, CallOptions)

public virtual AsyncUnaryCall<FulfillIntentResponse> FulfillIntentAsync(FulfillIntentRequest request, CallOptions options)

Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.

Parameters
NameDescription
requestFulfillIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<FulfillIntentResponse>

The call object.

FulfillIntentAsync(FulfillIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<FulfillIntentResponse> FulfillIntentAsync(FulfillIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent]. Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.

Parameters
NameDescription
requestFulfillIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<FulfillIntentResponse>

The call object.

MatchIntent(MatchIntentRequest, CallOptions)

public virtual MatchIntentResponse MatchIntent(MatchIntentRequest request, CallOptions options)

Returns preliminary intent match results, doesn't change the session status.

Parameters
NameDescription
requestMatchIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
MatchIntentResponse

The response received from the server.

MatchIntent(MatchIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual MatchIntentResponse MatchIntent(MatchIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns preliminary intent match results, doesn't change the session status.

Parameters
NameDescription
requestMatchIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
MatchIntentResponse

The response received from the server.

MatchIntentAsync(MatchIntentRequest, CallOptions)

public virtual AsyncUnaryCall<MatchIntentResponse> MatchIntentAsync(MatchIntentRequest request, CallOptions options)

Returns preliminary intent match results, doesn't change the session status.

Parameters
NameDescription
requestMatchIntentRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<MatchIntentResponse>

The call object.

MatchIntentAsync(MatchIntentRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<MatchIntentResponse> MatchIntentAsync(MatchIntentRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns preliminary intent match results, doesn't change the session status.

Parameters
NameDescription
requestMatchIntentRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<MatchIntentResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override Sessions.SessionsClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
Sessions.SessionsClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Dialogflow.Cx.V3.Sessions.SessionsClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

StreamingDetectIntent(CallOptions)

public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(CallOptions options)

Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).

Note: Always use agent versions for production traffic. See Versions and environments.

Parameter
NameDescription
optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse>

The call object.

StreamingDetectIntent(Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse> StreamingDetectIntent(Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST).

Note: Always use agent versions for production traffic. See Versions and environments.

Parameters
NameDescription
headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncDuplexStreamingCall<StreamingDetectIntentRequest, StreamingDetectIntentResponse>

The call object.