Class protos.google.cloud.dialogflow.v2.Sessions (4.4.0)

Represents a Sessions

Inheritance

$protobuf.rpc.Service > protos.google.cloud.dialogflow.v2.Sessions

Package

@google-cloud/dialogflow!

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new Sessions service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Sessions;

Creates new Sessions service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
Sessions

RPC service. Useful where requests and/or responses are streamed.

detectIntent(request, callback)

public detectIntent(request: google.cloud.dialogflow.v2.IDetectIntentRequest, callback: google.cloud.dialogflow.v2.Sessions.DetectIntentCallback): void;

Calls DetectIntent.

Parameters
NameDescription
request google.cloud.dialogflow.v2.IDetectIntentRequest

DetectIntentRequest message or plain object

callback google.cloud.dialogflow.v2.Sessions.DetectIntentCallback

Node-style callback called with the error, if any, and DetectIntentResponse

Returns
TypeDescription
void

detectIntent(request)

public detectIntent(request: google.cloud.dialogflow.v2.IDetectIntentRequest): Promise<google.cloud.dialogflow.v2.DetectIntentResponse>;

Calls DetectIntent.

Parameter
NameDescription
request google.cloud.dialogflow.v2.IDetectIntentRequest

DetectIntentRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.dialogflow.v2.DetectIntentResponse>

Promise

streamingDetectIntent(request, callback)

public streamingDetectIntent(request: google.cloud.dialogflow.v2.IStreamingDetectIntentRequest, callback: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntentCallback): void;

Calls StreamingDetectIntent.

Parameters
NameDescription
request IStreamingDetectIntentRequest

StreamingDetectIntentRequest message or plain object

callback google.cloud.dialogflow.v2.Sessions.StreamingDetectIntentCallback

Node-style callback called with the error, if any, and StreamingDetectIntentResponse

Returns
TypeDescription
void

streamingDetectIntent(request)

public streamingDetectIntent(request: google.cloud.dialogflow.v2.IStreamingDetectIntentRequest): Promise<google.cloud.dialogflow.v2.StreamingDetectIntentResponse>;

Calls StreamingDetectIntent.

Parameter
NameDescription
request IStreamingDetectIntentRequest

StreamingDetectIntentRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.dialogflow.v2.StreamingDetectIntentResponse>

Promise