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.
17 const gapicConfig = require('./session_entity_types_client_config.json');
18 const gax = require('google-gax');
19 const merge = require('lodash.merge');
20 const path = require('path');
22 const VERSION = require('../../package.json').version;
25 * Entities are extracted from user input and represent parameters that are
26 * meaningful to your application. For example, a date range, a proper name
27 * such as a geographic location or landmark, and so on. Entities represent
28 * actionable data for your application.
30 * Session entity types are referred to as **User** entity types and are
31 * entities that are built for an individual user such as
32 * favorites, preferences, playlists, and so on. You can redefine a session
33 * entity type at the session level.
35 * For more information about entity types, see the
36 * [Dialogflow documentation](https://dialogflow.com/docs/entities).
41 class SessionEntityTypesClient {
43 * Construct an instance of SessionEntityTypesClient.
45 * @param {object} [options] - The configuration object. See the subsequent
46 * parameters for more details.
47 * @param {object} [options.credentials] - Credentials object.
48 * @param {string} [options.credentials.client_email]
49 * @param {string} [options.credentials.private_key]
50 * @param {string} [options.email] - Account email address. Required when
51 * using a .pem or .p12 keyFilename.
52 * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
53 * .p12 key downloaded from the Google Developers Console. If you provide
54 * a path to a JSON file, the projectId option below is not necessary.
55 * NOTE: .pem and .p12 require you to specify options.email as well.
56 * @param {number} [options.port] - The port on which to connect to
58 * @param {string} [options.projectId] - The project ID from the Google
59 * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
60 * the environment variable GCLOUD_PROJECT for your project ID. If your
61 * app is running in an environment which supports
62 * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
63 * your project ID will be detected automatically.
64 * @param {function} [options.promise] - Custom promise module to use instead
66 * @param {string} [options.servicePath] - The domain name of the
70 this._descriptors = {};
72 // Ensure that options include the service address and port.
76 port: this.constructor.port,
77 servicePath: this.constructor.servicePath,
82 // Create a `gaxGrpc` object, with any grpc-specific options
83 // sent to the client.
84 opts.scopes = this.constructor.scopes;
85 const gaxGrpc = new gax.GrpcClient(opts);
87 // Save the auth object to the client, for use by other methods.
88 this.auth = gaxGrpc.auth;
90 // Determine the client header string.
91 const clientHeader = [
92 `gl-node/${process.version}`,
93 `grpc/${gaxGrpc.grpcVersion}`,
97 if (opts.libName && opts.libVersion) {
98 clientHeader.push(`${opts.libName}/${opts.libVersion}`);
101 // Load the applicable protos.
102 const protos = merge(
105 path.join(__dirname, '..', '..', 'protos'),
106 'google/cloud/dialogflow/v2beta1/session_entity_type.proto'
110 // This API contains "path templates"; forward-slash-separated
111 // identifiers to uniquely identify resources within the API.
112 // Create useful helper objects for these.
113 this._pathTemplates = {
114 sessionPathTemplate: new gax.PathTemplate(
115 'projects/{project}/agent/sessions/{session}'
117 environmentSessionPathTemplate: new gax.PathTemplate(
118 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}'
120 sessionEntityTypePathTemplate: new gax.PathTemplate(
121 'projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}'
123 environmentSessionEntityTypePathTemplate: new gax.PathTemplate(
124 'projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}'
128 // Some of the methods on this service return "paged" results,
129 // (e.g. 50 results at a time, with tokens to get subsequent
130 // pages). Denote the keys used for pagination and results.
131 this._descriptors.page = {
132 listSessionEntityTypes: new gax.PageDescriptor(
139 // Put together the default options sent with requests.
140 const defaults = gaxGrpc.constructSettings(
141 'google.cloud.dialogflow.v2beta1.SessionEntityTypes',
144 {'x-goog-api-client': clientHeader.join(' ')}
147 // Set up a dictionary of "inner API calls"; the core implementation
148 // of calling the API is handled in `google-gax`, with this code
149 // merely providing the destination and request information.
150 this._innerApiCalls = {};
152 // Put together the "service stub" for
153 // google.cloud.dialogflow.v2beta1.SessionEntityTypes.
154 const sessionEntityTypesStub = gaxGrpc.createStub(
155 protos.google.cloud.dialogflow.v2beta1.SessionEntityTypes,
159 // Iterate over each of the methods that the service provides
160 // and create an API call method for each.
161 const sessionEntityTypesStubMethods = [
162 'listSessionEntityTypes',
163 'getSessionEntityType',
164 'createSessionEntityType',
165 'updateSessionEntityType',
166 'deleteSessionEntityType',
168 for (const methodName of sessionEntityTypesStubMethods) {
169 this._innerApiCalls[methodName] = gax.createApiCall(
170 sessionEntityTypesStub.then(
173 const args = Array.prototype.slice.call(arguments, 0);
174 return stub[methodName].apply(stub, args);
181 defaults[methodName],
182 this._descriptors.page[methodName]
188 * The DNS address for this API service.
190 static get servicePath() {
191 return 'dialogflow.googleapis.com';
195 * The port for this API service.
202 * The scopes needed to make gRPC calls for every method defined
205 static get scopes() {
206 return ['https://www.googleapis.com/auth/cloud-platform'];
210 * Return the project ID used by this class.
211 * @param {function(Error, string)} callback - the callback to
212 * be called with the current project Id.
214 getProjectId(callback) {
215 return this.auth.getProjectId(callback);
218 // -------------------
219 // -- Service calls --
220 // -------------------
223 * Returns the list of all session entity types in the specified session.
225 * @param {Object} request
226 * The request object that will be sent.
227 * @param {string} request.parent
228 * Required. The session to list all session entity types from.
229 * Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
230 * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
231 * sessions/<Session ID>`.
232 * If `Environment ID` is not specified, we assume default 'draft'
233 * environment. If `User ID` is not specified, we assume default '-' user.
234 * @param {number} [request.pageSize]
235 * The maximum number of resources contained in the underlying API
236 * response. If page streaming is performed per-resource, this
237 * parameter does not affect the return value. If page streaming is
238 * performed per-page, this determines the maximum number of
239 * resources in a page.
240 * @param {Object} [options]
241 * Optional parameters. You can override the default settings for this call, e.g, timeout,
242 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
243 * @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
244 * The function which will be called with the result of the API call.
246 * The second parameter to the callback is Array of [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
248 * When autoPaginate: false is specified through options, it contains the result
249 * in a single response. If the response indicates the next page exists, the third
250 * parameter is set to be used for the next request object. The fourth parameter keeps
251 * the raw response object of an object representing [ListSessionEntityTypesResponse]{@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse}.
252 * @returns {Promise} - The promise which resolves to an array.
253 * The first element of the array is Array of [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
255 * When autoPaginate: false is specified through options, the array has three elements.
256 * The first element is Array of [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType} in a single response.
257 * The second element is the next request object if the response
258 * indicates the next page exists, or null. The third element is
259 * an object representing [ListSessionEntityTypesResponse]{@link google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse}.
261 * The promise has a method named "cancel" which cancels the ongoing API call.
265 * const dialogflow = require('dialogflow');
267 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
268 * // optional auth parameters.
271 * // Iterate over all elements.
272 * const formattedParent = client.sessionPath('[PROJECT]', '[SESSION]');
274 * client.listSessionEntityTypes({parent: formattedParent})
275 * .then(responses => {
276 * const resources = responses[0];
277 * for (const resource of resources) {
278 * // doThingsWith(resource)
282 * console.error(err);
285 * // Or obtain the paged response.
286 * const formattedParent = client.sessionPath('[PROJECT]', '[SESSION]');
289 * const options = {autoPaginate: false};
290 * const callback = responses => {
291 * // The actual resources in a response.
292 * const resources = responses[0];
293 * // The next request if the response shows that there are more responses.
294 * const nextRequest = responses[1];
295 * // The actual response object, if necessary.
296 * // const rawResponse = responses[2];
297 * for (const resource of resources) {
298 * // doThingsWith(resource);
301 * // Fetch the next page.
302 * return client.listSessionEntityTypes(nextRequest, options).then(callback);
305 * client.listSessionEntityTypes({parent: formattedParent}, options)
308 * console.error(err);
311 listSessionEntityTypes(request, options, callback) {
312 if (options instanceof Function && callback === undefined) {
316 options = options || {};
318 return this._innerApiCalls.listSessionEntityTypes(
326 * Equivalent to {@link listSessionEntityTypes}, but returns a NodeJS Stream object.
328 * This fetches the paged responses for {@link listSessionEntityTypes} continuously
329 * and invokes the callback registered for 'data' event for each element in the
332 * The returned object has 'end' method when no more elements are required.
334 * autoPaginate option will be ignored.
336 * @see {@link https://nodejs.org/api/stream.html}
338 * @param {Object} request
339 * The request object that will be sent.
340 * @param {string} request.parent
341 * Required. The session to list all session entity types from.
342 * Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
343 * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
344 * sessions/<Session ID>`.
345 * If `Environment ID` is not specified, we assume default 'draft'
346 * environment. If `User ID` is not specified, we assume default '-' user.
347 * @param {number} [request.pageSize]
348 * The maximum number of resources contained in the underlying API
349 * response. If page streaming is performed per-resource, this
350 * parameter does not affect the return value. If page streaming is
351 * performed per-page, this determines the maximum number of
352 * resources in a page.
353 * @param {Object} [options]
354 * Optional parameters. You can override the default settings for this call, e.g, timeout,
355 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
357 * An object stream which emits an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType} on 'data' event.
361 * const dialogflow = require('dialogflow');
363 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
364 * // optional auth parameters.
367 * const formattedParent = client.sessionPath('[PROJECT]', '[SESSION]');
368 * client.listSessionEntityTypesStream({parent: formattedParent})
369 * .on('data', element => {
370 * // doThingsWith(element)
371 * }).on('error', err => {
375 listSessionEntityTypesStream(request, options) {
376 options = options || {};
378 return this._descriptors.page.listSessionEntityTypes.createStream(
379 this._innerApiCalls.listSessionEntityTypes,
386 * Retrieves the specified session entity type.
388 * @param {Object} request
389 * The request object that will be sent.
390 * @param {string} request.name
391 * Required. The name of the session entity type. Format:
392 * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
393 * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
394 * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
395 * Name>`. If `Environment ID` is not specified, we assume default 'draft'
396 * environment. If `User ID` is not specified, we assume default '-' user.
397 * @param {Object} [options]
398 * Optional parameters. You can override the default settings for this call, e.g, timeout,
399 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
400 * @param {function(?Error, ?Object)} [callback]
401 * The function which will be called with the result of the API call.
403 * The second parameter to the callback is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
404 * @returns {Promise} - The promise which resolves to an array.
405 * The first element of the array is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
406 * The promise has a method named "cancel" which cancels the ongoing API call.
410 * const dialogflow = require('dialogflow');
412 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
413 * // optional auth parameters.
416 * const formattedName = client.sessionEntityTypePath('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]');
417 * client.getSessionEntityType({name: formattedName})
418 * .then(responses => {
419 * const response = responses[0];
420 * // doThingsWith(response)
423 * console.error(err);
426 getSessionEntityType(request, options, callback) {
427 if (options instanceof Function && callback === undefined) {
431 options = options || {};
433 return this._innerApiCalls.getSessionEntityType(request, options, callback);
437 * Creates a session entity type.
439 * @param {Object} request
440 * The request object that will be sent.
441 * @param {string} request.parent
442 * Required. The session to create a session entity type for.
443 * Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
444 * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
445 * sessions/<Session ID>`. If `Environment ID` is not specified, we assume
446 * default 'draft' environment. If `User ID` is not specified, we assume
448 * @param {Object} request.sessionEntityType
449 * Required. The session entity type to create.
451 * This object should have the same structure as [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}
452 * @param {Object} [options]
453 * Optional parameters. You can override the default settings for this call, e.g, timeout,
454 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
455 * @param {function(?Error, ?Object)} [callback]
456 * The function which will be called with the result of the API call.
458 * The second parameter to the callback is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
459 * @returns {Promise} - The promise which resolves to an array.
460 * The first element of the array is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
461 * The promise has a method named "cancel" which cancels the ongoing API call.
465 * const dialogflow = require('dialogflow');
467 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
468 * // optional auth parameters.
471 * const formattedParent = client.sessionPath('[PROJECT]', '[SESSION]');
472 * const sessionEntityType = {};
474 * parent: formattedParent,
475 * sessionEntityType: sessionEntityType,
477 * client.createSessionEntityType(request)
478 * .then(responses => {
479 * const response = responses[0];
480 * // doThingsWith(response)
483 * console.error(err);
486 createSessionEntityType(request, options, callback) {
487 if (options instanceof Function && callback === undefined) {
491 options = options || {};
493 return this._innerApiCalls.createSessionEntityType(
501 * Updates the specified session entity type.
503 * @param {Object} request
504 * The request object that will be sent.
505 * @param {Object} request.sessionEntityType
506 * Required. The entity type to update. Format:
507 * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
508 * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
509 * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
510 * Name>`. If `Environment ID` is not specified, we assume default 'draft'
511 * environment. If `User ID` is not specified, we assume default '-' user.
513 * This object should have the same structure as [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}
514 * @param {Object} [request.updateMask]
515 * Optional. The mask to control which fields get updated.
517 * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
518 * @param {Object} [options]
519 * Optional parameters. You can override the default settings for this call, e.g, timeout,
520 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
521 * @param {function(?Error, ?Object)} [callback]
522 * The function which will be called with the result of the API call.
524 * The second parameter to the callback is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
525 * @returns {Promise} - The promise which resolves to an array.
526 * The first element of the array is an object representing [SessionEntityType]{@link google.cloud.dialogflow.v2beta1.SessionEntityType}.
527 * The promise has a method named "cancel" which cancels the ongoing API call.
531 * const dialogflow = require('dialogflow');
533 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
534 * // optional auth parameters.
537 * const sessionEntityType = {};
538 * client.updateSessionEntityType({sessionEntityType: sessionEntityType})
539 * .then(responses => {
540 * const response = responses[0];
541 * // doThingsWith(response)
544 * console.error(err);
547 updateSessionEntityType(request, options, callback) {
548 if (options instanceof Function && callback === undefined) {
552 options = options || {};
554 return this._innerApiCalls.updateSessionEntityType(
562 * Deletes the specified session entity type.
564 * @param {Object} request
565 * The request object that will be sent.
566 * @param {string} request.name
567 * Required. The name of the entity type to delete. Format:
568 * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
569 * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
570 * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
571 * Name>`. If `Environment ID` is not specified, we assume default 'draft'
572 * environment. If `User ID` is not specified, we assume default '-' user.
573 * @param {Object} [options]
574 * Optional parameters. You can override the default settings for this call, e.g, timeout,
575 * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
576 * @param {function(?Error)} [callback]
577 * The function which will be called with the result of the API call.
578 * @returns {Promise} - The promise which resolves when API call finishes.
579 * The promise has a method named "cancel" which cancels the ongoing API call.
583 * const dialogflow = require('dialogflow');
585 * const client = new dialogflow.v2beta1.SessionEntityTypesClient({
586 * // optional auth parameters.
589 * const formattedName = client.sessionEntityTypePath('[PROJECT]', '[SESSION]', '[ENTITY_TYPE]');
590 * client.deleteSessionEntityType({name: formattedName}).catch(err => {
591 * console.error(err);
594 deleteSessionEntityType(request, options, callback) {
595 if (options instanceof Function && callback === undefined) {
599 options = options || {};
601 return this._innerApiCalls.deleteSessionEntityType(
608 // --------------------
609 // -- Path templates --
610 // --------------------
613 * Return a fully-qualified session resource name string.
615 * @param {String} project
616 * @param {String} session
619 sessionPath(project, session) {
620 return this._pathTemplates.sessionPathTemplate.render({
627 * Return a fully-qualified environment_session resource name string.
629 * @param {String} project
630 * @param {String} environment
631 * @param {String} user
632 * @param {String} session
635 environmentSessionPath(project, environment, user, session) {
636 return this._pathTemplates.environmentSessionPathTemplate.render({
638 environment: environment,
645 * Return a fully-qualified session_entity_type resource name string.
647 * @param {String} project
648 * @param {String} session
649 * @param {String} entityType
652 sessionEntityTypePath(project, session, entityType) {
653 return this._pathTemplates.sessionEntityTypePathTemplate.render({
656 entity_type: entityType,
661 * Return a fully-qualified environment_session_entity_type resource name string.
663 * @param {String} project
664 * @param {String} environment
665 * @param {String} user
666 * @param {String} session
667 * @param {String} entityType
670 environmentSessionEntityTypePath(
677 return this._pathTemplates.environmentSessionEntityTypePathTemplate.render({
679 environment: environment,
682 entity_type: entityType,
687 * Parse the sessionName from a session resource.
689 * @param {String} sessionName
690 * A fully-qualified path representing a session resources.
691 * @returns {String} - A string representing the project.
693 matchProjectFromSessionName(sessionName) {
694 return this._pathTemplates.sessionPathTemplate.match(sessionName).project;
698 * Parse the sessionName from a session resource.
700 * @param {String} sessionName
701 * A fully-qualified path representing a session resources.
702 * @returns {String} - A string representing the session.
704 matchSessionFromSessionName(sessionName) {
705 return this._pathTemplates.sessionPathTemplate.match(sessionName).session;
709 * Parse the environmentSessionName from a environment_session resource.
711 * @param {String} environmentSessionName
712 * A fully-qualified path representing a environment_session resources.
713 * @returns {String} - A string representing the project.
715 matchProjectFromEnvironmentSessionName(environmentSessionName) {
716 return this._pathTemplates.environmentSessionPathTemplate.match(
717 environmentSessionName
722 * Parse the environmentSessionName from a environment_session resource.
724 * @param {String} environmentSessionName
725 * A fully-qualified path representing a environment_session resources.
726 * @returns {String} - A string representing the environment.
728 matchEnvironmentFromEnvironmentSessionName(environmentSessionName) {
729 return this._pathTemplates.environmentSessionPathTemplate.match(
730 environmentSessionName
735 * Parse the environmentSessionName from a environment_session resource.
737 * @param {String} environmentSessionName
738 * A fully-qualified path representing a environment_session resources.
739 * @returns {String} - A string representing the user.
741 matchUserFromEnvironmentSessionName(environmentSessionName) {
742 return this._pathTemplates.environmentSessionPathTemplate.match(
743 environmentSessionName
748 * Parse the environmentSessionName from a environment_session resource.
750 * @param {String} environmentSessionName
751 * A fully-qualified path representing a environment_session resources.
752 * @returns {String} - A string representing the session.
754 matchSessionFromEnvironmentSessionName(environmentSessionName) {
755 return this._pathTemplates.environmentSessionPathTemplate.match(
756 environmentSessionName
761 * Parse the sessionEntityTypeName from a session_entity_type resource.
763 * @param {String} sessionEntityTypeName
764 * A fully-qualified path representing a session_entity_type resources.
765 * @returns {String} - A string representing the project.
767 matchProjectFromSessionEntityTypeName(sessionEntityTypeName) {
768 return this._pathTemplates.sessionEntityTypePathTemplate.match(
769 sessionEntityTypeName
774 * Parse the sessionEntityTypeName from a session_entity_type resource.
776 * @param {String} sessionEntityTypeName
777 * A fully-qualified path representing a session_entity_type resources.
778 * @returns {String} - A string representing the session.
780 matchSessionFromSessionEntityTypeName(sessionEntityTypeName) {
781 return this._pathTemplates.sessionEntityTypePathTemplate.match(
782 sessionEntityTypeName
787 * Parse the sessionEntityTypeName from a session_entity_type resource.
789 * @param {String} sessionEntityTypeName
790 * A fully-qualified path representing a session_entity_type resources.
791 * @returns {String} - A string representing the entity_type.
793 matchEntityTypeFromSessionEntityTypeName(sessionEntityTypeName) {
794 return this._pathTemplates.sessionEntityTypePathTemplate.match(
795 sessionEntityTypeName
800 * Parse the environmentSessionEntityTypeName from a environment_session_entity_type resource.
802 * @param {String} environmentSessionEntityTypeName
803 * A fully-qualified path representing a environment_session_entity_type resources.
804 * @returns {String} - A string representing the project.
806 matchProjectFromEnvironmentSessionEntityTypeName(
807 environmentSessionEntityTypeName
809 return this._pathTemplates.environmentSessionEntityTypePathTemplate.match(
810 environmentSessionEntityTypeName
815 * Parse the environmentSessionEntityTypeName from a environment_session_entity_type resource.
817 * @param {String} environmentSessionEntityTypeName
818 * A fully-qualified path representing a environment_session_entity_type resources.
819 * @returns {String} - A string representing the environment.
821 matchEnvironmentFromEnvironmentSessionEntityTypeName(
822 environmentSessionEntityTypeName
824 return this._pathTemplates.environmentSessionEntityTypePathTemplate.match(
825 environmentSessionEntityTypeName
830 * Parse the environmentSessionEntityTypeName from a environment_session_entity_type resource.
832 * @param {String} environmentSessionEntityTypeName
833 * A fully-qualified path representing a environment_session_entity_type resources.
834 * @returns {String} - A string representing the user.
836 matchUserFromEnvironmentSessionEntityTypeName(
837 environmentSessionEntityTypeName
839 return this._pathTemplates.environmentSessionEntityTypePathTemplate.match(
840 environmentSessionEntityTypeName
845 * Parse the environmentSessionEntityTypeName from a environment_session_entity_type resource.
847 * @param {String} environmentSessionEntityTypeName
848 * A fully-qualified path representing a environment_session_entity_type resources.
849 * @returns {String} - A string representing the session.
851 matchSessionFromEnvironmentSessionEntityTypeName(
852 environmentSessionEntityTypeName
854 return this._pathTemplates.environmentSessionEntityTypePathTemplate.match(
855 environmentSessionEntityTypeName
860 * Parse the environmentSessionEntityTypeName from a environment_session_entity_type resource.
862 * @param {String} environmentSessionEntityTypeName
863 * A fully-qualified path representing a environment_session_entity_type resources.
864 * @returns {String} - A string representing the entity_type.
866 matchEntityTypeFromEnvironmentSessionEntityTypeName(
867 environmentSessionEntityTypeName
869 return this._pathTemplates.environmentSessionEntityTypePathTemplate.match(
870 environmentSessionEntityTypeName
875 module.exports = SessionEntityTypesClient;