@google-ads/admanager 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +202 -0
  3. package/README.md +236 -0
  4. package/build/protos/google/ads/admanager/v1/ad_unit_enums.proto +81 -0
  5. package/build/protos/google/ads/admanager/v1/ad_unit_messages.proto +230 -0
  6. package/build/protos/google/ads/admanager/v1/ad_unit_service.proto +195 -0
  7. package/build/protos/google/ads/admanager/v1/admanager_error.proto +52 -0
  8. package/build/protos/google/ads/admanager/v1/applied_label.proto +41 -0
  9. package/build/protos/google/ads/admanager/v1/company_credit_status_enum.proto +97 -0
  10. package/build/protos/google/ads/admanager/v1/company_messages.proto +122 -0
  11. package/build/protos/google/ads/admanager/v1/company_service.proto +126 -0
  12. package/build/protos/google/ads/admanager/v1/company_type_enum.proto +51 -0
  13. package/build/protos/google/ads/admanager/v1/contact_messages.proto +49 -0
  14. package/build/protos/google/ads/admanager/v1/custom_field_enums.proto +110 -0
  15. package/build/protos/google/ads/admanager/v1/custom_field_messages.proto +87 -0
  16. package/build/protos/google/ads/admanager/v1/custom_field_service.proto +127 -0
  17. package/build/protos/google/ads/admanager/v1/custom_field_value.proto +62 -0
  18. package/build/protos/google/ads/admanager/v1/custom_targeting_key_enums.proto +76 -0
  19. package/build/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto +69 -0
  20. package/build/protos/google/ads/admanager/v1/custom_targeting_key_service.proto +129 -0
  21. package/build/protos/google/ads/admanager/v1/custom_targeting_value_enums.proto +90 -0
  22. package/build/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto +66 -0
  23. package/build/protos/google/ads/admanager/v1/custom_targeting_value_service.proto +132 -0
  24. package/build/protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto +64 -0
  25. package/build/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto +252 -0
  26. package/build/protos/google/ads/admanager/v1/environment_type_enum.proto +41 -0
  27. package/build/protos/google/ads/admanager/v1/frequency_cap.proto +39 -0
  28. package/build/protos/google/ads/admanager/v1/label_messages.proto +42 -0
  29. package/build/protos/google/ads/admanager/v1/network_messages.proto +79 -0
  30. package/build/protos/google/ads/admanager/v1/network_service.proto +72 -0
  31. package/build/protos/google/ads/admanager/v1/order_enums.proto +59 -0
  32. package/build/protos/google/ads/admanager/v1/order_messages.proto +209 -0
  33. package/build/protos/google/ads/admanager/v1/order_service.proto +129 -0
  34. package/build/protos/google/ads/admanager/v1/placement_enums.proto +44 -0
  35. package/build/protos/google/ads/admanager/v1/placement_messages.proto +77 -0
  36. package/build/protos/google/ads/admanager/v1/placement_service.proto +126 -0
  37. package/build/protos/google/ads/admanager/v1/report_service.proto +3526 -0
  38. package/build/protos/google/ads/admanager/v1/role_enums.proto +41 -0
  39. package/build/protos/google/ads/admanager/v1/role_messages.proto +59 -0
  40. package/build/protos/google/ads/admanager/v1/role_service.proto +122 -0
  41. package/build/protos/google/ads/admanager/v1/size.proto +47 -0
  42. package/build/protos/google/ads/admanager/v1/size_type_enum.proto +62 -0
  43. package/build/protos/google/ads/admanager/v1/taxonomy_category_messages.proto +70 -0
  44. package/build/protos/google/ads/admanager/v1/taxonomy_category_service.proto +128 -0
  45. package/build/protos/google/ads/admanager/v1/taxonomy_type_enum.proto +51 -0
  46. package/build/protos/google/ads/admanager/v1/team_messages.proto +46 -0
  47. package/build/protos/google/ads/admanager/v1/time_unit_enum.proto +59 -0
  48. package/build/protos/google/ads/admanager/v1/user_messages.proto +78 -0
  49. package/build/protos/google/ads/admanager/v1/user_service.proto +57 -0
  50. package/build/protos/protos.d.ts +23491 -0
  51. package/build/protos/protos.js +69798 -0
  52. package/build/protos/protos.json +7273 -0
  53. package/build/src/index.d.ts +47 -0
  54. package/build/src/index.js +67 -0
  55. package/build/src/index.js.map +1 -0
  56. package/build/src/v1/ad_unit_service_client.d.ts +794 -0
  57. package/build/src/v1/ad_unit_service_client.js +1136 -0
  58. package/build/src/v1/ad_unit_service_client.js.map +1 -0
  59. package/build/src/v1/ad_unit_service_client_config.json +38 -0
  60. package/build/src/v1/company_service_client.d.ts +663 -0
  61. package/build/src/v1/company_service_client.js +999 -0
  62. package/build/src/v1/company_service_client.js.map +1 -0
  63. package/build/src/v1/company_service_client_config.json +34 -0
  64. package/build/src/v1/custom_field_service_client.d.ts +663 -0
  65. package/build/src/v1/custom_field_service_client.js +1002 -0
  66. package/build/src/v1/custom_field_service_client.js.map +1 -0
  67. package/build/src/v1/custom_field_service_client_config.json +34 -0
  68. package/build/src/v1/custom_targeting_key_service_client.d.ts +664 -0
  69. package/build/src/v1/custom_targeting_key_service_client.js +1004 -0
  70. package/build/src/v1/custom_targeting_key_service_client.js.map +1 -0
  71. package/build/src/v1/custom_targeting_key_service_client_config.json +34 -0
  72. package/build/src/v1/custom_targeting_value_service_client.d.ts +673 -0
  73. package/build/src/v1/custom_targeting_value_service_client.js +1010 -0
  74. package/build/src/v1/custom_targeting_value_service_client.js.map +1 -0
  75. package/build/src/v1/custom_targeting_value_service_client_config.json +34 -0
  76. package/build/src/v1/entity_signals_mapping_service_client.d.ts +782 -0
  77. package/build/src/v1/entity_signals_mapping_service_client.js +1096 -0
  78. package/build/src/v1/entity_signals_mapping_service_client.js.map +1 -0
  79. package/build/src/v1/entity_signals_mapping_service_client_config.json +50 -0
  80. package/build/src/v1/index.d.ts +13 -0
  81. package/build/src/v1/index.js +47 -0
  82. package/build/src/v1/index.js.map +1 -0
  83. package/build/src/v1/network_service_client.d.ts +552 -0
  84. package/build/src/v1/network_service_client.js +877 -0
  85. package/build/src/v1/network_service_client.js.map +1 -0
  86. package/build/src/v1/network_service_client_config.json +34 -0
  87. package/build/src/v1/order_service_client.d.ts +668 -0
  88. package/build/src/v1/order_service_client.js +999 -0
  89. package/build/src/v1/order_service_client.js.map +1 -0
  90. package/build/src/v1/order_service_client_config.json +48 -0
  91. package/build/src/v1/placement_service_client.d.ts +663 -0
  92. package/build/src/v1/placement_service_client.js +999 -0
  93. package/build/src/v1/placement_service_client.js.map +1 -0
  94. package/build/src/v1/placement_service_client_config.json +34 -0
  95. package/build/src/v1/report_service_client.d.ts +975 -0
  96. package/build/src/v1/report_service_client.js +1352 -0
  97. package/build/src/v1/report_service_client.js.map +1 -0
  98. package/build/src/v1/report_service_client_config.json +50 -0
  99. package/build/src/v1/role_service_client.d.ts +660 -0
  100. package/build/src/v1/role_service_client.js +997 -0
  101. package/build/src/v1/role_service_client.js.map +1 -0
  102. package/build/src/v1/role_service_client_config.json +34 -0
  103. package/build/src/v1/taxonomy_category_service_client.d.ts +663 -0
  104. package/build/src/v1/taxonomy_category_service_client.js +1003 -0
  105. package/build/src/v1/taxonomy_category_service_client.js.map +1 -0
  106. package/build/src/v1/taxonomy_category_service_client_config.json +34 -0
  107. package/build/src/v1/user_service_client.d.ts +534 -0
  108. package/build/src/v1/user_service_client.js +861 -0
  109. package/build/src/v1/user_service_client.js.map +1 -0
  110. package/build/src/v1/user_service_client_config.json +30 -0
  111. package/package.json +70 -0
