1 // Copyright 2019 Google LLC
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // https://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 // Note: this file is purely for documentation. Any contents are not expected
16 // to be loaded as the JS file.
19 * Represents a context.
21 * @property {string} name
22 * Required. The unique identifier of the context. Format:
23 * `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`,
24 * or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
25 * ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is
26 * always converted to lowercase. If `Environment ID` is not specified, we
27 * assume default 'draft' environment. If `User ID` is not specified, we
28 * assume default '-' user.
30 * @property {number} lifespanCount
31 * Optional. The number of conversational query requests after which the
32 * context expires. If set to `0` (the default) the context expires
33 * immediately. Contexts expire automatically after 10 minutes even if there
34 * are no matching queries.
36 * @property {Object} parameters
37 * Optional. The collection of parameters associated with this context.
38 * Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
41 * This object should have the same structure as [Struct]{@link google.protobuf.Struct}
44 * @memberof google.cloud.dialogflow.v2beta1
45 * @see [google.cloud.dialogflow.v2beta1.Context definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
48 // This is for documentation. Actual contents will be loaded by gRPC.
52 * The request message for
53 * Contexts.ListContexts.
55 * @property {string} parent
56 * Required. The session to list all contexts from.
57 * Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
58 * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
59 * ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
60 * default 'draft' environment. If `User ID` is not specified, we assume
63 * @property {number} pageSize
64 * Optional. The maximum number of items to return in a single page. By
65 * default 100 and at most 1000.
67 * @property {string} pageToken
68 * Optional. The next_page_token value returned from a previous list request.
70 * @typedef ListContextsRequest
71 * @memberof google.cloud.dialogflow.v2beta1
72 * @see [google.cloud.dialogflow.v2beta1.ListContextsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
74 const ListContextsRequest = {
75 // This is for documentation. Actual contents will be loaded by gRPC.
79 * The response message for
80 * Contexts.ListContexts.
82 * @property {Object[]} contexts
83 * The list of contexts. There will be a maximum number of items
84 * returned based on the page_size field in the request.
86 * This object should have the same structure as [Context]{@link google.cloud.dialogflow.v2beta1.Context}
88 * @property {string} nextPageToken
89 * Token to retrieve the next page of results, or empty if there are no
90 * more results in the list.
92 * @typedef ListContextsResponse
93 * @memberof google.cloud.dialogflow.v2beta1
94 * @see [google.cloud.dialogflow.v2beta1.ListContextsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
96 const ListContextsResponse = {
97 // This is for documentation. Actual contents will be loaded by gRPC.
101 * The request message for
102 * Contexts.GetContext.
104 * @property {string} name
105 * Required. The name of the context. Format:
106 * `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
107 * or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
108 * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
109 * not specified, we assume default 'draft' environment. If `User ID` is not
110 * specified, we assume default '-' user.
112 * @typedef GetContextRequest
113 * @memberof google.cloud.dialogflow.v2beta1
114 * @see [google.cloud.dialogflow.v2beta1.GetContextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
116 const GetContextRequest = {
117 // This is for documentation. Actual contents will be loaded by gRPC.
121 * The request message for
122 * Contexts.CreateContext.
124 * @property {string} parent
125 * Required. The session to create a context for.
126 * Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
127 * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
128 * ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
129 * default 'draft' environment. If `User ID` is not specified, we assume
132 * @property {Object} context
133 * Required. The context to create.
135 * This object should have the same structure as [Context]{@link google.cloud.dialogflow.v2beta1.Context}
137 * @typedef CreateContextRequest
138 * @memberof google.cloud.dialogflow.v2beta1
139 * @see [google.cloud.dialogflow.v2beta1.CreateContextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
141 const CreateContextRequest = {
142 // This is for documentation. Actual contents will be loaded by gRPC.
146 * The request message for
147 * Contexts.UpdateContext.
149 * @property {Object} context
150 * Required. The context to update.
152 * This object should have the same structure as [Context]{@link google.cloud.dialogflow.v2beta1.Context}
154 * @property {Object} updateMask
155 * Optional. The mask to control which fields get updated.
157 * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
159 * @typedef UpdateContextRequest
160 * @memberof google.cloud.dialogflow.v2beta1
161 * @see [google.cloud.dialogflow.v2beta1.UpdateContextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
163 const UpdateContextRequest = {
164 // This is for documentation. Actual contents will be loaded by gRPC.
168 * The request message for
169 * Contexts.DeleteContext.
171 * @property {string} name
172 * Required. The name of the context to delete. Format:
173 * `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
174 * or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
175 * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
176 * not specified, we assume default 'draft' environment. If `User ID` is not
177 * specified, we assume default '-' user.
179 * @typedef DeleteContextRequest
180 * @memberof google.cloud.dialogflow.v2beta1
181 * @see [google.cloud.dialogflow.v2beta1.DeleteContextRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
183 const DeleteContextRequest = {
184 // This is for documentation. Actual contents will be loaded by gRPC.
188 * The request message for
189 * Contexts.DeleteAllContexts.
191 * @property {string} parent
192 * Required. The name of the session to delete all contexts from. Format:
193 * `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
194 * ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
195 * ID>`. If `Environment ID` is not specified we assume default 'draft'
196 * environment. If `User ID` is not specified, we assume default '-' user.
198 * @typedef DeleteAllContextsRequest
199 * @memberof google.cloud.dialogflow.v2beta1
200 * @see [google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/dialogflow/v2beta1/context.proto}
202 const DeleteAllContextsRequest = {
203 // This is for documentation. Actual contents will be loaded by gRPC.