Class protos.google.cloud.dialogflow.v2.Contexts (6.6.0)

Represents a Contexts

Inheritance

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

Package

@google-cloud/dialogflow

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

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

Constructs a new Contexts service.

Parameters
Name Description
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): Contexts;

Creates new Contexts service using the specified rpc implementation.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
Type Description
Contexts

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

createContext(request, callback)

public createContext(request: google.cloud.dialogflow.v2.ICreateContextRequest, callback: google.cloud.dialogflow.v2.Contexts.CreateContextCallback): void;

Calls CreateContext.

Parameters
Name Description
request ICreateContextRequest

CreateContextRequest message or plain object

callback CreateContextCallback

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

Returns
Type Description
void

createContext(request)

public createContext(request: google.cloud.dialogflow.v2.ICreateContextRequest): Promise<google.cloud.dialogflow.v2.Context>;

Calls CreateContext.

Parameter
Name Description
request ICreateContextRequest

CreateContextRequest message or plain object

Returns
Type Description
Promise<google.cloud.dialogflow.v2.Context>

Promise

deleteAllContexts(request, callback)

public deleteAllContexts(request: google.cloud.dialogflow.v2.IDeleteAllContextsRequest, callback: google.cloud.dialogflow.v2.Contexts.DeleteAllContextsCallback): void;

Calls DeleteAllContexts.

Parameters
Name Description
request IDeleteAllContextsRequest

DeleteAllContextsRequest message or plain object

callback DeleteAllContextsCallback

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

Returns
Type Description
void

deleteAllContexts(request)

public deleteAllContexts(request: google.cloud.dialogflow.v2.IDeleteAllContextsRequest): Promise<google.protobuf.Empty>;

Calls DeleteAllContexts.

Parameter
Name Description
request IDeleteAllContextsRequest

DeleteAllContextsRequest message or plain object

Returns
Type Description
Promise<google.protobuf.Empty>

Promise

deleteContext(request, callback)

public deleteContext(request: google.cloud.dialogflow.v2.IDeleteContextRequest, callback: google.cloud.dialogflow.v2.Contexts.DeleteContextCallback): void;

Calls DeleteContext.

Parameters
Name Description
request IDeleteContextRequest

DeleteContextRequest message or plain object

callback DeleteContextCallback

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

Returns
Type Description
void

deleteContext(request)

public deleteContext(request: google.cloud.dialogflow.v2.IDeleteContextRequest): Promise<google.protobuf.Empty>;

Calls DeleteContext.

Parameter
Name Description
request IDeleteContextRequest

DeleteContextRequest message or plain object

Returns
Type Description
Promise<google.protobuf.Empty>

Promise

getContext(request, callback)

public getContext(request: google.cloud.dialogflow.v2.IGetContextRequest, callback: google.cloud.dialogflow.v2.Contexts.GetContextCallback): void;

Calls GetContext.

Parameters
Name Description
request IGetContextRequest

GetContextRequest message or plain object

callback GetContextCallback

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

Returns
Type Description
void

getContext(request)

public getContext(request: google.cloud.dialogflow.v2.IGetContextRequest): Promise<google.cloud.dialogflow.v2.Context>;

Calls GetContext.

Parameter
Name Description
request IGetContextRequest

GetContextRequest message or plain object

Returns
Type Description
Promise<google.cloud.dialogflow.v2.Context>

Promise

listContexts(request, callback)

public listContexts(request: google.cloud.dialogflow.v2.IListContextsRequest, callback: google.cloud.dialogflow.v2.Contexts.ListContextsCallback): void;

Calls ListContexts.

Parameters
Name Description
request IListContextsRequest

ListContextsRequest message or plain object

callback ListContextsCallback

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

Returns
Type Description
void

listContexts(request)

public listContexts(request: google.cloud.dialogflow.v2.IListContextsRequest): Promise<google.cloud.dialogflow.v2.ListContextsResponse>;

Calls ListContexts.

Parameter
Name Description
request IListContextsRequest

ListContextsRequest message or plain object

Returns
Type Description
Promise<google.cloud.dialogflow.v2.ListContextsResponse>

Promise

updateContext(request, callback)

public updateContext(request: google.cloud.dialogflow.v2.IUpdateContextRequest, callback: google.cloud.dialogflow.v2.Contexts.UpdateContextCallback): void;

Calls UpdateContext.

Parameters
Name Description
request IUpdateContextRequest

UpdateContextRequest message or plain object

callback UpdateContextCallback

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

Returns
Type Description
void

updateContext(request)

public updateContext(request: google.cloud.dialogflow.v2.IUpdateContextRequest): Promise<google.cloud.dialogflow.v2.Context>;

Calls UpdateContext.

Parameter
Name Description
request IUpdateContextRequest

UpdateContextRequest message or plain object

Returns
Type Description
Promise<google.cloud.dialogflow.v2.Context>

Promise