@@ -0,0 +1,1096 @@
1
+ "use strict";
2
+ // Copyright 2024 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.EntitySignalsMappingServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1/entity_signals_mapping_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./entity_signals_mapping_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Provides methods for handling `EntitySignalsMapping` objects.
31
+ * @class
32
+ * @memberof v1
33
+ */
34
+ class EntitySignalsMappingServiceClient {
35
+ /**
36
+ * Construct an instance of EntitySignalsMappingServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
+ * For more information, please check the
65
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
67
+ * need to avoid loading the default gRPC version and want to use the fallback
68
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
69
+ * ```
70
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
+ * const client = new EntitySignalsMappingServiceClient({fallback: true}, gax);
72
+ * ```
73
+ */
74
+ constructor(opts, gaxInstance) {
75
+ var _a, _b, _c, _d, _e, _f;
76
+ this._terminated = false;
77
+ this.descriptors = {
78
+ page: {},
79
+ stream: {},
80
+ longrunning: {},
81
+ batching: {},
82
+ };
83
+ // Ensure that options include all the required fields.
84
+ const staticMembers = this
85
+ .constructor;
86
+ if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
87
+ (opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
88
+ (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
+ }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
94
+ this._universeDomain =
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
96
+ this._servicePath = 'admanager.' + this._universeDomain;
97
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
98
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
99
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute).
102
+ if (!opts) {
103
+ opts = { fallback: true };
104
+ }
105
+ else {
106
+ opts.fallback = (_e = opts.fallback) !== null && _e !== void 0 ? _e : true;
107
+ }
108
+ const fallback = (_f = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _f !== void 0 ? _f : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
109
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
110
+ // Request numeric enum values if REST transport is used.
111
+ opts.numericEnums = true;
112
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
113
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
114
+ opts['scopes'] = staticMembers.scopes;
115
+ }
116
+ // Load google-gax module synchronously if needed
117
+ if (!gaxInstance) {
118
+ gaxInstance = require('google-gax');
119
+ }
120
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
121
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
122
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
123
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
124
+ // Save options to use in initialize() method.
125
+ this._opts = opts;
126
+ // Save the auth object to the client, for use by other methods.
127
+ this.auth = this._gaxGrpc.auth;
128
+ // Set useJWTAccessWithScope on the auth object.
129
+ this.auth.useJWTAccessWithScope = true;
130
+ // Set defaultServicePath on the auth object.
131
+ this.auth.defaultServicePath = this._servicePath;
132
+ // Set the default scopes in auth client if needed.
133
+ if (servicePath === this._servicePath) {
134
+ this.auth.defaultScopes = staticMembers.scopes;
135
+ }
136
+ // Determine the client header string.
137
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
138
+ if (typeof process === 'object' && 'versions' in process) {
139
+ clientHeader.push(`gl-node/${process.versions.node}`);
140
+ }
141
+ else {
142
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
143
+ }
144
+ if (!opts.fallback) {
145
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
146
+ }
147
+ else {
148
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
149
+ }
150
+ if (opts.libName && opts.libVersion) {
151
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
152
+ }
153
+ // Load the applicable protos.
154
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
155
+ // This API contains "path templates"; forward-slash-separated
156
+ // identifiers to uniquely identify resources within the API.
157
+ // Create useful helper objects for these.
158
+ this.pathTemplates = {
159
+ adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
160
+ companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
161
+ contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
162
+ customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
163
+ customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
164
+ customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}'),
165
+ entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}'),
166
+ labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
167
+ networkPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}'),
168
+ orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
169
+ placementPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/placements/{placement}'),
170
+ reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
171
+ rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
172
+ taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
173
+ teamPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/teams/{team}'),
174
+ userPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/users/{user}'),
175
+ };
176
+ // Some of the methods on this service return "paged" results,
177
+ // (e.g. 50 results at a time, with tokens to get subsequent
178
+ // pages). Denote the keys used for pagination and results.
179
+ this.descriptors.page = {
180
+ listEntitySignalsMappings: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'entitySignalsMappings'),
181
+ };
182
+ // Put together the default options sent with requests.
183
+ this._defaults = this._gaxGrpc.constructSettings('google.ads.admanager.v1.EntitySignalsMappingService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
184
+ // Set up a dictionary of "inner API calls"; the core implementation
185
+ // of calling the API is handled in `google-gax`, with this code
186
+ // merely providing the destination and request information.
187
+ this.innerApiCalls = {};
188
+ // Add a warn function to the client constructor so it can be easily tested.
189
+ this.warn = this._gaxModule.warn;
190
+ }
191
+ /**
192
+ * Initialize the client.
193
+ * Performs asynchronous operations (such as authentication) and prepares the client.
194
+ * This function will be called automatically when any class method is called for the
195
+ * first time, but if you need to initialize it before calling an actual method,
196
+ * feel free to call initialize() directly.
197
+ *
198
+ * You can await on this method if you want to make sure the client is initialized.
199
+ *
200
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
201
+ */
202
+ initialize() {
203
+ // If the client stub promise is already initialized, return immediately.
204
+ if (this.entitySignalsMappingServiceStub) {
205
+ return this.entitySignalsMappingServiceStub;
206
+ }
207
+ // Put together the "service stub" for
208
+ // google.ads.admanager.v1.EntitySignalsMappingService.
209
+ this.entitySignalsMappingServiceStub = this._gaxGrpc.createStub(this._opts.fallback
210
+ ? this._protos.lookupService('google.ads.admanager.v1.EntitySignalsMappingService')
211
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
212
+ this._protos.google.ads.admanager.v1
213
+ .EntitySignalsMappingService, this._opts, this._providedCustomServicePath);
214
+ // Iterate over each of the methods that the service provides
215
+ // and create an API call method for each.
216
+ const entitySignalsMappingServiceStubMethods = [
217
+ 'getEntitySignalsMapping',
218
+ 'listEntitySignalsMappings',
219
+ 'createEntitySignalsMapping',
220
+ 'updateEntitySignalsMapping',
221
+ 'batchCreateEntitySignalsMappings',
222
+ 'batchUpdateEntitySignalsMappings',
223
+ ];
224
+ for (const methodName of entitySignalsMappingServiceStubMethods) {
225
+ const callPromise = this.entitySignalsMappingServiceStub.then(stub => (...args) => {
226
+ if (this._terminated) {
227
+ return Promise.reject('The client has already been closed.');
228
+ }
229
+ const func = stub[methodName];
230
+ return func.apply(stub, args);
231
+ }, (err) => () => {
232
+ throw err;
233
+ });
234
+ const descriptor = this.descriptors.page[methodName] || undefined;
235
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
236
+ this.innerApiCalls[methodName] = apiCall;
237
+ }
238
+ return this.entitySignalsMappingServiceStub;
239
+ }
240
+ /**
241
+ * The DNS address for this API service.
242
+ * @deprecated Use the apiEndpoint method of the client instance.
243
+ * @returns {string} The DNS address for this service.
244
+ */
245
+ static get servicePath() {
246
+ if (typeof process === 'object' &&
247
+ typeof process.emitWarning === 'function') {
248
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
249
+ }
250
+ return 'admanager.googleapis.com';
251
+ }
252
+ /**
253
+ * The DNS address for this API service - same as servicePath.
254
+ * @deprecated Use the apiEndpoint method of the client instance.
255
+ * @returns {string} The DNS address for this service.
256
+ */
257
+ static get apiEndpoint() {
258
+ if (typeof process === 'object' &&
259
+ typeof process.emitWarning === 'function') {
260
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
261
+ }
262
+ return 'admanager.googleapis.com';
263
+ }
264
+ /**
265
+ * The DNS address for this API service.
266
+ * @returns {string} The DNS address for this service.
267
+ */
268
+ get apiEndpoint() {
269
+ return this._servicePath;
270
+ }
271
+ get universeDomain() {
272
+ return this._universeDomain;
273
+ }
274
+ /**
275
+ * The port for this API service.
276
+ * @returns {number} The default port for this service.
277
+ */
278
+ static get port() {
279
+ return 443;
280
+ }
281
+ /**
282
+ * The scopes needed to make gRPC calls for every method defined
283
+ * in this service.
284
+ * @returns {string[]} List of default scopes.
285
+ */
286
+ static get scopes() {
287
+ return [];
288
+ }
289
+ /**
290
+ * Return the project ID used by this class.
291
+ * @returns {Promise} A promise that resolves to string containing the project ID.
292
+ */
293
+ getProjectId(callback) {
294
+ if (callback) {
295
+ this.auth.getProjectId(callback);
296
+ return;
297
+ }
298
+ return this.auth.getProjectId();
299
+ }
300
+ getEntitySignalsMapping(request, optionsOrCallback, callback) {
301
+ var _a;
302
+ request = request || {};
303
+ let options;
304
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
305
+ callback = optionsOrCallback;
306
+ options = {};
307
+ }
308
+ else {
309
+ options = optionsOrCallback;
310
+ }
311
+ options = options || {};
312
+ options.otherArgs = options.otherArgs || {};
313
+ options.otherArgs.headers = options.otherArgs.headers || {};
314
+ options.otherArgs.headers['x-goog-request-params'] =
315
+ this._gaxModule.routingHeader.fromParams({
316
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
317
+ });
318
+ this.initialize();
319
+ return this.innerApiCalls.getEntitySignalsMapping(request, options, callback);
320
+ }
321
+ createEntitySignalsMapping(request, optionsOrCallback, callback) {
322
+ var _a;
323
+ request = request || {};
324
+ let options;
325
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
326
+ callback = optionsOrCallback;
327
+ options = {};
328
+ }
329
+ else {
330
+ options = optionsOrCallback;
331
+ }
332
+ options = options || {};
333
+ options.otherArgs = options.otherArgs || {};
334
+ options.otherArgs.headers = options.otherArgs.headers || {};
335
+ options.otherArgs.headers['x-goog-request-params'] =
336
+ this._gaxModule.routingHeader.fromParams({
337
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
338
+ });
339
+ this.initialize();
340
+ return this.innerApiCalls.createEntitySignalsMapping(request, options, callback);
341
+ }
342
+ updateEntitySignalsMapping(request, optionsOrCallback, callback) {
343
+ var _a;
344
+ request = request || {};
345
+ let options;
346
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
347
+ callback = optionsOrCallback;
348
+ options = {};
349
+ }
350
+ else {
351
+ options = optionsOrCallback;
352
+ }
353
+ options = options || {};
354
+ options.otherArgs = options.otherArgs || {};
355
+ options.otherArgs.headers = options.otherArgs.headers || {};
356
+ options.otherArgs.headers['x-goog-request-params'] =
357
+ this._gaxModule.routingHeader.fromParams({
358
+ 'entity_signals_mapping.name': (_a = request.entitySignalsMapping.name) !== null && _a !== void 0 ? _a : '',
359
+ });
360
+ this.initialize();
361
+ return this.innerApiCalls.updateEntitySignalsMapping(request, options, callback);
362
+ }
363
+ batchCreateEntitySignalsMappings(request, optionsOrCallback, callback) {
364
+ var _a;
365
+ request = request || {};
366
+ let options;
367
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
368
+ callback = optionsOrCallback;
369
+ options = {};
370
+ }
371
+ else {
372
+ options = optionsOrCallback;
373
+ }
374
+ options = options || {};
375
+ options.otherArgs = options.otherArgs || {};
376
+ options.otherArgs.headers = options.otherArgs.headers || {};
377
+ options.otherArgs.headers['x-goog-request-params'] =
378
+ this._gaxModule.routingHeader.fromParams({
379
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
380
+ });
381
+ this.initialize();
382
+ return this.innerApiCalls.batchCreateEntitySignalsMappings(request, options, callback);
383
+ }
384
+ batchUpdateEntitySignalsMappings(request, optionsOrCallback, callback) {
385
+ var _a;
386
+ request = request || {};
387
+ let options;
388
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
389
+ callback = optionsOrCallback;
390
+ options = {};
391
+ }
392
+ else {
393
+ options = optionsOrCallback;
394
+ }
395
+ options = options || {};
396
+ options.otherArgs = options.otherArgs || {};
397
+ options.otherArgs.headers = options.otherArgs.headers || {};
398
+ options.otherArgs.headers['x-goog-request-params'] =
399
+ this._gaxModule.routingHeader.fromParams({
400
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
401
+ });
402
+ this.initialize();
403
+ return this.innerApiCalls.batchUpdateEntitySignalsMappings(request, options, callback);
404
+ }
405
+ listEntitySignalsMappings(request, optionsOrCallback, callback) {
406
+ var _a;
407
+ request = request || {};
408
+ let options;
409
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
410
+ callback = optionsOrCallback;
411
+ options = {};
412
+ }
413
+ else {
414
+ options = optionsOrCallback;
415
+ }
416
+ options = options || {};
417
+ options.otherArgs = options.otherArgs || {};
418
+ options.otherArgs.headers = options.otherArgs.headers || {};
419
+ options.otherArgs.headers['x-goog-request-params'] =
420
+ this._gaxModule.routingHeader.fromParams({
421
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
422
+ });
423
+ this.initialize();
424
+ return this.innerApiCalls.listEntitySignalsMappings(request, options, callback);
425
+ }
426
+ /**
427
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
428
+ * @param {Object} request
429
+ * The request object that will be sent.
430
+ * @param {string} request.parent
431
+ * Required. The parent, which owns this collection of EntitySignalsMappings.
432
+ * Format: `networks/{network_code}`
433
+ * @param {number} [request.pageSize]
434
+ * Optional. The maximum number of `EntitySignalsMappings` to return. The
435
+ * service may return fewer than this value. If unspecified, at most 50
436
+ * `EntitySignalsMappings` will be returned. The maximum value is 1000; values
437
+ * above 1000 will be coerced to 1000.
438
+ * @param {string} [request.pageToken]
439
+ * Optional. A page token, received from a previous
440
+ * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent
441
+ * page.
442
+ *
443
+ * When paginating, all other parameters provided to
444
+ * `ListEntitySignalsMappings` must match the call that provided the page
445
+ * token.
446
+ * @param {string} [request.filter]
447
+ * Optional. Expression to filter the response.
448
+ * See syntax details at
449
+ * https://developers.google.com/ad-manager/api/beta/filters
450
+ * @param {string} [request.orderBy]
451
+ * Optional. Expression to specify sorting order.
452
+ * See syntax details at
453
+ * https://developers.google.com/ad-manager/api/beta/filters#order
454
+ * @param {number} [request.skip]
455
+ * Optional. Number of individual resources to skip while paginating.
456
+ * @param {object} [options]
457
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
458
+ * @returns {Stream}
459
+ * An object stream which emits an object representing {@link protos.google.ads.admanager.v1.EntitySignalsMapping|EntitySignalsMapping} on 'data' event.
460
+ * The client library will perform auto-pagination by default: it will call the API as many
461
+ * times as needed. Note that it can affect your quota.
462
+ * We recommend using `listEntitySignalsMappingsAsync()`
463
+ * method described below for async iteration which you can stop as needed.
464
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
465
+ * for more details and examples.
466
+ */
467
+ listEntitySignalsMappingsStream(request, options) {
468
+ var _a;
469
+ request = request || {};
470
+ options = options || {};
471
+ options.otherArgs = options.otherArgs || {};
472
+ options.otherArgs.headers = options.otherArgs.headers || {};
473
+ options.otherArgs.headers['x-goog-request-params'] =
474
+ this._gaxModule.routingHeader.fromParams({
475
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
476
+ });
477
+ const defaultCallSettings = this._defaults['listEntitySignalsMappings'];
478
+ const callSettings = defaultCallSettings.merge(options);
479
+ this.initialize();
480
+ return this.descriptors.page.listEntitySignalsMappings.createStream(this.innerApiCalls.listEntitySignalsMappings, request, callSettings);
481
+ }
482
+ /**
483
+ * Equivalent to `listEntitySignalsMappings`, but returns an iterable object.
484
+ *
485
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
486
+ * @param {Object} request
487
+ * The request object that will be sent.
488
+ * @param {string} request.parent
489
+ * Required. The parent, which owns this collection of EntitySignalsMappings.
490
+ * Format: `networks/{network_code}`
491
+ * @param {number} [request.pageSize]
492
+ * Optional. The maximum number of `EntitySignalsMappings` to return. The
493
+ * service may return fewer than this value. If unspecified, at most 50
494
+ * `EntitySignalsMappings` will be returned. The maximum value is 1000; values
495
+ * above 1000 will be coerced to 1000.
496
+ * @param {string} [request.pageToken]
497
+ * Optional. A page token, received from a previous
498
+ * `ListEntitySignalsMappings` call. Provide this to retrieve the subsequent
499
+ * page.
500
+ *
501
+ * When paginating, all other parameters provided to
502
+ * `ListEntitySignalsMappings` must match the call that provided the page
503
+ * token.
504
+ * @param {string} [request.filter]
505
+ * Optional. Expression to filter the response.
506
+ * See syntax details at
507
+ * https://developers.google.com/ad-manager/api/beta/filters
508
+ * @param {string} [request.orderBy]
509
+ * Optional. Expression to specify sorting order.
510
+ * See syntax details at
511
+ * https://developers.google.com/ad-manager/api/beta/filters#order
512
+ * @param {number} [request.skip]
513
+ * Optional. Number of individual resources to skip while paginating.
514
+ * @param {object} [options]
515
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
516
+ * @returns {Object}
517
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
518
+ * When you iterate the returned iterable, each element will be an object representing
519
+ * {@link protos.google.ads.admanager.v1.EntitySignalsMapping|EntitySignalsMapping}. The API will be called under the hood as needed, once per the page,
520
+ * so you can stop the iteration when you don't need more results.
521
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
522
+ * for more details and examples.
523
+ * @example <caption>include:samples/generated/v1/entity_signals_mapping_service.list_entity_signals_mappings.js</caption>
524
+ * region_tag:admanager_v1_generated_EntitySignalsMappingService_ListEntitySignalsMappings_async
525
+ */
526
+ listEntitySignalsMappingsAsync(request, options) {
527
+ var _a;
528
+ request = request || {};
529
+ options = options || {};
530
+ options.otherArgs = options.otherArgs || {};
531
+ options.otherArgs.headers = options.otherArgs.headers || {};
532
+ options.otherArgs.headers['x-goog-request-params'] =
533
+ this._gaxModule.routingHeader.fromParams({
534
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
535
+ });
536
+ const defaultCallSettings = this._defaults['listEntitySignalsMappings'];
537
+ const callSettings = defaultCallSettings.merge(options);
538
+ this.initialize();
539
+ return this.descriptors.page.listEntitySignalsMappings.asyncIterate(this.innerApiCalls['listEntitySignalsMappings'], request, callSettings);
540
+ }
541
+ // --------------------
542
+ // -- Path templates --
543
+ // --------------------
544
+ /**
545
+ * Return a fully-qualified adUnit resource name string.
546
+ *
547
+ * @param {string} network_code
548
+ * @param {string} ad_unit
549
+ * @returns {string} Resource name string.
550
+ */
551
+ adUnitPath(networkCode, adUnit) {
552
+ return this.pathTemplates.adUnitPathTemplate.render({
553
+ network_code: networkCode,
554
+ ad_unit: adUnit,
555
+ });
556
+ }
557
+ /**
558
+ * Parse the network_code from AdUnit resource.
559
+ *
560
+ * @param {string} adUnitName
561
+ * A fully-qualified path representing AdUnit resource.
562
+ * @returns {string} A string representing the network_code.
563
+ */
564
+ matchNetworkCodeFromAdUnitName(adUnitName) {
565
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code;
566
+ }
567
+ /**
568
+ * Parse the ad_unit from AdUnit resource.
569
+ *
570
+ * @param {string} adUnitName
571
+ * A fully-qualified path representing AdUnit resource.
572
+ * @returns {string} A string representing the ad_unit.
573
+ */
574
+ matchAdUnitFromAdUnitName(adUnitName) {
575
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
576
+ }
577
+ /**
578
+ * Return a fully-qualified company resource name string.
579
+ *
580
+ * @param {string} network_code
581
+ * @param {string} company
582
+ * @returns {string} Resource name string.
583
+ */
584
+ companyPath(networkCode, company) {
585
+ return this.pathTemplates.companyPathTemplate.render({
586
+ network_code: networkCode,
587
+ company: company,
588
+ });
589
+ }
590
+ /**
591
+ * Parse the network_code from Company resource.
592
+ *
593
+ * @param {string} companyName
594
+ * A fully-qualified path representing Company resource.
595
+ * @returns {string} A string representing the network_code.
596
+ */
597
+ matchNetworkCodeFromCompanyName(companyName) {
598
+ return this.pathTemplates.companyPathTemplate.match(companyName)
599
+ .network_code;
600
+ }
601
+ /**
602
+ * Parse the company from Company resource.
603
+ *
604
+ * @param {string} companyName
605
+ * A fully-qualified path representing Company resource.
606
+ * @returns {string} A string representing the company.
607
+ */
608
+ matchCompanyFromCompanyName(companyName) {
609
+ return this.pathTemplates.companyPathTemplate.match(companyName).company;
610
+ }
611
+ /**
612
+ * Return a fully-qualified contact resource name string.
613
+ *
614
+ * @param {string} network_code
615
+ * @param {string} contact
616
+ * @returns {string} Resource name string.
617
+ */
618
+ contactPath(networkCode, contact) {
619
+ return this.pathTemplates.contactPathTemplate.render({
620
+ network_code: networkCode,
621
+ contact: contact,
622
+ });
623
+ }
624
+ /**
625
+ * Parse the network_code from Contact resource.
626
+ *
627
+ * @param {string} contactName
628
+ * A fully-qualified path representing Contact resource.
629
+ * @returns {string} A string representing the network_code.
630
+ */
631
+ matchNetworkCodeFromContactName(contactName) {
632
+ return this.pathTemplates.contactPathTemplate.match(contactName)
633
+ .network_code;
634
+ }
635
+ /**
636
+ * Parse the contact from Contact resource.
637
+ *
638
+ * @param {string} contactName
639
+ * A fully-qualified path representing Contact resource.
640
+ * @returns {string} A string representing the contact.
641
+ */
642
+ matchContactFromContactName(contactName) {
643
+ return this.pathTemplates.contactPathTemplate.match(contactName).contact;
644
+ }
645
+ /**
646
+ * Return a fully-qualified customField resource name string.
647
+ *
648
+ * @param {string} network_code
649
+ * @param {string} custom_field
650
+ * @returns {string} Resource name string.
651
+ */
652
+ customFieldPath(networkCode, customField) {
653
+ return this.pathTemplates.customFieldPathTemplate.render({
654
+ network_code: networkCode,
655
+ custom_field: customField,
656
+ });
657
+ }
658
+ /**
659
+ * Parse the network_code from CustomField resource.
660
+ *
661
+ * @param {string} customFieldName
662
+ * A fully-qualified path representing CustomField resource.
663
+ * @returns {string} A string representing the network_code.
664
+ */
665
+ matchNetworkCodeFromCustomFieldName(customFieldName) {
666
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
667
+ .network_code;
668
+ }
669
+ /**
670
+ * Parse the custom_field from CustomField resource.
671
+ *
672
+ * @param {string} customFieldName
673
+ * A fully-qualified path representing CustomField resource.
674
+ * @returns {string} A string representing the custom_field.
675
+ */
676
+ matchCustomFieldFromCustomFieldName(customFieldName) {
677
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
678
+ .custom_field;
679
+ }
680
+ /**
681
+ * Return a fully-qualified customTargetingKey resource name string.
682
+ *
683
+ * @param {string} network_code
684
+ * @param {string} custom_targeting_key
685
+ * @returns {string} Resource name string.
686
+ */
687
+ customTargetingKeyPath(networkCode, customTargetingKey) {
688
+ return this.pathTemplates.customTargetingKeyPathTemplate.render({
689
+ network_code: networkCode,
690
+ custom_targeting_key: customTargetingKey,
691
+ });
692
+ }
693
+ /**
694
+ * Parse the network_code from CustomTargetingKey resource.
695
+ *
696
+ * @param {string} customTargetingKeyName
697
+ * A fully-qualified path representing CustomTargetingKey resource.
698
+ * @returns {string} A string representing the network_code.
699
+ */
700
+ matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName) {
701
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code;
702
+ }
703
+ /**
704
+ * Parse the custom_targeting_key from CustomTargetingKey resource.
705
+ *
706
+ * @param {string} customTargetingKeyName
707
+ * A fully-qualified path representing CustomTargetingKey resource.
708
+ * @returns {string} A string representing the custom_targeting_key.
709
+ */
710
+ matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName) {
711
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key;
712
+ }
713
+ /**
714
+ * Return a fully-qualified customTargetingValue resource name string.
715
+ *
716
+ * @param {string} network_code
717
+ * @param {string} custom_targeting_key
718
+ * @param {string} custom_targeting_value
719
+ * @returns {string} Resource name string.
720
+ */
721
+ customTargetingValuePath(networkCode, customTargetingKey, customTargetingValue) {
722
+ return this.pathTemplates.customTargetingValuePathTemplate.render({
723
+ network_code: networkCode,
724
+ custom_targeting_key: customTargetingKey,
725
+ custom_targeting_value: customTargetingValue,
726
+ });
727
+ }
728
+ /**
729
+ * Parse the network_code from CustomTargetingValue resource.
730
+ *
731
+ * @param {string} customTargetingValueName
732
+ * A fully-qualified path representing CustomTargetingValue resource.
733
+ * @returns {string} A string representing the network_code.
734
+ */
735
+ matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
736
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
737
+ }
738
+ /**
739
+ * Parse the custom_targeting_key from CustomTargetingValue resource.
740
+ *
741
+ * @param {string} customTargetingValueName
742
+ * A fully-qualified path representing CustomTargetingValue resource.
743
+ * @returns {string} A string representing the custom_targeting_key.
744
+ */
745
+ matchCustomTargetingKeyFromCustomTargetingValueName(customTargetingValueName) {
746
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_key;
747
+ }
748
+ /**
749
+ * Parse the custom_targeting_value from CustomTargetingValue resource.
750
+ *
751
+ * @param {string} customTargetingValueName
752
+ * A fully-qualified path representing CustomTargetingValue resource.
753
+ * @returns {string} A string representing the custom_targeting_value.
754
+ */
755
+ matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
756
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
757
+ }
758
+ /**
759
+ * Return a fully-qualified entitySignalsMapping resource name string.
760
+ *
761
+ * @param {string} network_code
762
+ * @param {string} entity_signals_mapping
763
+ * @returns {string} Resource name string.
764
+ */
765
+ entitySignalsMappingPath(networkCode, entitySignalsMapping) {
766
+ return this.pathTemplates.entitySignalsMappingPathTemplate.render({
767
+ network_code: networkCode,
768
+ entity_signals_mapping: entitySignalsMapping,
769
+ });
770
+ }
771
+ /**
772
+ * Parse the network_code from EntitySignalsMapping resource.
773
+ *
774
+ * @param {string} entitySignalsMappingName
775
+ * A fully-qualified path representing EntitySignalsMapping resource.
776
+ * @returns {string} A string representing the network_code.
777
+ */
778
+ matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName) {
779
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code;
780
+ }
781
+ /**
782
+ * Parse the entity_signals_mapping from EntitySignalsMapping resource.
783
+ *
784
+ * @param {string} entitySignalsMappingName
785
+ * A fully-qualified path representing EntitySignalsMapping resource.
786
+ * @returns {string} A string representing the entity_signals_mapping.
787
+ */
788
+ matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
789
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
790
+ }
791
+ /**
792
+ * Return a fully-qualified label resource name string.
793
+ *
794
+ * @param {string} network_code
795
+ * @param {string} label
796
+ * @returns {string} Resource name string.
797
+ */
798
+ labelPath(networkCode, label) {
799
+ return this.pathTemplates.labelPathTemplate.render({
800
+ network_code: networkCode,
801
+ label: label,
802
+ });
803
+ }
804
+ /**
805
+ * Parse the network_code from Label resource.
806
+ *
807
+ * @param {string} labelName
808
+ * A fully-qualified path representing Label resource.
809
+ * @returns {string} A string representing the network_code.
810
+ */
811
+ matchNetworkCodeFromLabelName(labelName) {
812
+ return this.pathTemplates.labelPathTemplate.match(labelName).network_code;
813
+ }
814
+ /**
815
+ * Parse the label from Label resource.
816
+ *
817
+ * @param {string} labelName
818
+ * A fully-qualified path representing Label resource.
819
+ * @returns {string} A string representing the label.
820
+ */
821
+ matchLabelFromLabelName(labelName) {
822
+ return this.pathTemplates.labelPathTemplate.match(labelName).label;
823
+ }
824
+ /**
825
+ * Return a fully-qualified network resource name string.
826
+ *
827
+ * @param {string} network_code
828
+ * @returns {string} Resource name string.
829
+ */
830
+ networkPath(networkCode) {
831
+ return this.pathTemplates.networkPathTemplate.render({
832
+ network_code: networkCode,
833
+ });
834
+ }
835
+ /**
836
+ * Parse the network_code from Network resource.
837
+ *
838
+ * @param {string} networkName
839
+ * A fully-qualified path representing Network resource.
840
+ * @returns {string} A string representing the network_code.
841
+ */
842
+ matchNetworkCodeFromNetworkName(networkName) {
843
+ return this.pathTemplates.networkPathTemplate.match(networkName)
844
+ .network_code;
845
+ }
846
+ /**
847
+ * Return a fully-qualified order resource name string.
848
+ *
849
+ * @param {string} network_code
850
+ * @param {string} order
851
+ * @returns {string} Resource name string.
852
+ */
853
+ orderPath(networkCode, order) {
854
+ return this.pathTemplates.orderPathTemplate.render({
855
+ network_code: networkCode,
856
+ order: order,
857
+ });
858
+ }
859
+ /**
860
+ * Parse the network_code from Order resource.
861
+ *
862
+ * @param {string} orderName
863
+ * A fully-qualified path representing Order resource.
864
+ * @returns {string} A string representing the network_code.
865
+ */
866
+ matchNetworkCodeFromOrderName(orderName) {
867
+ return this.pathTemplates.orderPathTemplate.match(orderName).network_code;
868
+ }
869
+ /**
870
+ * Parse the order from Order resource.
871
+ *
872
+ * @param {string} orderName
873
+ * A fully-qualified path representing Order resource.
874
+ * @returns {string} A string representing the order.
875
+ */
876
+ matchOrderFromOrderName(orderName) {
877
+ return this.pathTemplates.orderPathTemplate.match(orderName).order;
878
+ }
879
+ /**
880
+ * Return a fully-qualified placement resource name string.
881
+ *
882
+ * @param {string} network_code
883
+ * @param {string} placement
884
+ * @returns {string} Resource name string.
885
+ */
886
+ placementPath(networkCode, placement) {
887
+ return this.pathTemplates.placementPathTemplate.render({
888
+ network_code: networkCode,
889
+ placement: placement,
890
+ });
891
+ }
892
+ /**
893
+ * Parse the network_code from Placement resource.
894
+ *
895
+ * @param {string} placementName
896
+ * A fully-qualified path representing Placement resource.
897
+ * @returns {string} A string representing the network_code.
898
+ */
899
+ matchNetworkCodeFromPlacementName(placementName) {
900
+ return this.pathTemplates.placementPathTemplate.match(placementName)
901
+ .network_code;
902
+ }
903
+ /**
904
+ * Parse the placement from Placement resource.
905
+ *
906
+ * @param {string} placementName
907
+ * A fully-qualified path representing Placement resource.
908
+ * @returns {string} A string representing the placement.
909
+ */
910
+ matchPlacementFromPlacementName(placementName) {
911
+ return this.pathTemplates.placementPathTemplate.match(placementName)
912
+ .placement;
913
+ }
914
+ /**
915
+ * Return a fully-qualified report resource name string.
916
+ *
917
+ * @param {string} network_code
918
+ * @param {string} report
919
+ * @returns {string} Resource name string.
920
+ */
921
+ reportPath(networkCode, report) {
922
+ return this.pathTemplates.reportPathTemplate.render({
923
+ network_code: networkCode,
924
+ report: report,
925
+ });
926
+ }
927
+ /**
928
+ * Parse the network_code from Report resource.
929
+ *
930
+ * @param {string} reportName
931
+ * A fully-qualified path representing Report resource.
932
+ * @returns {string} A string representing the network_code.
933
+ */
934
+ matchNetworkCodeFromReportName(reportName) {
935
+ return this.pathTemplates.reportPathTemplate.match(reportName).network_code;
936
+ }
937
+ /**
938
+ * Parse the report from Report resource.
939
+ *
940
+ * @param {string} reportName
941
+ * A fully-qualified path representing Report resource.
942
+ * @returns {string} A string representing the report.
943
+ */
944
+ matchReportFromReportName(reportName) {
945
+ return this.pathTemplates.reportPathTemplate.match(reportName).report;
946
+ }
947
+ /**
948
+ * Return a fully-qualified role resource name string.
949
+ *
950
+ * @param {string} network_code
951
+ * @param {string} role
952
+ * @returns {string} Resource name string.
953
+ */
954
+ rolePath(networkCode, role) {
955
+ return this.pathTemplates.rolePathTemplate.render({
956
+ network_code: networkCode,
957
+ role: role,
958
+ });
959
+ }
960
+ /**
961
+ * Parse the network_code from Role resource.
962
+ *
963
+ * @param {string} roleName
964
+ * A fully-qualified path representing Role resource.
965
+ * @returns {string} A string representing the network_code.
966
+ */
967
+ matchNetworkCodeFromRoleName(roleName) {
968
+ return this.pathTemplates.rolePathTemplate.match(roleName).network_code;
969
+ }
970
+ /**
971
+ * Parse the role from Role resource.
972
+ *
973
+ * @param {string} roleName
974
+ * A fully-qualified path representing Role resource.
975
+ * @returns {string} A string representing the role.
976
+ */
977
+ matchRoleFromRoleName(roleName) {
978
+ return this.pathTemplates.rolePathTemplate.match(roleName).role;
979
+ }
980
+ /**
981
+ * Return a fully-qualified taxonomyCategory resource name string.
982
+ *
983
+ * @param {string} network_code
984
+ * @param {string} taxonomy_category
985
+ * @returns {string} Resource name string.
986
+ */
987
+ taxonomyCategoryPath(networkCode, taxonomyCategory) {
988
+ return this.pathTemplates.taxonomyCategoryPathTemplate.render({
989
+ network_code: networkCode,
990
+ taxonomy_category: taxonomyCategory,
991
+ });
992
+ }
993
+ /**
994
+ * Parse the network_code from TaxonomyCategory resource.
995
+ *
996
+ * @param {string} taxonomyCategoryName
997
+ * A fully-qualified path representing TaxonomyCategory resource.
998
+ * @returns {string} A string representing the network_code.
999
+ */
1000
+ matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName) {
1001
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code;
1002
+ }
1003
+ /**
1004
+ * Parse the taxonomy_category from TaxonomyCategory resource.
1005
+ *
1006
+ * @param {string} taxonomyCategoryName
1007
+ * A fully-qualified path representing TaxonomyCategory resource.
1008
+ * @returns {string} A string representing the taxonomy_category.
1009
+ */
1010
+ matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName) {
1011
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category;
1012
+ }
1013
+ /**
1014
+ * Return a fully-qualified team resource name string.
1015
+ *
1016
+ * @param {string} network_code
1017
+ * @param {string} team
1018
+ * @returns {string} Resource name string.
1019
+ */
1020
+ teamPath(networkCode, team) {
1021
+ return this.pathTemplates.teamPathTemplate.render({
1022
+ network_code: networkCode,
1023
+ team: team,
1024
+ });
1025
+ }
1026
+ /**
1027
+ * Parse the network_code from Team resource.
1028
+ *
1029
+ * @param {string} teamName
1030
+ * A fully-qualified path representing Team resource.
1031
+ * @returns {string} A string representing the network_code.
1032
+ */
1033
+ matchNetworkCodeFromTeamName(teamName) {
1034
+ return this.pathTemplates.teamPathTemplate.match(teamName).network_code;
1035
+ }
1036
+ /**
1037
+ * Parse the team from Team resource.
1038
+ *
1039
+ * @param {string} teamName
1040
+ * A fully-qualified path representing Team resource.
1041
+ * @returns {string} A string representing the team.
1042
+ */
1043
+ matchTeamFromTeamName(teamName) {
1044
+ return this.pathTemplates.teamPathTemplate.match(teamName).team;
1045
+ }
1046
+ /**
1047
+ * Return a fully-qualified user resource name string.
1048
+ *
1049
+ * @param {string} network_code
1050
+ * @param {string} user
1051
+ * @returns {string} Resource name string.
1052
+ */
1053
+ userPath(networkCode, user) {
1054
+ return this.pathTemplates.userPathTemplate.render({
1055
+ network_code: networkCode,
1056
+ user: user,
1057
+ });
1058
+ }
1059
+ /**
1060
+ * Parse the network_code from User resource.
1061
+ *
1062
+ * @param {string} userName
1063
+ * A fully-qualified path representing User resource.
1064
+ * @returns {string} A string representing the network_code.
1065
+ */
1066
+ matchNetworkCodeFromUserName(userName) {
1067
+ return this.pathTemplates.userPathTemplate.match(userName).network_code;
1068
+ }
1069
+ /**
1070
+ * Parse the user from User resource.
1071
+ *
1072
+ * @param {string} userName
1073
+ * A fully-qualified path representing User resource.
1074
+ * @returns {string} A string representing the user.
1075
+ */
1076
+ matchUserFromUserName(userName) {
1077
+ return this.pathTemplates.userPathTemplate.match(userName).user;
1078
+ }
1079
+ /**
1080
+ * Terminate the gRPC channel and close the client.
1081
+ *
1082
+ * The client will no longer be usable and all future behavior is undefined.
1083
+ * @returns {Promise} A promise that resolves when the client is closed.
1084
+ */
1085
+ close() {
1086
+ if (this.entitySignalsMappingServiceStub && !this._terminated) {
1087
+ return this.entitySignalsMappingServiceStub.then(stub => {
1088
+ this._terminated = true;
1089
+ stub.close();
1090
+ });
1091
+ }
1092
+ return Promise.resolve();
1093
+ }
1094
+ }
1095
+ exports.EntitySignalsMappingServiceClient = EntitySignalsMappingServiceClient;
1096
+ //# sourceMappingURL=entity_signals_mapping_service_client.js.map