@google-ads/admanager 0.2.0 → 0.4.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 (182) hide show
  1. package/README.md +27 -2
  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 +417 -95
  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 +404 -75
  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 +405 -79
  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 +406 -82
  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 +408 -84
  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 +450 -114
  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 +398 -62
  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 +404 -75
  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 +404 -75
  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 +351 -111
  166. package/build/src/v1/report_service_client.js +477 -163
  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 +404 -75
  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 +406 -81
  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 +389 -58
  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 -33
@@ -28,7 +28,7 @@ const google_gax_1 = require("google-gax");
28
28
  const gapicConfig = require("./network_service_client_config.json");
29
29
  const version = require('../../../package.json').version;
30
30
  /**
31
- * Provides methods for handling Network objects.
31
+ * Provides methods for handling `Network` objects.
32
32
  * @class
33
33
  * @memberof v1
34
34
  */
@@ -96,19 +96,11 @@ class NetworkServiceClient {
96
96
  constructor(opts, gaxInstance) {
97
97
  // Ensure that options include all the required fields.
98
98
  const staticMembers = this.constructor;
99
- if (opts?.universe_domain &&
100
- opts?.universeDomain &&
101
- opts?.universe_domain !== opts?.universeDomain) {
99
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
102
100
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
103
101
  }
104
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
105
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
106
- : undefined;
107
- this._universeDomain =
108
- opts?.universeDomain ??
109
- opts?.universe_domain ??
110
- universeDomainEnvVar ??
111
- 'googleapis.com';
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';
112
104
  this._servicePath = 'admanager.' + this._universeDomain;
113
105
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
114
106
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
@@ -121,8 +113,7 @@ class NetworkServiceClient {
121
113
  else {
122
114
  opts.fallback = opts.fallback ?? true;
123
115
  }
124
- const fallback = opts?.fallback ??
125
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
116
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
126
117
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
127
118
  // Request numeric enum values if REST transport is used.
128
119
  opts.numericEnums = true;
@@ -151,7 +142,10 @@ class NetworkServiceClient {
151
142
  this.auth.defaultScopes = staticMembers.scopes;
152
143
  }
153
144
  // Determine the client header string.
154
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
145
+ const clientHeader = [
146
+ `gax/${this._gaxModule.version}`,
147
+ `gapic/${version}`,
148
+ ];
155
149
  if (typeof process === 'object' && 'versions' in process) {
156
150
  clientHeader.push(`gl-node/${process.versions.node}`);
157
151
  }
@@ -173,17 +167,27 @@ class NetworkServiceClient {
173
167
  // identifiers to uniquely identify resources within the API.
174
168
  // Create useful helper objects for these.
175
169
  this.pathTemplates = {
170
+ adBreakPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}'),
176
171
  adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
172
+ bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/bandwidthGroups/{bandwidth_group}'),
177
173
  companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
178
174
  contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
179
175
  customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
180
176
  customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
181
- customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}'),
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}'),
182
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}'),
183
181
  labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
182
+ liveStreamEventPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEvents/{live_stream_event}'),
184
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}'),
185
186
  orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
186
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}'),
187
191
  reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
188
192
  rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
189
193
  taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
@@ -217,10 +221,10 @@ class NetworkServiceClient {
217
221
  }
218
222
  // Put together the "service stub" for
219
223
  // google.ads.admanager.v1.NetworkService.
220
- this.networkServiceStub = this._gaxGrpc.createStub(this._opts.fallback
221
- ? this._protos.lookupService('google.ads.admanager.v1.NetworkService')
222
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
223
- this._protos.google.ads.admanager.v1.NetworkService, this._opts, this._providedCustomServicePath);
224
+ this.networkServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
225
+ this._protos.lookupService('google.ads.admanager.v1.NetworkService') :
226
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
227
+ this._protos.google.ads.admanager.v1.NetworkService, this._opts, this._providedCustomServicePath);
224
228
  // Iterate over each of the methods that the service provides
225
229
  // and create an API call method for each.
226
230
  const networkServiceStubMethods = ['getNetwork', 'listNetworks'];
