@google-ads/admanager 0.3.0 → 0.4.1

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 (182) hide show
  1. package/README.md +86 -150
  2. package/build/protos/google/ads/admanager/v1/ad_break_messages.proto +134 -0
  3. package/build/protos/google/ads/admanager/v1/ad_break_service.proto +269 -0
  4. package/build/protos/google/ads/admanager/v1/ad_unit_enums.proto +1 -1
  5. package/build/protos/google/ads/admanager/v1/ad_unit_messages.proto +32 -26
  6. package/build/protos/google/ads/admanager/v1/ad_unit_service.proto +3 -1
  7. package/build/protos/google/ads/admanager/v1/admanager_error.proto +1 -1
  8. package/build/protos/google/ads/admanager/v1/applied_label.proto +1 -1
  9. package/build/protos/google/ads/admanager/v1/bandwidth_group_messages.proto +46 -0
  10. package/build/protos/google/ads/admanager/v1/bandwidth_group_service.proto +129 -0
  11. package/build/protos/google/ads/admanager/v1/company_enums.proto +123 -0
  12. package/build/protos/google/ads/admanager/v1/company_messages.proto +6 -7
  13. package/build/protos/google/ads/admanager/v1/company_service.proto +3 -1
  14. package/build/protos/google/ads/admanager/v1/contact_messages.proto +4 -4
  15. package/build/protos/google/ads/admanager/v1/custom_field_enums.proto +1 -1
  16. package/build/protos/google/ads/admanager/v1/custom_field_messages.proto +12 -11
  17. package/build/protos/google/ads/admanager/v1/custom_field_service.proto +3 -1
  18. package/build/protos/google/ads/admanager/v1/custom_field_value.proto +1 -2
  19. package/build/protos/google/ads/admanager/v1/custom_targeting_key_enums.proto +1 -1
  20. package/build/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto +1 -1
  21. package/build/protos/google/ads/admanager/v1/custom_targeting_key_service.proto +3 -1
  22. package/build/protos/google/ads/admanager/v1/custom_targeting_value_enums.proto +1 -1
  23. package/build/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto +14 -3
  24. package/build/protos/google/ads/admanager/v1/custom_targeting_value_service.proto +14 -6
  25. package/build/protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto +41 -0
  26. package/build/protos/google/ads/admanager/v1/device_category_messages.proto +45 -0
  27. package/build/protos/google/ads/admanager/v1/device_category_service.proto +129 -0
  28. package/build/protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto +47 -0
  29. package/build/protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto +4 -4
  30. package/build/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto +6 -4
  31. package/build/protos/google/ads/admanager/v1/environment_type_enum.proto +1 -1
  32. package/build/protos/google/ads/admanager/v1/frequency_cap.proto +1 -1
  33. package/build/protos/google/ads/admanager/v1/geo_target_messages.proto +70 -0
  34. package/build/protos/google/ads/admanager/v1/geo_target_service.proto +128 -0
  35. package/build/protos/google/ads/admanager/v1/label_messages.proto +1 -1
  36. package/build/protos/google/ads/admanager/v1/live_stream_event_messages.proto +47 -0
  37. package/build/protos/google/ads/admanager/v1/network_messages.proto +2 -2
  38. package/build/protos/google/ads/admanager/v1/network_service.proto +4 -2
  39. package/build/protos/google/ads/admanager/v1/operating_system_messages.proto +45 -0
  40. package/build/protos/google/ads/admanager/v1/operating_system_service.proto +129 -0
  41. package/build/protos/google/ads/admanager/v1/operating_system_version_messages.proto +52 -0
  42. package/build/protos/google/ads/admanager/v1/operating_system_version_service.proto +133 -0
  43. package/build/protos/google/ads/admanager/v1/order_enums.proto +1 -1
  44. package/build/protos/google/ads/admanager/v1/order_messages.proto +24 -20
  45. package/build/protos/google/ads/admanager/v1/order_service.proto +3 -1
  46. package/build/protos/google/ads/admanager/v1/placement_enums.proto +1 -1
  47. package/build/protos/google/ads/admanager/v1/placement_messages.proto +14 -14
  48. package/build/protos/google/ads/admanager/v1/placement_service.proto +3 -1
  49. package/build/protos/google/ads/admanager/v1/private_auction_deal_messages.proto +119 -0
  50. package/build/protos/google/ads/admanager/v1/private_auction_deal_service.proto +184 -0
  51. package/build/protos/google/ads/admanager/v1/private_auction_messages.proto +74 -0
  52. package/build/protos/google/ads/admanager/v1/private_auction_service.proto +180 -0
  53. package/build/protos/google/ads/admanager/v1/private_marketplace_enums.proto +50 -0
  54. package/build/protos/google/ads/admanager/v1/programmatic_buyer_messages.proto +72 -0
  55. package/build/protos/google/ads/admanager/v1/programmatic_buyer_service.proto +131 -0
  56. package/build/protos/google/ads/admanager/v1/report_messages.proto +3536 -0
  57. package/build/protos/google/ads/admanager/v1/report_service.proto +5 -3247
  58. package/build/protos/google/ads/admanager/v1/request_platform_enum.proto +49 -0
  59. package/build/protos/google/ads/admanager/v1/role_enums.proto +1 -1
  60. package/build/protos/google/ads/admanager/v1/role_messages.proto +6 -6
  61. package/build/protos/google/ads/admanager/v1/role_service.proto +3 -1
  62. package/build/protos/google/ads/admanager/v1/size.proto +7 -11
  63. package/build/protos/google/ads/admanager/v1/size_type_enum.proto +1 -1
  64. package/build/protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto +44 -0
  65. package/build/protos/google/ads/admanager/v1/targeting.proto +328 -0
  66. package/build/protos/google/ads/admanager/v1/taxonomy_category_messages.proto +7 -6
  67. package/build/protos/google/ads/admanager/v1/taxonomy_category_service.proto +3 -1
  68. package/build/protos/google/ads/admanager/v1/taxonomy_type_enum.proto +1 -1
  69. package/build/protos/google/ads/admanager/v1/team_messages.proto +1 -5
  70. package/build/protos/google/ads/admanager/v1/time_unit_enum.proto +1 -1
  71. package/build/protos/google/ads/admanager/v1/user_messages.proto +10 -9
  72. package/build/protos/google/ads/admanager/v1/user_service.proto +3 -1
  73. package/build/protos/google/ads/admanager/v1/video_position_enum.proto +47 -0
  74. package/build/protos/protos.d.ts +15832 -7575
  75. package/build/protos/protos.js +57744 -36372
  76. package/build/protos/protos.json +5795 -2511
  77. package/build/src/index.d.ts +28 -1
  78. package/build/src/index.js +20 -17
  79. package/build/src/index.js.map +1 -1
  80. package/build/src/v1/ad_break_service_client.d.ts +1040 -0
  81. package/build/src/v1/ad_break_service_client.js +1483 -0
  82. package/build/src/v1/ad_break_service_client.js.map +1 -0
  83. package/build/src/v1/ad_break_service_client_config.json +46 -0
  84. package/build/src/v1/ad_break_service_proto_list.json +74 -0
  85. package/build/src/v1/ad_unit_service_client.d.ts +331 -91
  86. package/build/src/v1/ad_unit_service_client.js +414 -106
  87. package/build/src/v1/ad_unit_service_client.js.map +1 -1
  88. package/build/src/v1/ad_unit_service_proto_list.json +29 -3
  89. package/build/src/v1/bandwidth_group_service_client.d.ts +904 -0
  90. package/build/src/v1/bandwidth_group_service_client.js +1369 -0
  91. package/build/src/v1/bandwidth_group_service_client.js.map +1 -0
  92. package/build/src/v1/bandwidth_group_service_client_config.json +34 -0
  93. package/build/src/v1/bandwidth_group_service_proto_list.json +74 -0
  94. package/build/src/v1/company_service_client.d.ts +291 -51
  95. package/build/src/v1/company_service_client.js +402 -81
  96. package/build/src/v1/company_service_client.js.map +1 -1
  97. package/build/src/v1/company_service_proto_list.json +29 -3
  98. package/build/src/v1/custom_field_service_client.d.ts +291 -51
  99. package/build/src/v1/custom_field_service_client.js +403 -85
  100. package/build/src/v1/custom_field_service_client.js.map +1 -1
  101. package/build/src/v1/custom_field_service_proto_list.json +29 -3
  102. package/build/src/v1/custom_targeting_key_service_client.d.ts +291 -51
  103. package/build/src/v1/custom_targeting_key_service_client.js +404 -88
  104. package/build/src/v1/custom_targeting_key_service_client.js.map +1 -1
  105. package/build/src/v1/custom_targeting_key_service_proto_list.json +29 -3
  106. package/build/src/v1/custom_targeting_value_service_client.d.ts +298 -58
  107. package/build/src/v1/custom_targeting_value_service_client.js +406 -90
  108. package/build/src/v1/custom_targeting_value_service_client.js.map +1 -1
  109. package/build/src/v1/custom_targeting_value_service_proto_list.json +29 -3
  110. package/build/src/v1/device_category_service_client.d.ts +904 -0
  111. package/build/src/v1/device_category_service_client.js +1369 -0
  112. package/build/src/v1/device_category_service_client.js.map +1 -0
  113. package/build/src/v1/device_category_service_client_config.json +34 -0
  114. package/build/src/v1/device_category_service_proto_list.json +74 -0
  115. package/build/src/v1/entity_signals_mapping_service_client.d.ts +298 -58
  116. package/build/src/v1/entity_signals_mapping_service_client.js +444 -124
  117. package/build/src/v1/entity_signals_mapping_service_client.js.map +1 -1
  118. package/build/src/v1/entity_signals_mapping_service_proto_list.json +29 -3
  119. package/build/src/v1/gapic_metadata.json +412 -0
  120. package/build/src/v1/geo_target_service_client.d.ts +904 -0
  121. package/build/src/v1/geo_target_service_client.js +1369 -0
  122. package/build/src/v1/geo_target_service_client.js.map +1 -0
  123. package/build/src/v1/geo_target_service_client_config.json +34 -0
  124. package/build/src/v1/geo_target_service_proto_list.json +74 -0
  125. package/build/src/v1/index.d.ts +9 -0
  126. package/build/src/v1/index.js +19 -1
  127. package/build/src/v1/index.js.map +1 -1
  128. package/build/src/v1/network_service_client.d.ts +252 -12
  129. package/build/src/v1/network_service_client.js +397 -65
  130. package/build/src/v1/network_service_client.js.map +1 -1
  131. package/build/src/v1/network_service_proto_list.json +29 -3
  132. package/build/src/v1/operating_system_service_client.d.ts +904 -0
  133. package/build/src/v1/operating_system_service_client.js +1369 -0
  134. package/build/src/v1/operating_system_service_client.js.map +1 -0
  135. package/build/src/v1/operating_system_service_client_config.json +34 -0
  136. package/build/src/v1/operating_system_service_proto_list.json +74 -0
  137. package/build/src/v1/operating_system_version_service_client.d.ts +911 -0
  138. package/build/src/v1/operating_system_version_service_client.js +1373 -0
  139. package/build/src/v1/operating_system_version_service_client.js.map +1 -0
  140. package/build/src/v1/operating_system_version_service_client_config.json +34 -0
  141. package/build/src/v1/operating_system_version_service_proto_list.json +74 -0
  142. package/build/src/v1/order_service_client.d.ts +296 -56
  143. package/build/src/v1/order_service_client.js +402 -81
  144. package/build/src/v1/order_service_client.js.map +1 -1
  145. package/build/src/v1/order_service_proto_list.json +29 -3
  146. package/build/src/v1/placement_service_client.d.ts +291 -51
  147. package/build/src/v1/placement_service_client.js +402 -81
  148. package/build/src/v1/placement_service_client.js.map +1 -1
  149. package/build/src/v1/placement_service_proto_list.json +29 -3
  150. package/build/src/v1/private_auction_deal_service_client.d.ts +965 -0
  151. package/build/src/v1/private_auction_deal_service_client.js +1445 -0
  152. package/build/src/v1/private_auction_deal_service_client.js.map +1 -0
  153. package/build/src/v1/private_auction_deal_service_client_config.json +42 -0
  154. package/build/src/v1/private_auction_deal_service_proto_list.json +74 -0
  155. package/build/src/v1/private_auction_service_client.d.ts +962 -0
  156. package/build/src/v1/private_auction_service_client.js +1443 -0
  157. package/build/src/v1/private_auction_service_client.js.map +1 -0
  158. package/build/src/v1/private_auction_service_client_config.json +42 -0
  159. package/build/src/v1/private_auction_service_proto_list.json +74 -0
  160. package/build/src/v1/programmatic_buyer_service_client.d.ts +905 -0
  161. package/build/src/v1/programmatic_buyer_service_client.js +1369 -0
  162. package/build/src/v1/programmatic_buyer_service_client.js.map +1 -0
  163. package/build/src/v1/programmatic_buyer_service_client_config.json +34 -0
  164. package/build/src/v1/programmatic_buyer_service_proto_list.json +74 -0
  165. package/build/src/v1/report_service_client.d.ts +350 -110
  166. package/build/src/v1/report_service_client.js +471 -177
  167. package/build/src/v1/report_service_client.js.map +1 -1
  168. package/build/src/v1/report_service_proto_list.json +29 -3
  169. package/build/src/v1/role_service_client.d.ts +290 -50
  170. package/build/src/v1/role_service_client.js +402 -81
  171. package/build/src/v1/role_service_client.js.map +1 -1
  172. package/build/src/v1/role_service_proto_list.json +29 -3
  173. package/build/src/v1/taxonomy_category_service_client.d.ts +291 -51
  174. package/build/src/v1/taxonomy_category_service_client.js +404 -87
  175. package/build/src/v1/taxonomy_category_service_client.js.map +1 -1
  176. package/build/src/v1/taxonomy_category_service_proto_list.json +29 -3
  177. package/build/src/v1/user_service_client.d.ts +251 -11
  178. package/build/src/v1/user_service_client.js +388 -59
  179. package/build/src/v1/user_service_client.js.map +1 -1
  180. package/build/src/v1/user_service_proto_list.json +29 -3
  181. package/package.json +4 -4
  182. package/CHANGELOG.md +0 -40