@@ -246,8 +250,7 @@ class NetworkServiceClient {
246
250
  * @returns {string} The DNS address for this service.
247
251
  */
248
252
  static get servicePath() {
249
- if (typeof process === 'object' &&
250
- typeof process.emitWarning === 'function') {
253
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
251
254
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
252
255
  }
253
256
  return 'admanager.googleapis.com';
@@ -258,8 +261,7 @@ class NetworkServiceClient {
258
261
  * @returns {string} The DNS address for this service.
259
262
  */
260
263
  static get apiEndpoint() {
261
- if (typeof process === 'object' &&
262
- typeof process.emitWarning === 'function') {
264
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
263
265
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
264
266
  }
265
267
  return 'admanager.googleapis.com';
@@ -287,7 +289,9 @@ class NetworkServiceClient {
287
289
  * @returns {string[]} List of default scopes.
288
290
  */
289
291
  static get scopes() {
290
- return [];
292
+ return [
293
+ 'https://www.googleapis.com/auth/admanager'
294
+ ];
291
295
  }
292
296
  /**
293
297
  * Return the project ID used by this class.
@@ -313,11 +317,10 @@ class NetworkServiceClient {
313
317
  options = options || {};
314
318
  options.otherArgs = options.otherArgs || {};
315
319
  options.otherArgs.headers = options.otherArgs.headers || {};
316
- options.otherArgs.headers['x-goog-request-params'] =
317
- this._gaxModule.routingHeader.fromParams({
318
- name: request.name ?? '',
319
- });
320
- this.initialize();
320
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
321
+ 'name': request.name ?? '',
322
+ });
323
+ this.initialize().catch(err => { throw err; });
321
324
  this._log.info('getNetwork request %j', request);
322
325
  const wrappedCallback = callback
323
326
  ? (error, response, options, rawResponse) => {
@@ -325,11 +328,16 @@ class NetworkServiceClient {
325
328
  callback(error, response, options, rawResponse); // We verified callback above.
326
329
  }
327
330
  : undefined;
328
- return this.innerApiCalls
329
- .getNetwork(request, options, wrappedCallback)
331
+ return this.innerApiCalls.getNetwork(request, options, wrappedCallback)
330
332
  ?.then(([response, options, rawResponse]) => {
331
333
  this._log.info('getNetwork response %j', response);
332
334
  return [response, options, rawResponse];
335
+ }).catch((error) => {
336
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
337
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
338
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
339
+ }
340
+ throw error;
333
341
  });
334
342
  }
335
343
  listNetworks(request, optionsOrCallback, callback) {
@@ -345,7 +353,7 @@ class NetworkServiceClient {
345
353
  options = options || {};
346
354
  options.otherArgs = options.otherArgs || {};
347
355
  options.otherArgs.headers = options.otherArgs.headers || {};
348
- this.initialize();
356
+ this.initialize().catch(err => { throw err; });
349
357
  this._log.info('listNetworks request %j', request);
350
358
  const wrappedCallback = callback
351
359
  ? (error, response, options, rawResponse) => {
@@ -353,16 +361,66 @@ class NetworkServiceClient {
353
361
  callback(error, response, options, rawResponse); // We verified callback above.
354
362
  }
355
363
  : undefined;
356
- return this.innerApiCalls
357
- .listNetworks(request, options, wrappedCallback)
364
+ return this.innerApiCalls.listNetworks(request, options, wrappedCallback)
358
365
  ?.then(([response, options, rawResponse]) => {
359
366
  this._log.info('listNetworks response %j', response);
360
367
  return [response, options, rawResponse];
368
+ }).catch((error) => {
369
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
370
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
371
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
372
+ }
373
+ throw error;
361
374
  });
362
375
  }
363
376
  // --------------------
364
377
  // -- Path templates --
365
378
  // --------------------
379
+ /**
380
+ * Return a fully-qualified adBreak resource name string.
381
+ *
382
+ * @param {string} network_code
383
+ * @param {string} asset_key
384
+ * @param {string} ad_break
385
+ * @returns {string} Resource name string.
386
+ */
387
+ adBreakPath(networkCode, assetKey, adBreak) {
388
+ return this.pathTemplates.adBreakPathTemplate.render({
389
+ network_code: networkCode,
390
+ asset_key: assetKey,
391
+ ad_break: adBreak,
392
+ });
393
+ }
394
+ /**
395
+ * Parse the network_code from AdBreak resource.
396
+ *
397
+ * @param {string} adBreakName
398
+ * A fully-qualified path representing AdBreak resource.
399
+ * @returns {string} A string representing the network_code.
400
+ */
401
+ matchNetworkCodeFromAdBreakName(adBreakName) {
402
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code;
403
+ }
404
+ /**
405
+ * Parse the asset_key from AdBreak resource.
406
+ *
407
+ * @param {string} adBreakName
408
+ * A fully-qualified path representing AdBreak resource.
409
+ * @returns {string} A string representing the asset_key.
410
+ */
411
+ matchAssetKeyFromAdBreakName(adBreakName) {
412
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key;
413
+ }
414
+ /**
415
+ * Parse the ad_break from AdBreak resource.
416
+ *
417
+ * @param {string} adBreakName
418
+ * A fully-qualified path representing AdBreak resource.
419
+ * @returns {string} A string representing the ad_break.
420
+ */
421
+ matchAdBreakFromAdBreakName(adBreakName) {
422
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break;
423
+ }
366
424
  /**
367
425
  * Return a fully-qualified adUnit resource name string.
368
426
  *
@@ -396,6 +454,39 @@ class NetworkServiceClient {
396
454
  matchAdUnitFromAdUnitName(adUnitName) {
397
455
  return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
398
456
  }
457
+ /**
458
+ * Return a fully-qualified bandwidthGroup resource name string.
459
+ *
460
+ * @param {string} network_code
461
+ * @param {string} bandwidth_group
462
+ * @returns {string} Resource name string.
463
+ */
464
+ bandwidthGroupPath(networkCode, bandwidthGroup) {
465
+ return this.pathTemplates.bandwidthGroupPathTemplate.render({
466
+ network_code: networkCode,
467
+ bandwidth_group: bandwidthGroup,
468
+ });
469
+ }
470
+ /**
471
+ * Parse the network_code from BandwidthGroup resource.
472
+ *
473
+ * @param {string} bandwidthGroupName
474
+ * A fully-qualified path representing BandwidthGroup resource.
475
+ * @returns {string} A string representing the network_code.
476
+ */
477
+ matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName) {
478
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code;
479
+ }
480
+ /**
481
+ * Parse the bandwidth_group from BandwidthGroup resource.
482
+ *
483
+ * @param {string} bandwidthGroupName
484
+ * A fully-qualified path representing BandwidthGroup resource.
485
+ * @returns {string} A string representing the bandwidth_group.
486
+ */
487
+ matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName) {
488
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group;
489
+ }
399
490
  /**
400
491
  * Return a fully-qualified company resource name string.
401
492
  *
@@ -417,8 +508,7 @@ class NetworkServiceClient {
417
508
  * @returns {string} A string representing the network_code.
418
509
  */
419
510
  matchNetworkCodeFromCompanyName(companyName) {
420
- return this.pathTemplates.companyPathTemplate.match(companyName)
421
- .network_code;
511
+ return this.pathTemplates.companyPathTemplate.match(companyName).network_code;
422
512
  }
423
513
  /**
424
514
  * Parse the company from Company resource.
@@ -451,8 +541,7 @@ class NetworkServiceClient {
451
541
  * @returns {string} A string representing the network_code.
452
542
  */
453
543
  matchNetworkCodeFromContactName(contactName) {
454
- return this.pathTemplates.contactPathTemplate.match(contactName)
455
- .network_code;
544
+ return this.pathTemplates.contactPathTemplate.match(contactName).network_code;
456
545
  }
457
546
  /**
458
547
  * Parse the contact from Contact resource.
@@ -485,8 +574,7 @@ class NetworkServiceClient {
485
574
  * @returns {string} A string representing the network_code.
486
575
  */
487
576
  matchNetworkCodeFromCustomFieldName(customFieldName) {
488
- return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
489
- .network_code;
577
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code;
490
578
  }
491
579
  /**
492
580
  * Parse the custom_field from CustomField resource.
@@ -496,8 +584,7 @@ class NetworkServiceClient {
496
584
  * @returns {string} A string representing the custom_field.
497
585
  */
498
586
  matchCustomFieldFromCustomFieldName(customFieldName) {
499
- return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
500
- .custom_field;
587
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field;
501
588
  }
502
589
  /**
503
590
  * Return a fully-qualified customTargetingKey resource name string.
@@ -536,14 +623,12 @@ class NetworkServiceClient {
536
623
  * Return a fully-qualified customTargetingValue resource name string.
537
624
  *
538
625
  * @param {string} network_code
539
- * @param {string} custom_targeting_key
540
626
  * @param {string} custom_targeting_value
541
627
  * @returns {string} Resource name string.
542
628
  */
543
- customTargetingValuePath(networkCode, customTargetingKey, customTargetingValue) {
629
+ customTargetingValuePath(networkCode, customTargetingValue) {
544
630
  return this.pathTemplates.customTargetingValuePathTemplate.render({
545
631
  network_code: networkCode,
546
- custom_targeting_key: customTargetingKey,
547
632
  custom_targeting_value: customTargetingValue,
548
633
  });
549
634
  }
@@ -557,16 +642,6 @@ class NetworkServiceClient {
557
642
  matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
558
643
  return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
559
644
  }
560
- /**
561
- * Parse the custom_targeting_key from CustomTargetingValue resource.
562
- *
563
- * @param {string} customTargetingValueName
564
- * A fully-qualified path representing CustomTargetingValue resource.
565
- * @returns {string} A string representing the custom_targeting_key.
566
- */
567
- matchCustomTargetingKeyFromCustomTargetingValueName(customTargetingValueName) {
568
- return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_key;
569
- }
570
645
  /**
571
646
  * Parse the custom_targeting_value from CustomTargetingValue resource.
572
647
  *
@@ -577,6 +652,39 @@ class NetworkServiceClient {
577
652
  matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
578
653
  return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
579
654
  }
655
+ /**
656
+ * Return a fully-qualified deviceCategory resource name string.
657
+ *
658
+ * @param {string} network_code
659
+ * @param {string} device_category
660
+ * @returns {string} Resource name string.
661
+ */
662
+ deviceCategoryPath(networkCode, deviceCategory) {
663
+ return this.pathTemplates.deviceCategoryPathTemplate.render({
664
+ network_code: networkCode,
665
+ device_category: deviceCategory,
666
+ });
667
+ }
668
+ /**
669
+ * Parse the network_code from DeviceCategory resource.
670
+ *
671
+ * @param {string} deviceCategoryName
672
+ * A fully-qualified path representing DeviceCategory resource.
673
+ * @returns {string} A string representing the network_code.
674
+ */
675
+ matchNetworkCodeFromDeviceCategoryName(deviceCategoryName) {
676
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code;
677
+ }
678
+ /**
679
+ * Parse the device_category from DeviceCategory resource.
680
+ *
681
+ * @param {string} deviceCategoryName
682
+ * A fully-qualified path representing DeviceCategory resource.
683
+ * @returns {string} A string representing the device_category.
684
+ */
685
+ matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName) {
686
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category;
687
+ }
580
688
  /**
581
689
  * Return a fully-qualified entitySignalsMapping resource name string.
582
690
  *
@@ -610,6 +718,39 @@ class NetworkServiceClient {
610
718
  matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
611
719
  return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
612
720
  }
721
+ /**
722
+ * Return a fully-qualified geoTarget resource name string.
723
+ *
724
+ * @param {string} network_code
725
+ * @param {string} geo_target
726
+ * @returns {string} Resource name string.
727
+ */
728
+ geoTargetPath(networkCode, geoTarget) {
729
+ return this.pathTemplates.geoTargetPathTemplate.render({
730
+ network_code: networkCode,
731
+ geo_target: geoTarget,
732
+ });
733
+ }
734
+ /**
735
+ * Parse the network_code from GeoTarget resource.
736
+ *
737
+ * @param {string} geoTargetName
738
+ * A fully-qualified path representing GeoTarget resource.
739
+ * @returns {string} A string representing the network_code.
740
+ */
741
+ matchNetworkCodeFromGeoTargetName(geoTargetName) {
742
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code;
743
+ }
744
+ /**
745
+ * Parse the geo_target from GeoTarget resource.
746
+ *
747
+ * @param {string} geoTargetName
748
+ * A fully-qualified path representing GeoTarget resource.
749
+ * @returns {string} A string representing the geo_target.
750
+ */
751
+ matchGeoTargetFromGeoTargetName(geoTargetName) {
752
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target;
753
+ }
613
754
  /**
614
755
  * Return a fully-qualified label resource name string.
615
756
  *
@@ -643,6 +784,39 @@ class NetworkServiceClient {
643
784
  matchLabelFromLabelName(labelName) {
644
785
  return this.pathTemplates.labelPathTemplate.match(labelName).label;
645
786
  }
787
+ /**
788
+ * Return a fully-qualified liveStreamEvent resource name string.
789
+ *
790
+ * @param {string} network_code
791
+ * @param {string} live_stream_event
792
+ * @returns {string} Resource name string.
793
+ */
794
+ liveStreamEventPath(networkCode, liveStreamEvent) {
795
+ return this.pathTemplates.liveStreamEventPathTemplate.render({
796
+ network_code: networkCode,
797
+ live_stream_event: liveStreamEvent,
798
+ });
799
+ }
800
+ /**
801
+ * Parse the network_code from LiveStreamEvent resource.
802
+ *
803
+ * @param {string} liveStreamEventName
804
+ * A fully-qualified path representing LiveStreamEvent resource.
805
+ * @returns {string} A string representing the network_code.
806
+ */
807
+ matchNetworkCodeFromLiveStreamEventName(liveStreamEventName) {
808
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code;
809
+ }
810
+ /**
811
+ * Parse the live_stream_event from LiveStreamEvent resource.
812
+ *
813
+ * @param {string} liveStreamEventName
814
+ * A fully-qualified path representing LiveStreamEvent resource.
815
+ * @returns {string} A string representing the live_stream_event.
816
+ */
817
+ matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName) {
818
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event;
819
+ }
646
820
  /**
647
821
  * Return a fully-qualified network resource name string.
648
822
  *
@@ -662,8 +836,73 @@ class NetworkServiceClient {
662
836
  * @returns {string} A string representing the network_code.
663
837
  */
664
838
  matchNetworkCodeFromNetworkName(networkName) {
665
- return this.pathTemplates.networkPathTemplate.match(networkName)
666
- .network_code;
839
+ return this.pathTemplates.networkPathTemplate.match(networkName).network_code;
840
+ }
841
+ /**
842
+ * Return a fully-qualified operatingSystem resource name string.
843
+ *
844
+ * @param {string} network_code
845
+ * @param {string} operating_system
846
+ * @returns {string} Resource name string.
847
+ */
848
+ operatingSystemPath(networkCode, operatingSystem) {
849
+ return this.pathTemplates.operatingSystemPathTemplate.render({
850
+ network_code: networkCode,
851
+ operating_system: operatingSystem,
852
+ });
853
+ }
854
+ /**
855
+ * Parse the network_code from OperatingSystem resource.
856
+ *
857
+ * @param {string} operatingSystemName
858
+ * A fully-qualified path representing OperatingSystem resource.
859
+ * @returns {string} A string representing the network_code.
860
+ */
861
+ matchNetworkCodeFromOperatingSystemName(operatingSystemName) {
862
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code;
863
+ }
864
+ /**
865
+ * Parse the operating_system from OperatingSystem resource.
866
+ *
867
+ * @param {string} operatingSystemName
868
+ * A fully-qualified path representing OperatingSystem resource.
869
+ * @returns {string} A string representing the operating_system.
870
+ */
871
+ matchOperatingSystemFromOperatingSystemName(operatingSystemName) {
872
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system;
873
+ }
874
+ /**
875
+ * Return a fully-qualified operatingSystemVersion resource name string.
876
+ *
877
+ * @param {string} network_code
878
+ * @param {string} operating_system_version
879
+ * @returns {string} Resource name string.
880
+ */
881
+ operatingSystemVersionPath(networkCode, operatingSystemVersion) {
882
+ return this.pathTemplates.operatingSystemVersionPathTemplate.render({
883
+ network_code: networkCode,
884
+ operating_system_version: operatingSystemVersion,
885
+ });
886
+ }
887
+ /**
888
+ * Parse the network_code from OperatingSystemVersion resource.
889
+ *
890
+ * @param {string} operatingSystemVersionName
891
+ * A fully-qualified path representing OperatingSystemVersion resource.
892
+ * @returns {string} A string representing the network_code.
893
+ */
894
+ matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName) {
895
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code;
896
+ }
897
+ /**
898
+ * Parse the operating_system_version from OperatingSystemVersion resource.
899
+ *
900
+ * @param {string} operatingSystemVersionName
901
+ * A fully-qualified path representing OperatingSystemVersion resource.
902
+ * @returns {string} A string representing the operating_system_version.
903
+ */
904
+ matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName) {
905
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version;
667
906
  }
668
907
  /**
669
908
  * Return a fully-qualified order resource name string.
@@ -719,8 +958,7 @@ class NetworkServiceClient {
719
958
  * @returns {string} A string representing the network_code.
720
959
  */
721
960
  matchNetworkCodeFromPlacementName(placementName) {
722
- return this.pathTemplates.placementPathTemplate.match(placementName)
723
- .network_code;
961
+ return this.pathTemplates.placementPathTemplate.match(placementName).network_code;
724
962
  }
725
963
  /**
726
964
  * Parse the placement from Placement resource.
@@ -730,8 +968,106 @@ class NetworkServiceClient {
730
968
  * @returns {string} A string representing the placement.
731
969
  */
732
970
  matchPlacementFromPlacementName(placementName) {
733
- return this.pathTemplates.placementPathTemplate.match(placementName)
734
- .placement;
971
+ return this.pathTemplates.placementPathTemplate.match(placementName).placement;
972
+ }
973
+ /**
974
+ * Return a fully-qualified privateAuction resource name string.
975
+ *
976
+ * @param {string} network_code
977
+ * @param {string} private_auction
978
+ * @returns {string} Resource name string.
979
+ */
980
+ privateAuctionPath(networkCode, privateAuction) {
981
+ return this.pathTemplates.privateAuctionPathTemplate.render({
982
+ network_code: networkCode,
983
+ private_auction: privateAuction,
984
+ });
985
+ }
986
+ /**
987
+ * Parse the network_code from PrivateAuction resource.
988
+ *
989
+ * @param {string} privateAuctionName
990
+ * A fully-qualified path representing PrivateAuction resource.
991
+ * @returns {string} A string representing the network_code.
992
+ */
993
+ matchNetworkCodeFromPrivateAuctionName(privateAuctionName) {
994
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code;
995
+ }
996
+ /**
997
+ * Parse the private_auction from PrivateAuction resource.
998
+ *
999
+ * @param {string} privateAuctionName
1000
+ * A fully-qualified path representing PrivateAuction resource.
1001
+ * @returns {string} A string representing the private_auction.
1002
+ */
1003
+ matchPrivateAuctionFromPrivateAuctionName(privateAuctionName) {
1004
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction;
1005
+ }
1006
+ /**
1007
+ * Return a fully-qualified privateAuctionDeal resource name string.
1008
+ *
1009
+ * @param {string} network_code
1010
+ * @param {string} private_auction_deal
1011
+ * @returns {string} Resource name string.
1012
+ */
1013
+ privateAuctionDealPath(networkCode, privateAuctionDeal) {
1014
+ return this.pathTemplates.privateAuctionDealPathTemplate.render({
1015
+ network_code: networkCode,
1016
+ private_auction_deal: privateAuctionDeal,
1017
+ });
1018
+ }
1019
+ /**
1020
+ * Parse the network_code from PrivateAuctionDeal resource.
1021
+ *
1022
+ * @param {string} privateAuctionDealName
1023
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1024
+ * @returns {string} A string representing the network_code.
1025
+ */
1026
+ matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName) {
1027
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code;
1028
+ }
1029
+ /**
1030
+ * Parse the private_auction_deal from PrivateAuctionDeal resource.
1031
+ *
1032
+ * @param {string} privateAuctionDealName
1033
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1034
+ * @returns {string} A string representing the private_auction_deal.
1035
+ */
1036
+ matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName) {
1037
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal;
1038
+ }
1039
+ /**
1040
+ * Return a fully-qualified programmaticBuyer resource name string.
1041
+ *
1042
+ * @param {string} network_code
1043
+ * @param {string} programmatic_buyer
1044
+ * @returns {string} Resource name string.
1045
+ */
1046
+ programmaticBuyerPath(networkCode, programmaticBuyer) {
1047
+ return this.pathTemplates.programmaticBuyerPathTemplate.render({
1048
+ network_code: networkCode,
1049
+ programmatic_buyer: programmaticBuyer,
1050
+ });
1051
+ }
1052
+ /**
1053
+ * Parse the network_code from ProgrammaticBuyer resource.
1054
+ *
1055
+ * @param {string} programmaticBuyerName
1056
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1057
+ * @returns {string} A string representing the network_code.
1058
+ */
1059
+ matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName) {
1060
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code;
1061
+ }
1062
+ /**
1063
+ * Parse the programmatic_buyer from ProgrammaticBuyer resource.
1064
+ *
1065
+ * @param {string} programmaticBuyerName
1066
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1067
+ * @returns {string} A string representing the programmatic_buyer.
1068
+ */
1069
+ matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName) {
1070
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer;
735
1071
  }
736
1072
  /**
737
1073
  * Return a fully-qualified report resource name string.