@@ -0,0 +1,1369 @@
1
+ "use strict";
2
+ // Copyright 2025 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.GeoTargetServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ const google_gax_1 = require("google-gax");
23
+ /**
24
+ * Client JSON configuration object, loaded from
25
+ * `src/v1/geo_target_service_client_config.json`.
26
+ * This file defines retry strategy and timeouts for all API methods in this library.
27
+ */
28
+ const gapicConfig = require("./geo_target_service_client_config.json");
29
+ const version = require('../../../package.json').version;
30
+ /**
31
+ * Provides methods for handling `GeoTarget` objects.
32
+ * @class
33
+ * @memberof v1
34
+ */
35
+ class GeoTargetServiceClient {
36
+ _terminated = false;
37
+ _opts;
38
+ _providedCustomServicePath;
39
+ _gaxModule;
40
+ _gaxGrpc;
41
+ _protos;
42
+ _defaults;
43
+ _universeDomain;
44
+ _servicePath;
45
+ _log = google_gax_1.loggingUtils.log('admanager');
46
+ auth;
47
+ descriptors = {
48
+ page: {},
49
+ stream: {},
50
+ longrunning: {},
51
+ batching: {},
52
+ };
53
+ warn;
54
+ innerApiCalls;
55
+ pathTemplates;
56
+ geoTargetServiceStub;
57
+ /**
58
+ * Construct an instance of GeoTargetServiceClient.
59
+ *
60
+ * @param {object} [options] - The configuration object.
61
+ * The options accepted by the constructor are described in detail
62
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
63
+ * The common options are:
64
+ * @param {object} [options.credentials] - Credentials object.
65
+ * @param {string} [options.credentials.client_email]
66
+ * @param {string} [options.credentials.private_key]
67
+ * @param {string} [options.email] - Account email address. Required when
68
+ * using a .pem or .p12 keyFilename.
69
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
70
+ * .p12 key downloaded from the Google Developers Console. If you provide
71
+ * a path to a JSON file, the projectId option below is not necessary.
72
+ * NOTE: .pem and .p12 require you to specify options.email as well.
73
+ * @param {number} [options.port] - The port on which to connect to
74
+ * the remote host.
75
+ * @param {string} [options.projectId] - The project ID from the Google
76
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
77
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
78
+ * app is running in an environment which supports
79
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
80
+ * your project ID will be detected automatically.
81
+ * @param {string} [options.apiEndpoint] - The domain name of the
82
+ * API remote host.
83
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
84
+ * Follows the structure of {@link gapicConfig}.
85
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
86
+ * For more information, please check the
87
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
88
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
89
+ * need to avoid loading the default gRPC version and want to use the fallback
90
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
91
+ * ```
92
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
93
+ * const client = new GeoTargetServiceClient({fallback: true}, gax);
94
+ * ```
95
+ */
96
+ constructor(opts, gaxInstance) {
97
+ // Ensure that options include all the required fields.
98
+ const staticMembers = this.constructor;
99
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
100
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
101
+ }
102
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
103
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
104
+ this._servicePath = 'admanager.' + this._universeDomain;
105
+ const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
106
+ this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
107
+ const port = opts?.port || staticMembers.port;
108
+ const clientConfig = opts?.clientConfig ?? {};
109
+ // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute).
110
+ if (!opts) {
111
+ opts = { fallback: true };
112
+ }
113
+ else {
114
+ opts.fallback = opts.fallback ?? true;
115
+ }
116
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
117
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
118
+ // Request numeric enum values if REST transport is used.
119
+ opts.numericEnums = true;
120
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
121
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
122
+ opts['scopes'] = staticMembers.scopes;
123
+ }
124
+ // Load google-gax module synchronously if needed
125
+ if (!gaxInstance) {
126
+ gaxInstance = require('google-gax');
127
+ }
128
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
129
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
130
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
131
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
132
+ // Save options to use in initialize() method.
133
+ this._opts = opts;
134
+ // Save the auth object to the client, for use by other methods.
135
+ this.auth = this._gaxGrpc.auth;
136
+ // Set useJWTAccessWithScope on the auth object.
137
+ this.auth.useJWTAccessWithScope = true;
138
+ // Set defaultServicePath on the auth object.
139
+ this.auth.defaultServicePath = this._servicePath;
140
+ // Set the default scopes in auth client if needed.
141
+ if (servicePath === this._servicePath) {
142
+ this.auth.defaultScopes = staticMembers.scopes;
143
+ }
144
+ // Determine the client header string.
145
+ const clientHeader = [
146
+ `gax/${this._gaxModule.version}`,
147
+ `gapic/${version}`,
148
+ ];
149
+ if (typeof process === 'object' && 'versions' in process) {
150
+ clientHeader.push(`gl-node/${process.versions.node}`);
151
+ }
152
+ else {
153
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
154
+ }
155
+ if (!opts.fallback) {
156
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
157
+ }
158
+ else {
159
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
160
+ }
161
+ if (opts.libName && opts.libVersion) {
162
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
163
+ }
164
+ // Load the applicable protos.
165
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
166
+ // This API contains "path templates"; forward-slash-separated
167
+ // identifiers to uniquely identify resources within the API.
168
+ // Create useful helper objects for these.
169
+ this.pathTemplates = {
170
+ adBreakPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}'),
171
+ adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
172
+ bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/bandwidthGroups/{bandwidth_group}'),
173
+ companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
174
+ contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
175
+ customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
176
+ customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
177
+ customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingValues/{custom_targeting_value}'),
178
+ deviceCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceCategories/{device_category}'),
179
+ entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}'),
180
+ geoTargetPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/geoTargets/{geo_target}'),
181
+ labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
182
+ liveStreamEventPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEvents/{live_stream_event}'),
183
+ networkPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}'),
184
+ operatingSystemPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystems/{operating_system}'),
185
+ operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystemVersions/{operating_system_version}'),
186
+ orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
187
+ placementPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/placements/{placement}'),
188
+ privateAuctionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctions/{private_auction}'),
189
+ privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctionDeals/{private_auction_deal}'),
190
+ programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/programmaticBuyers/{programmatic_buyer}'),
191
+ reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
192
+ rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
193
+ taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
194
+ teamPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/teams/{team}'),
195
+ userPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/users/{user}'),
196
+ };
197
+ // Some of the methods on this service return "paged" results,
198
+ // (e.g. 50 results at a time, with tokens to get subsequent
199
+ // pages). Denote the keys used for pagination and results.
200
+ this.descriptors.page = {
201
+ listGeoTargets: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'geoTargets')
202
+ };
203
+ // Put together the default options sent with requests.
204
+ this._defaults = this._gaxGrpc.constructSettings('google.ads.admanager.v1.GeoTargetService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
205
+ // Set up a dictionary of "inner API calls"; the core implementation
206
+ // of calling the API is handled in `google-gax`, with this code
207
+ // merely providing the destination and request information.
208
+ this.innerApiCalls = {};
209
+ // Add a warn function to the client constructor so it can be easily tested.
210
+ this.warn = this._gaxModule.warn;
211
+ }
212
+ /**
213
+ * Initialize the client.
214
+ * Performs asynchronous operations (such as authentication) and prepares the client.
215
+ * This function will be called automatically when any class method is called for the
216
+ * first time, but if you need to initialize it before calling an actual method,
217
+ * feel free to call initialize() directly.
218
+ *
219
+ * You can await on this method if you want to make sure the client is initialized.
220
+ *
221
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
222
+ */
223
+ initialize() {
224
+ // If the client stub promise is already initialized, return immediately.
225
+ if (this.geoTargetServiceStub) {
226
+ return this.geoTargetServiceStub;
227
+ }
228
+ // Put together the "service stub" for
229
+ // google.ads.admanager.v1.GeoTargetService.
230
+ this.geoTargetServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
231
+ this._protos.lookupService('google.ads.admanager.v1.GeoTargetService') :
232
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
233
+ this._protos.google.ads.admanager.v1.GeoTargetService, this._opts, this._providedCustomServicePath);
234
+ // Iterate over each of the methods that the service provides
235
+ // and create an API call method for each.
236
+ const geoTargetServiceStubMethods = ['getGeoTarget', 'listGeoTargets'];
237
+ for (const methodName of geoTargetServiceStubMethods) {
238
+ const callPromise = this.geoTargetServiceStub.then(stub => (...args) => {
239
+ if (this._terminated) {
240
+ return Promise.reject('The client has already been closed.');
241
+ }
242
+ const func = stub[methodName];
243
+ return func.apply(stub, args);
244
+ }, (err) => () => {
245
+ throw err;
246
+ });
247
+ const descriptor = this.descriptors.page[methodName] ||
248
+ undefined;
249
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
250
+ this.innerApiCalls[methodName] = apiCall;
251
+ }
252
+ return this.geoTargetServiceStub;
253
+ }
254
+ /**
255
+ * The DNS address for this API service.
256
+ * @deprecated Use the apiEndpoint method of the client instance.
257
+ * @returns {string} The DNS address for this service.
258
+ */
259
+ static get servicePath() {
260
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
261
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
262
+ }
263
+ return 'admanager.googleapis.com';
264
+ }
265
+ /**
266
+ * The DNS address for this API service - same as servicePath.
267
+ * @deprecated Use the apiEndpoint method of the client instance.
268
+ * @returns {string} The DNS address for this service.
269
+ */
270
+ static get apiEndpoint() {
271
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
272
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
273
+ }
274
+ return 'admanager.googleapis.com';
275
+ }
276
+ /**
277
+ * The DNS address for this API service.
278
+ * @returns {string} The DNS address for this service.
279
+ */
280
+ get apiEndpoint() {
281
+ return this._servicePath;
282
+ }
283
+ get universeDomain() {
284
+ return this._universeDomain;
285
+ }
286
+ /**
287
+ * The port for this API service.
288
+ * @returns {number} The default port for this service.
289
+ */
290
+ static get port() {
291
+ return 443;
292
+ }
293
+ /**
294
+ * The scopes needed to make gRPC calls for every method defined
295
+ * in this service.
296
+ * @returns {string[]} List of default scopes.
297
+ */
298
+ static get scopes() {
299
+ return [
300
+ 'https://www.googleapis.com/auth/admanager'
301
+ ];
302
+ }
303
+ /**
304
+ * Return the project ID used by this class.
305
+ * @returns {Promise} A promise that resolves to string containing the project ID.
306
+ */
307
+ getProjectId(callback) {
308
+ if (callback) {
309
+ this.auth.getProjectId(callback);
310
+ return;
311
+ }
312
+ return this.auth.getProjectId();
313
+ }
314
+ getGeoTarget(request, optionsOrCallback, callback) {
315
+ request = request || {};
316
+ let options;
317
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
318
+ callback = optionsOrCallback;
319
+ options = {};
320
+ }
321
+ else {
322
+ options = optionsOrCallback;
323
+ }
324
+ options = options || {};
325
+ options.otherArgs = options.otherArgs || {};
326
+ options.otherArgs.headers = options.otherArgs.headers || {};
327
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
328
+ 'name': request.name ?? '',
329
+ });
330
+ this.initialize().catch(err => { throw err; });
331
+ this._log.info('getGeoTarget request %j', request);
332
+ const wrappedCallback = callback
333
+ ? (error, response, options, rawResponse) => {
334
+ this._log.info('getGeoTarget response %j', response);
335
+ callback(error, response, options, rawResponse); // We verified callback above.
336
+ }
337
+ : undefined;
338
+ return this.innerApiCalls.getGeoTarget(request, options, wrappedCallback)
339
+ ?.then(([response, options, rawResponse]) => {
340
+ this._log.info('getGeoTarget response %j', response);
341
+ return [response, options, rawResponse];
342
+ }).catch((error) => {
343
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
344
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
345
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
346
+ }
347
+ throw error;
348
+ });
349
+ }
350
+ listGeoTargets(request, optionsOrCallback, callback) {
351
+ request = request || {};
352
+ let options;
353
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
354
+ callback = optionsOrCallback;
355
+ options = {};
356
+ }
357
+ else {
358
+ options = optionsOrCallback;
359
+ }
360
+ options = options || {};
361
+ options.otherArgs = options.otherArgs || {};
362
+ options.otherArgs.headers = options.otherArgs.headers || {};
363
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
364
+ 'parent': request.parent ?? '',
365
+ });
366
+ this.initialize().catch(err => { throw err; });
367
+ const wrappedCallback = callback
368
+ ? (error, values, nextPageRequest, rawResponse) => {
369
+ this._log.info('listGeoTargets values %j', values);
370
+ callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
371
+ }
372
+ : undefined;
373
+ this._log.info('listGeoTargets request %j', request);
374
+ return this.innerApiCalls
375
+ .listGeoTargets(request, options, wrappedCallback)
376
+ ?.then(([response, input, output]) => {
377
+ this._log.info('listGeoTargets values %j', response);
378
+ return [response, input, output];
379
+ });
380
+ }
381
+ /**
382
+ * Equivalent to `listGeoTargets`, but returns a NodeJS Stream object.
383
+ * @param {Object} request
384
+ * The request object that will be sent.
385
+ * @param {string} request.parent
386
+ * Required. The parent, which owns this collection of GeoTargets.
387
+ * Format: `networks/{network_code}`
388
+ * @param {number} [request.pageSize]
389
+ * Optional. The maximum number of `GeoTargets` to return. The service may
390
+ * return fewer than this value. If unspecified, at most 50 `GeoTargets` will
391
+ * be returned. The maximum value is 1000; values above 1000 will be coerced
392
+ * to 1000.
393
+ * @param {string} [request.pageToken]
394
+ * Optional. A page token, received from a previous `ListGeoTargets` call.
395
+ * Provide this to retrieve the subsequent page.
396
+ *
397
+ * When paginating, all other parameters provided to `ListGeoTargets` must
398
+ * match the call that provided the page token.
399
+ * @param {string} [request.filter]
400
+ * Optional. Expression to filter the response.
401
+ * See syntax details at
402
+ * https://developers.google.com/ad-manager/api/beta/filters
403
+ * @param {string} [request.orderBy]
404
+ * Optional. Expression to specify sorting order.
405
+ * See syntax details at
406
+ * https://developers.google.com/ad-manager/api/beta/filters#order
407
+ * @param {number} [request.skip]
408
+ * Optional. Number of individual resources to skip while paginating.
409
+ * @param {object} [options]
410
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
411
+ * @returns {Stream}
412
+ * An object stream which emits an object representing {@link protos.google.ads.admanager.v1.GeoTarget|GeoTarget} on 'data' event.
413
+ * The client library will perform auto-pagination by default: it will call the API as many
414
+ * times as needed. Note that it can affect your quota.
415
+ * We recommend using `listGeoTargetsAsync()`
416
+ * method described below for async iteration which you can stop as needed.
417
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
418
+ * for more details and examples.
419
+ */
420
+ listGeoTargetsStream(request, options) {
421
+ request = request || {};
422
+ options = options || {};
423
+ options.otherArgs = options.otherArgs || {};
424
+ options.otherArgs.headers = options.otherArgs.headers || {};
425
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
426
+ 'parent': request.parent ?? '',
427
+ });
428
+ const defaultCallSettings = this._defaults['listGeoTargets'];
429
+ const callSettings = defaultCallSettings.merge(options);
430
+ this.initialize().catch(err => { throw err; });
431
+ this._log.info('listGeoTargets stream %j', request);
432
+ return this.descriptors.page.listGeoTargets.createStream(this.innerApiCalls.listGeoTargets, request, callSettings);
433
+ }
434
+ /**
435
+ * Equivalent to `listGeoTargets`, but returns an iterable object.
436
+ *
437
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
438
+ * @param {Object} request
439
+ * The request object that will be sent.
440
+ * @param {string} request.parent
441
+ * Required. The parent, which owns this collection of GeoTargets.
442
+ * Format: `networks/{network_code}`
443
+ * @param {number} [request.pageSize]
444
+ * Optional. The maximum number of `GeoTargets` to return. The service may
445
+ * return fewer than this value. If unspecified, at most 50 `GeoTargets` will
446
+ * be returned. The maximum value is 1000; values above 1000 will be coerced
447
+ * to 1000.
448
+ * @param {string} [request.pageToken]
449
+ * Optional. A page token, received from a previous `ListGeoTargets` call.
450
+ * Provide this to retrieve the subsequent page.
451
+ *
452
+ * When paginating, all other parameters provided to `ListGeoTargets` must
453
+ * match the call that provided the page token.
454
+ * @param {string} [request.filter]
455
+ * Optional. Expression to filter the response.
456
+ * See syntax details at
457
+ * https://developers.google.com/ad-manager/api/beta/filters
458
+ * @param {string} [request.orderBy]
459
+ * Optional. Expression to specify sorting order.
460
+ * See syntax details at
461
+ * https://developers.google.com/ad-manager/api/beta/filters#order
462
+ * @param {number} [request.skip]
463
+ * Optional. Number of individual resources to skip while paginating.
464
+ * @param {object} [options]
465
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
466
+ * @returns {Object}
467
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
468
+ * When you iterate the returned iterable, each element will be an object representing
469
+ * {@link protos.google.ads.admanager.v1.GeoTarget|GeoTarget}. The API will be called under the hood as needed, once per the page,
470
+ * so you can stop the iteration when you don't need more results.
471
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
472
+ * for more details and examples.
473
+ * @example <caption>include:samples/generated/v1/geo_target_service.list_geo_targets.js</caption>
474
+ * region_tag:admanager_v1_generated_GeoTargetService_ListGeoTargets_async
475
+ */
476
+ listGeoTargetsAsync(request, options) {
477
+ request = request || {};
478
+ options = options || {};
479
+ options.otherArgs = options.otherArgs || {};
480
+ options.otherArgs.headers = options.otherArgs.headers || {};
481
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
482
+ 'parent': request.parent ?? '',
483
+ });
484
+ const defaultCallSettings = this._defaults['listGeoTargets'];
485
+ const callSettings = defaultCallSettings.merge(options);
486
+ this.initialize().catch(err => { throw err; });
487
+ this._log.info('listGeoTargets iterate %j', request);
488
+ return this.descriptors.page.listGeoTargets.asyncIterate(this.innerApiCalls['listGeoTargets'], request, callSettings);
489
+ }
490
+ // --------------------
491
+ // -- Path templates --
492
+ // --------------------
493
+ /**
494
+ * Return a fully-qualified adBreak resource name string.
495
+ *
496
+ * @param {string} network_code
497
+ * @param {string} asset_key
498
+ * @param {string} ad_break
499
+ * @returns {string} Resource name string.
500
+ */
501
+ adBreakPath(networkCode, assetKey, adBreak) {
502
+ return this.pathTemplates.adBreakPathTemplate.render({
503
+ network_code: networkCode,
504
+ asset_key: assetKey,
505
+ ad_break: adBreak,
506
+ });
507
+ }
508
+ /**
509
+ * Parse the network_code from AdBreak resource.
510
+ *
511
+ * @param {string} adBreakName
512
+ * A fully-qualified path representing AdBreak resource.
513
+ * @returns {string} A string representing the network_code.
514
+ */
515
+ matchNetworkCodeFromAdBreakName(adBreakName) {
516
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code;
517
+ }
518
+ /**
519
+ * Parse the asset_key from AdBreak resource.
520
+ *
521
+ * @param {string} adBreakName
522
+ * A fully-qualified path representing AdBreak resource.
523
+ * @returns {string} A string representing the asset_key.
524
+ */
525
+ matchAssetKeyFromAdBreakName(adBreakName) {
526
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key;
527
+ }
528
+ /**
529
+ * Parse the ad_break from AdBreak resource.
530
+ *
531
+ * @param {string} adBreakName
532
+ * A fully-qualified path representing AdBreak resource.
533
+ * @returns {string} A string representing the ad_break.
534
+ */
535
+ matchAdBreakFromAdBreakName(adBreakName) {
536
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break;
537
+ }
538
+ /**
539
+ * Return a fully-qualified adUnit resource name string.
540
+ *
541
+ * @param {string} network_code
542
+ * @param {string} ad_unit
543
+ * @returns {string} Resource name string.
544
+ */
545
+ adUnitPath(networkCode, adUnit) {
546
+ return this.pathTemplates.adUnitPathTemplate.render({
547
+ network_code: networkCode,
548
+ ad_unit: adUnit,
549
+ });
550
+ }
551
+ /**
552
+ * Parse the network_code from AdUnit resource.
553
+ *
554
+ * @param {string} adUnitName
555
+ * A fully-qualified path representing AdUnit resource.
556
+ * @returns {string} A string representing the network_code.
557
+ */
558
+ matchNetworkCodeFromAdUnitName(adUnitName) {
559
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code;
560
+ }
561
+ /**
562
+ * Parse the ad_unit from AdUnit resource.
563
+ *
564
+ * @param {string} adUnitName
565
+ * A fully-qualified path representing AdUnit resource.
566
+ * @returns {string} A string representing the ad_unit.
567
+ */
568
+ matchAdUnitFromAdUnitName(adUnitName) {
569
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
570
+ }
571
+ /**
572
+ * Return a fully-qualified bandwidthGroup resource name string.
573
+ *
574
+ * @param {string} network_code
575
+ * @param {string} bandwidth_group
576
+ * @returns {string} Resource name string.
577
+ */
578
+ bandwidthGroupPath(networkCode, bandwidthGroup) {
579
+ return this.pathTemplates.bandwidthGroupPathTemplate.render({
580
+ network_code: networkCode,
581
+ bandwidth_group: bandwidthGroup,
582
+ });
583
+ }
584
+ /**
585
+ * Parse the network_code from BandwidthGroup resource.
586
+ *
587
+ * @param {string} bandwidthGroupName
588
+ * A fully-qualified path representing BandwidthGroup resource.
589
+ * @returns {string} A string representing the network_code.
590
+ */
591
+ matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName) {
592
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code;
593
+ }
594
+ /**
595
+ * Parse the bandwidth_group from BandwidthGroup resource.
596
+ *
597
+ * @param {string} bandwidthGroupName
598
+ * A fully-qualified path representing BandwidthGroup resource.
599
+ * @returns {string} A string representing the bandwidth_group.
600
+ */
601
+ matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName) {
602
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group;
603
+ }
604
+ /**
605
+ * Return a fully-qualified company resource name string.
606
+ *
607
+ * @param {string} network_code
608
+ * @param {string} company
609
+ * @returns {string} Resource name string.
610
+ */
611
+ companyPath(networkCode, company) {
612
+ return this.pathTemplates.companyPathTemplate.render({
613
+ network_code: networkCode,
614
+ company: company,
615
+ });
616
+ }
617
+ /**
618
+ * Parse the network_code from Company resource.
619
+ *
620
+ * @param {string} companyName
621
+ * A fully-qualified path representing Company resource.
622
+ * @returns {string} A string representing the network_code.
623
+ */
624
+ matchNetworkCodeFromCompanyName(companyName) {
625
+ return this.pathTemplates.companyPathTemplate.match(companyName).network_code;
626
+ }
627
+ /**
628
+ * Parse the company from Company resource.
629
+ *
630
+ * @param {string} companyName
631
+ * A fully-qualified path representing Company resource.
632
+ * @returns {string} A string representing the company.
633
+ */
634
+ matchCompanyFromCompanyName(companyName) {
635
+ return this.pathTemplates.companyPathTemplate.match(companyName).company;
636
+ }
637
+ /**
638
+ * Return a fully-qualified contact resource name string.
639
+ *
640
+ * @param {string} network_code
641
+ * @param {string} contact
642
+ * @returns {string} Resource name string.
643
+ */
644
+ contactPath(networkCode, contact) {
645
+ return this.pathTemplates.contactPathTemplate.render({
646
+ network_code: networkCode,
647
+ contact: contact,
648
+ });
649
+ }
650
+ /**
651
+ * Parse the network_code from Contact resource.
652
+ *
653
+ * @param {string} contactName
654
+ * A fully-qualified path representing Contact resource.
655
+ * @returns {string} A string representing the network_code.
656
+ */
657
+ matchNetworkCodeFromContactName(contactName) {
658
+ return this.pathTemplates.contactPathTemplate.match(contactName).network_code;
659
+ }
660
+ /**
661
+ * Parse the contact from Contact resource.
662
+ *
663
+ * @param {string} contactName
664
+ * A fully-qualified path representing Contact resource.
665
+ * @returns {string} A string representing the contact.
666
+ */
667
+ matchContactFromContactName(contactName) {
668
+ return this.pathTemplates.contactPathTemplate.match(contactName).contact;
669
+ }
670
+ /**
671
+ * Return a fully-qualified customField resource name string.
672
+ *
673
+ * @param {string} network_code
674
+ * @param {string} custom_field
675
+ * @returns {string} Resource name string.
676
+ */
677
+ customFieldPath(networkCode, customField) {
678
+ return this.pathTemplates.customFieldPathTemplate.render({
679
+ network_code: networkCode,
680
+ custom_field: customField,
681
+ });
682
+ }
683
+ /**
684
+ * Parse the network_code from CustomField resource.
685
+ *
686
+ * @param {string} customFieldName
687
+ * A fully-qualified path representing CustomField resource.
688
+ * @returns {string} A string representing the network_code.
689
+ */
690
+ matchNetworkCodeFromCustomFieldName(customFieldName) {
691
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code;
692
+ }
693
+ /**
694
+ * Parse the custom_field from CustomField resource.
695
+ *
696
+ * @param {string} customFieldName
697
+ * A fully-qualified path representing CustomField resource.
698
+ * @returns {string} A string representing the custom_field.
699
+ */
700
+ matchCustomFieldFromCustomFieldName(customFieldName) {
701
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field;
702
+ }
703
+ /**
704
+ * Return a fully-qualified customTargetingKey resource name string.
705
+ *
706
+ * @param {string} network_code
707
+ * @param {string} custom_targeting_key
708
+ * @returns {string} Resource name string.
709
+ */
710
+ customTargetingKeyPath(networkCode, customTargetingKey) {
711
+ return this.pathTemplates.customTargetingKeyPathTemplate.render({
712
+ network_code: networkCode,
713
+ custom_targeting_key: customTargetingKey,
714
+ });
715
+ }
716
+ /**
717
+ * Parse the network_code from CustomTargetingKey resource.
718
+ *
719
+ * @param {string} customTargetingKeyName
720
+ * A fully-qualified path representing CustomTargetingKey resource.
721
+ * @returns {string} A string representing the network_code.
722
+ */
723
+ matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName) {
724
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code;
725
+ }
726
+ /**
727
+ * Parse the custom_targeting_key from CustomTargetingKey resource.
728
+ *
729
+ * @param {string} customTargetingKeyName
730
+ * A fully-qualified path representing CustomTargetingKey resource.
731
+ * @returns {string} A string representing the custom_targeting_key.
732
+ */
733
+ matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName) {
734
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key;
735
+ }
736
+ /**
737
+ * Return a fully-qualified customTargetingValue resource name string.
738
+ *
739
+ * @param {string} network_code
740
+ * @param {string} custom_targeting_value
741
+ * @returns {string} Resource name string.
742
+ */
743
+ customTargetingValuePath(networkCode, customTargetingValue) {
744
+ return this.pathTemplates.customTargetingValuePathTemplate.render({
745
+ network_code: networkCode,
746
+ custom_targeting_value: customTargetingValue,
747
+ });
748
+ }
749
+ /**
750
+ * Parse the network_code from CustomTargetingValue resource.
751
+ *
752
+ * @param {string} customTargetingValueName
753
+ * A fully-qualified path representing CustomTargetingValue resource.
754
+ * @returns {string} A string representing the network_code.
755
+ */
756
+ matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
757
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
758
+ }
759
+ /**
760
+ * Parse the custom_targeting_value from CustomTargetingValue resource.
761
+ *
762
+ * @param {string} customTargetingValueName
763
+ * A fully-qualified path representing CustomTargetingValue resource.
764
+ * @returns {string} A string representing the custom_targeting_value.
765
+ */
766
+ matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
767
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
768
+ }
769
+ /**
770
+ * Return a fully-qualified deviceCategory resource name string.
771
+ *
772
+ * @param {string} network_code
773
+ * @param {string} device_category
774
+ * @returns {string} Resource name string.
775
+ */
776
+ deviceCategoryPath(networkCode, deviceCategory) {
777
+ return this.pathTemplates.deviceCategoryPathTemplate.render({
778
+ network_code: networkCode,
779
+ device_category: deviceCategory,
780
+ });
781
+ }
782
+ /**
783
+ * Parse the network_code from DeviceCategory resource.
784
+ *
785
+ * @param {string} deviceCategoryName
786
+ * A fully-qualified path representing DeviceCategory resource.
787
+ * @returns {string} A string representing the network_code.
788
+ */
789
+ matchNetworkCodeFromDeviceCategoryName(deviceCategoryName) {
790
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code;
791
+ }
792
+ /**
793
+ * Parse the device_category from DeviceCategory resource.
794
+ *
795
+ * @param {string} deviceCategoryName
796
+ * A fully-qualified path representing DeviceCategory resource.
797
+ * @returns {string} A string representing the device_category.
798
+ */
799
+ matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName) {
800
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category;
801
+ }
802
+ /**
803
+ * Return a fully-qualified entitySignalsMapping resource name string.
804
+ *
805
+ * @param {string} network_code
806
+ * @param {string} entity_signals_mapping
807
+ * @returns {string} Resource name string.
808
+ */
809
+ entitySignalsMappingPath(networkCode, entitySignalsMapping) {
810
+ return this.pathTemplates.entitySignalsMappingPathTemplate.render({
811
+ network_code: networkCode,
812
+ entity_signals_mapping: entitySignalsMapping,
813
+ });
814
+ }
815
+ /**
816
+ * Parse the network_code from EntitySignalsMapping resource.
817
+ *
818
+ * @param {string} entitySignalsMappingName
819
+ * A fully-qualified path representing EntitySignalsMapping resource.
820
+ * @returns {string} A string representing the network_code.
821
+ */
822
+ matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName) {
823
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code;
824
+ }
825
+ /**
826
+ * Parse the entity_signals_mapping from EntitySignalsMapping resource.
827
+ *
828
+ * @param {string} entitySignalsMappingName
829
+ * A fully-qualified path representing EntitySignalsMapping resource.
830
+ * @returns {string} A string representing the entity_signals_mapping.
831
+ */
832
+ matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
833
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
834
+ }
835
+ /**
836
+ * Return a fully-qualified geoTarget resource name string.
837
+ *
838
+ * @param {string} network_code
839
+ * @param {string} geo_target
840
+ * @returns {string} Resource name string.
841
+ */
842
+ geoTargetPath(networkCode, geoTarget) {
843
+ return this.pathTemplates.geoTargetPathTemplate.render({
844
+ network_code: networkCode,
845
+ geo_target: geoTarget,
846
+ });
847
+ }
848
+ /**
849
+ * Parse the network_code from GeoTarget resource.
850
+ *
851
+ * @param {string} geoTargetName
852
+ * A fully-qualified path representing GeoTarget resource.
853
+ * @returns {string} A string representing the network_code.
854
+ */
855
+ matchNetworkCodeFromGeoTargetName(geoTargetName) {
856
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code;
857
+ }
858
+ /**
859
+ * Parse the geo_target from GeoTarget resource.
860
+ *
861
+ * @param {string} geoTargetName
862
+ * A fully-qualified path representing GeoTarget resource.
863
+ * @returns {string} A string representing the geo_target.
864
+ */
865
+ matchGeoTargetFromGeoTargetName(geoTargetName) {
866
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target;
867
+ }
868
+ /**
869
+ * Return a fully-qualified label resource name string.
870
+ *
871
+ * @param {string} network_code
872
+ * @param {string} label
873
+ * @returns {string} Resource name string.
874
+ */
875
+ labelPath(networkCode, label) {
876
+ return this.pathTemplates.labelPathTemplate.render({
877
+ network_code: networkCode,
878
+ label: label,
879
+ });
880
+ }
881
+ /**
882
+ * Parse the network_code from Label resource.
883
+ *
884
+ * @param {string} labelName
885
+ * A fully-qualified path representing Label resource.
886
+ * @returns {string} A string representing the network_code.
887
+ */
888
+ matchNetworkCodeFromLabelName(labelName) {
889
+ return this.pathTemplates.labelPathTemplate.match(labelName).network_code;
890
+ }
891
+ /**
892
+ * Parse the label from Label resource.
893
+ *
894
+ * @param {string} labelName
895
+ * A fully-qualified path representing Label resource.
896
+ * @returns {string} A string representing the label.
897
+ */
898
+ matchLabelFromLabelName(labelName) {
899
+ return this.pathTemplates.labelPathTemplate.match(labelName).label;
900
+ }
901
+ /**
902
+ * Return a fully-qualified liveStreamEvent resource name string.
903
+ *
904
+ * @param {string} network_code
905
+ * @param {string} live_stream_event
906
+ * @returns {string} Resource name string.
907
+ */
908
+ liveStreamEventPath(networkCode, liveStreamEvent) {
909
+ return this.pathTemplates.liveStreamEventPathTemplate.render({
910
+ network_code: networkCode,
911
+ live_stream_event: liveStreamEvent,
912
+ });
913
+ }
914
+ /**
915
+ * Parse the network_code from LiveStreamEvent resource.
916
+ *
917
+ * @param {string} liveStreamEventName
918
+ * A fully-qualified path representing LiveStreamEvent resource.
919
+ * @returns {string} A string representing the network_code.
920
+ */
921
+ matchNetworkCodeFromLiveStreamEventName(liveStreamEventName) {
922
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code;
923
+ }
924
+ /**
925
+ * Parse the live_stream_event from LiveStreamEvent resource.
926
+ *
927
+ * @param {string} liveStreamEventName
928
+ * A fully-qualified path representing LiveStreamEvent resource.
929
+ * @returns {string} A string representing the live_stream_event.
930
+ */
931
+ matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName) {
932
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event;
933
+ }
934
+ /**
935
+ * Return a fully-qualified network resource name string.
936
+ *
937
+ * @param {string} network_code
938
+ * @returns {string} Resource name string.
939
+ */
940
+ networkPath(networkCode) {
941
+ return this.pathTemplates.networkPathTemplate.render({
942
+ network_code: networkCode,
943
+ });
944
+ }
945
+ /**
946
+ * Parse the network_code from Network resource.
947
+ *
948
+ * @param {string} networkName
949
+ * A fully-qualified path representing Network resource.
950
+ * @returns {string} A string representing the network_code.
951
+ */
952
+ matchNetworkCodeFromNetworkName(networkName) {
953
+ return this.pathTemplates.networkPathTemplate.match(networkName).network_code;
954
+ }
955
+ /**
956
+ * Return a fully-qualified operatingSystem resource name string.
957
+ *
958
+ * @param {string} network_code
959
+ * @param {string} operating_system
960
+ * @returns {string} Resource name string.
961
+ */
962
+ operatingSystemPath(networkCode, operatingSystem) {
963
+ return this.pathTemplates.operatingSystemPathTemplate.render({
964
+ network_code: networkCode,
965
+ operating_system: operatingSystem,
966
+ });
967
+ }
968
+ /**
969
+ * Parse the network_code from OperatingSystem resource.
970
+ *
971
+ * @param {string} operatingSystemName
972
+ * A fully-qualified path representing OperatingSystem resource.
973
+ * @returns {string} A string representing the network_code.
974
+ */
975
+ matchNetworkCodeFromOperatingSystemName(operatingSystemName) {
976
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code;
977
+ }
978
+ /**
979
+ * Parse the operating_system from OperatingSystem resource.
980
+ *
981
+ * @param {string} operatingSystemName
982
+ * A fully-qualified path representing OperatingSystem resource.
983
+ * @returns {string} A string representing the operating_system.
984
+ */
985
+ matchOperatingSystemFromOperatingSystemName(operatingSystemName) {
986
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system;
987
+ }
988
+ /**
989
+ * Return a fully-qualified operatingSystemVersion resource name string.
990
+ *
991
+ * @param {string} network_code
992
+ * @param {string} operating_system_version
993
+ * @returns {string} Resource name string.
994
+ */
995
+ operatingSystemVersionPath(networkCode, operatingSystemVersion) {
996
+ return this.pathTemplates.operatingSystemVersionPathTemplate.render({
997
+ network_code: networkCode,
998
+ operating_system_version: operatingSystemVersion,
999
+ });
1000
+ }
1001
+ /**
1002
+ * Parse the network_code from OperatingSystemVersion resource.
1003
+ *
1004
+ * @param {string} operatingSystemVersionName
1005
+ * A fully-qualified path representing OperatingSystemVersion resource.
1006
+ * @returns {string} A string representing the network_code.
1007
+ */
1008
+ matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName) {
1009
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code;
1010
+ }
1011
+ /**
1012
+ * Parse the operating_system_version from OperatingSystemVersion resource.
1013
+ *
1014
+ * @param {string} operatingSystemVersionName
1015
+ * A fully-qualified path representing OperatingSystemVersion resource.
1016
+ * @returns {string} A string representing the operating_system_version.
1017
+ */
1018
+ matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName) {
1019
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version;
1020
+ }
1021
+ /**
1022
+ * Return a fully-qualified order resource name string.
1023
+ *
1024
+ * @param {string} network_code
1025
+ * @param {string} order
1026
+ * @returns {string} Resource name string.
1027
+ */
1028
+ orderPath(networkCode, order) {
1029
+ return this.pathTemplates.orderPathTemplate.render({
1030
+ network_code: networkCode,
1031
+ order: order,
1032
+ });
1033
+ }
1034
+ /**
1035
+ * Parse the network_code from Order resource.
1036
+ *
1037
+ * @param {string} orderName
1038
+ * A fully-qualified path representing Order resource.
1039
+ * @returns {string} A string representing the network_code.
1040
+ */
1041
+ matchNetworkCodeFromOrderName(orderName) {
1042
+ return this.pathTemplates.orderPathTemplate.match(orderName).network_code;
1043
+ }
1044
+ /**
1045
+ * Parse the order from Order resource.
1046
+ *
1047
+ * @param {string} orderName
1048
+ * A fully-qualified path representing Order resource.
1049
+ * @returns {string} A string representing the order.
1050
+ */
1051
+ matchOrderFromOrderName(orderName) {
1052
+ return this.pathTemplates.orderPathTemplate.match(orderName).order;
1053
+ }
1054
+ /**
1055
+ * Return a fully-qualified placement resource name string.
1056
+ *
1057
+ * @param {string} network_code
1058
+ * @param {string} placement
1059
+ * @returns {string} Resource name string.
1060
+ */
1061
+ placementPath(networkCode, placement) {
1062
+ return this.pathTemplates.placementPathTemplate.render({
1063
+ network_code: networkCode,
1064
+ placement: placement,
1065
+ });
1066
+ }
1067
+ /**
1068
+ * Parse the network_code from Placement resource.
1069
+ *
1070
+ * @param {string} placementName
1071
+ * A fully-qualified path representing Placement resource.
1072
+ * @returns {string} A string representing the network_code.
1073
+ */
1074
+ matchNetworkCodeFromPlacementName(placementName) {
1075
+ return this.pathTemplates.placementPathTemplate.match(placementName).network_code;
1076
+ }
1077
+ /**
1078
+ * Parse the placement from Placement resource.
1079
+ *
1080
+ * @param {string} placementName
1081
+ * A fully-qualified path representing Placement resource.
1082
+ * @returns {string} A string representing the placement.
1083
+ */
1084
+ matchPlacementFromPlacementName(placementName) {
1085
+ return this.pathTemplates.placementPathTemplate.match(placementName).placement;
1086
+ }
1087
+ /**
1088
+ * Return a fully-qualified privateAuction resource name string.
1089
+ *
1090
+ * @param {string} network_code
1091
+ * @param {string} private_auction
1092
+ * @returns {string} Resource name string.
1093
+ */
1094
+ privateAuctionPath(networkCode, privateAuction) {
1095
+ return this.pathTemplates.privateAuctionPathTemplate.render({
1096
+ network_code: networkCode,
1097
+ private_auction: privateAuction,
1098
+ });
1099
+ }
1100
+ /**
1101
+ * Parse the network_code from PrivateAuction resource.
1102
+ *
1103
+ * @param {string} privateAuctionName
1104
+ * A fully-qualified path representing PrivateAuction resource.
1105
+ * @returns {string} A string representing the network_code.
1106
+ */
1107
+ matchNetworkCodeFromPrivateAuctionName(privateAuctionName) {
1108
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code;
1109
+ }
1110
+ /**
1111
+ * Parse the private_auction from PrivateAuction resource.
1112
+ *
1113
+ * @param {string} privateAuctionName
1114
+ * A fully-qualified path representing PrivateAuction resource.
1115
+ * @returns {string} A string representing the private_auction.
1116
+ */
1117
+ matchPrivateAuctionFromPrivateAuctionName(privateAuctionName) {
1118
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction;
1119
+ }
1120
+ /**
1121
+ * Return a fully-qualified privateAuctionDeal resource name string.
1122
+ *
1123
+ * @param {string} network_code
1124
+ * @param {string} private_auction_deal
1125
+ * @returns {string} Resource name string.
1126
+ */
1127
+ privateAuctionDealPath(networkCode, privateAuctionDeal) {
1128
+ return this.pathTemplates.privateAuctionDealPathTemplate.render({
1129
+ network_code: networkCode,
1130
+ private_auction_deal: privateAuctionDeal,
1131
+ });
1132
+ }
1133
+ /**
1134
+ * Parse the network_code from PrivateAuctionDeal resource.
1135
+ *
1136
+ * @param {string} privateAuctionDealName
1137
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1138
+ * @returns {string} A string representing the network_code.
1139
+ */
1140
+ matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName) {
1141
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code;
1142
+ }
1143
+ /**
1144
+ * Parse the private_auction_deal from PrivateAuctionDeal resource.
1145
+ *
1146
+ * @param {string} privateAuctionDealName
1147
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1148
+ * @returns {string} A string representing the private_auction_deal.
1149
+ */
1150
+ matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName) {
1151
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal;
1152
+ }
1153
+ /**
1154
+ * Return a fully-qualified programmaticBuyer resource name string.
1155
+ *
1156
+ * @param {string} network_code
1157
+ * @param {string} programmatic_buyer
1158
+ * @returns {string} Resource name string.
1159
+ */
1160
+ programmaticBuyerPath(networkCode, programmaticBuyer) {
1161
+ return this.pathTemplates.programmaticBuyerPathTemplate.render({
1162
+ network_code: networkCode,
1163
+ programmatic_buyer: programmaticBuyer,
1164
+ });
1165
+ }
1166
+ /**
1167
+ * Parse the network_code from ProgrammaticBuyer resource.
1168
+ *
1169
+ * @param {string} programmaticBuyerName
1170
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1171
+ * @returns {string} A string representing the network_code.
1172
+ */
1173
+ matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName) {
1174
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code;
1175
+ }
1176
+ /**
1177
+ * Parse the programmatic_buyer from ProgrammaticBuyer resource.
1178
+ *
1179
+ * @param {string} programmaticBuyerName
1180
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1181
+ * @returns {string} A string representing the programmatic_buyer.
1182
+ */
1183
+ matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName) {
1184
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer;
1185
+ }
1186
+ /**
1187
+ * Return a fully-qualified report resource name string.
1188
+ *
1189
+ * @param {string} network_code
1190
+ * @param {string} report
1191
+ * @returns {string} Resource name string.
1192
+ */
1193
+ reportPath(networkCode, report) {
1194
+ return this.pathTemplates.reportPathTemplate.render({
1195
+ network_code: networkCode,
1196
+ report: report,
1197
+ });
1198
+ }
1199
+ /**
1200
+ * Parse the network_code from Report resource.
1201
+ *
1202
+ * @param {string} reportName
1203
+ * A fully-qualified path representing Report resource.
1204
+ * @returns {string} A string representing the network_code.
1205
+ */
1206
+ matchNetworkCodeFromReportName(reportName) {
1207
+ return this.pathTemplates.reportPathTemplate.match(reportName).network_code;
1208
+ }
1209
+ /**
1210
+ * Parse the report from Report resource.
1211
+ *
1212
+ * @param {string} reportName
1213
+ * A fully-qualified path representing Report resource.
1214
+ * @returns {string} A string representing the report.
1215
+ */
1216
+ matchReportFromReportName(reportName) {
1217
+ return this.pathTemplates.reportPathTemplate.match(reportName).report;
1218
+ }
1219
+ /**
1220
+ * Return a fully-qualified role resource name string.
1221
+ *
1222
+ * @param {string} network_code
1223
+ * @param {string} role
1224
+ * @returns {string} Resource name string.
1225
+ */
1226
+ rolePath(networkCode, role) {
1227
+ return this.pathTemplates.rolePathTemplate.render({
1228
+ network_code: networkCode,
1229
+ role: role,
1230
+ });
1231
+ }
1232
+ /**
1233
+ * Parse the network_code from Role resource.
1234
+ *
1235
+ * @param {string} roleName
1236
+ * A fully-qualified path representing Role resource.
1237
+ * @returns {string} A string representing the network_code.
1238
+ */
1239
+ matchNetworkCodeFromRoleName(roleName) {
1240
+ return this.pathTemplates.rolePathTemplate.match(roleName).network_code;
1241
+ }
1242
+ /**
1243
+ * Parse the role from Role resource.
1244
+ *
1245
+ * @param {string} roleName
1246
+ * A fully-qualified path representing Role resource.
1247
+ * @returns {string} A string representing the role.
1248
+ */
1249
+ matchRoleFromRoleName(roleName) {
1250
+ return this.pathTemplates.rolePathTemplate.match(roleName).role;
1251
+ }
1252
+ /**
1253
+ * Return a fully-qualified taxonomyCategory resource name string.
1254
+ *
1255
+ * @param {string} network_code
1256
+ * @param {string} taxonomy_category
1257
+ * @returns {string} Resource name string.
1258
+ */
1259
+ taxonomyCategoryPath(networkCode, taxonomyCategory) {
1260
+ return this.pathTemplates.taxonomyCategoryPathTemplate.render({
1261
+ network_code: networkCode,
1262
+ taxonomy_category: taxonomyCategory,
1263
+ });
1264
+ }
1265
+ /**
1266
+ * Parse the network_code from TaxonomyCategory resource.
1267
+ *
1268
+ * @param {string} taxonomyCategoryName
1269
+ * A fully-qualified path representing TaxonomyCategory resource.
1270
+ * @returns {string} A string representing the network_code.
1271
+ */
1272
+ matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName) {
1273
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code;
1274
+ }
1275
+ /**
1276
+ * Parse the taxonomy_category from TaxonomyCategory resource.
1277
+ *
1278
+ * @param {string} taxonomyCategoryName
1279
+ * A fully-qualified path representing TaxonomyCategory resource.
1280
+ * @returns {string} A string representing the taxonomy_category.
1281
+ */
1282
+ matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName) {
1283
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category;
1284
+ }
1285
+ /**
1286
+ * Return a fully-qualified team resource name string.
1287
+ *
1288
+ * @param {string} network_code
1289
+ * @param {string} team
1290
+ * @returns {string} Resource name string.
1291
+ */
1292
+ teamPath(networkCode, team) {
1293
+ return this.pathTemplates.teamPathTemplate.render({
1294
+ network_code: networkCode,
1295
+ team: team,
1296
+ });
1297
+ }
1298
+ /**
1299
+ * Parse the network_code from Team resource.
1300
+ *
1301
+ * @param {string} teamName
1302
+ * A fully-qualified path representing Team resource.
1303
+ * @returns {string} A string representing the network_code.
1304
+ */
1305
+ matchNetworkCodeFromTeamName(teamName) {
1306
+ return this.pathTemplates.teamPathTemplate.match(teamName).network_code;
1307
+ }
1308
+ /**
1309
+ * Parse the team from Team resource.
1310
+ *
1311
+ * @param {string} teamName
1312
+ * A fully-qualified path representing Team resource.
1313
+ * @returns {string} A string representing the team.
1314
+ */
1315
+ matchTeamFromTeamName(teamName) {
1316
+ return this.pathTemplates.teamPathTemplate.match(teamName).team;
1317
+ }
1318
+ /**
1319
+ * Return a fully-qualified user resource name string.
1320
+ *
1321
+ * @param {string} network_code
1322
+ * @param {string} user
1323
+ * @returns {string} Resource name string.
1324
+ */
1325
+ userPath(networkCode, user) {
1326
+ return this.pathTemplates.userPathTemplate.render({
1327
+ network_code: networkCode,
1328
+ user: user,
1329
+ });
1330
+ }
1331
+ /**
1332
+ * Parse the network_code from User resource.
1333
+ *
1334
+ * @param {string} userName
1335
+ * A fully-qualified path representing User resource.
1336
+ * @returns {string} A string representing the network_code.
1337
+ */
1338
+ matchNetworkCodeFromUserName(userName) {
1339
+ return this.pathTemplates.userPathTemplate.match(userName).network_code;
1340
+ }
1341
+ /**
1342
+ * Parse the user from User resource.
1343
+ *
1344
+ * @param {string} userName
1345
+ * A fully-qualified path representing User resource.
1346
+ * @returns {string} A string representing the user.
1347
+ */
1348
+ matchUserFromUserName(userName) {
1349
+ return this.pathTemplates.userPathTemplate.match(userName).user;
1350
+ }
1351
+ /**
1352
+ * Terminate the gRPC channel and close the client.
1353
+ *
1354
+ * The client will no longer be usable and all future behavior is undefined.
1355
+ * @returns {Promise} A promise that resolves when the client is closed.
1356
+ */
1357
+ close() {
1358
+ if (this.geoTargetServiceStub && !this._terminated) {
1359
+ return this.geoTargetServiceStub.then(stub => {
1360
+ this._log.info('ending gRPC channel');
1361
+ this._terminated = true;
1362
+ stub.close();
1363
+ });
1364
+ }
1365
+ return Promise.resolve();
1366
+ }
1367
+ }
1368
+ exports.GeoTargetServiceClient = GeoTargetServiceClient;
1369
+ //# sourceMappingURL=geo_target_service_client.js.map