@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
@@ -97,19 +97,11 @@ class ReportServiceClient {
97
97
  constructor(opts, gaxInstance) {
98
98
  // Ensure that options include all the required fields.
99
99
  const staticMembers = this.constructor;
100
- if (opts?.universe_domain &&
101
- opts?.universeDomain &&
102
- opts?.universe_domain !== opts?.universeDomain) {
100
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
103
101
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
104
102
  }
105
- const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
106
- ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
107
- : undefined;
108
- this._universeDomain =
109
- opts?.universeDomain ??
110
- opts?.universe_domain ??
111
- universeDomainEnvVar ??
112
- 'googleapis.com';
103
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
104
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
113
105
  this._servicePath = 'admanager.' + this._universeDomain;
114
106
  const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
115
107
  this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
@@ -122,8 +114,7 @@ class ReportServiceClient {
122
114
  else {
123
115
  opts.fallback = opts.fallback ?? true;
124
116
  }
125
- const fallback = opts?.fallback ??
126
- (typeof window !== 'undefined' && typeof window?.fetch === 'function');
117
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
127
118
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
128
119
  // Request numeric enum values if REST transport is used.
129
120
  opts.numericEnums = true;
@@ -152,7 +143,10 @@ class ReportServiceClient {
152
143
  this.auth.defaultScopes = staticMembers.scopes;
153
144
  }
154
145
  // Determine the client header string.
155
- const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
146
+ const clientHeader = [
147
+ `gax/${this._gaxModule.version}`,
148
+ `gapic/${version}`,
149
+ ];
156
150
  if (typeof process === 'object' && 'versions' in process) {
157
151
  clientHeader.push(`gl-node/${process.versions.node}`);
158
152
  }
@@ -174,17 +168,27 @@ class ReportServiceClient {
174
168
  // identifiers to uniquely identify resources within the API.
175
169
  // Create useful helper objects for these.
176
170
  this.pathTemplates = {
171
+ adBreakPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}'),
177
172
  adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
173
+ bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/bandwidthGroups/{bandwidth_group}'),
178
174
  companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
179
175
  contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
180
176
  customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
181
177
  customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
182
- customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}'),
178
+ customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingValues/{custom_targeting_value}'),
179
+ deviceCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceCategories/{device_category}'),
183
180
  entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}'),
181
+ geoTargetPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/geoTargets/{geo_target}'),
184
182
  labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
183
+ liveStreamEventPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEvents/{live_stream_event}'),
185
184
  networkPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}'),
185
+ operatingSystemPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystems/{operating_system}'),
186
+ operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystemVersions/{operating_system_version}'),
186
187
  orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
187
188
  placementPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/placements/{placement}'),
189
+ privateAuctionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctions/{private_auction}'),
190
+ privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctionDeals/{private_auction_deal}'),
191
+ programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/programmaticBuyers/{programmatic_buyer}'),
188
192
  reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
189
193
  rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
190
194
  taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
@@ -196,35 +200,25 @@ class ReportServiceClient {
196
200
  // pages). Denote the keys used for pagination and results.
197
201
  this.descriptors.page = {
198
202
  listReports: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'reports'),
199
- fetchReportResultRows: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rows'),
203
+ fetchReportResultRows: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rows')
200
204
  };
201
- const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
205
+ const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos);
202
206
  // This API contains "long-running operations", which return a
203
207
  // an Operation object that allows for tracking of the operation,
204
208
  // rather than holding a request open.
205
209
  const lroOptions = {
206
210
  auth: this.auth,
207
- grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
211
+ grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
208
212
  };
209
213
  if (opts.fallback) {
210
214
  lroOptions.protoJson = protoFilesRoot;
211
- lroOptions.httpRules = [
212
- {
213
- selector: 'google.longrunning.Operations.GetOperation',
214
- get: '/v1/{name=networks/*/operations/reports/runs/*}',
215
- additional_bindings: [
216
- { get: '/v1/{name=networks/*/operations/reports/exports/*}' },
217
- ],
218
- },
219
- ];
215
+ lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.GetOperation', get: '/v1/{name=networks/*/operations/reports/runs/*}', }];
220
216
  }
221
- this.operationsClient = this._gaxModule
222
- .lro(lroOptions)
223
- .operationsClient(opts);
217
+ this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
224
218
  const runReportResponse = protoFilesRoot.lookup('.google.ads.admanager.v1.RunReportResponse');
225
219
  const runReportMetadata = protoFilesRoot.lookup('.google.ads.admanager.v1.RunReportMetadata');
226
220
  this.descriptors.longrunning = {
227
- runReport: new this._gaxModule.LongrunningDescriptor(this.operationsClient, runReportResponse.decode.bind(runReportResponse), runReportMetadata.decode.bind(runReportMetadata)),
221
+ runReport: new this._gaxModule.LongrunningDescriptor(this.operationsClient, runReportResponse.decode.bind(runReportResponse), runReportMetadata.decode.bind(runReportMetadata))
228
222
  };
229
223
  // Put together the default options sent with requests.
230
224
  this._defaults = this._gaxGrpc.constructSettings('google.ads.admanager.v1.ReportService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -253,20 +247,13 @@ class ReportServiceClient {
253
247
  }
254
248
  // Put together the "service stub" for
255
249
  // google.ads.admanager.v1.ReportService.
256
- this.reportServiceStub = this._gaxGrpc.createStub(this._opts.fallback
257
- ? this._protos.lookupService('google.ads.admanager.v1.ReportService')
258
- : // eslint-disable-next-line @typescript-eslint/no-explicit-any
259
- this._protos.google.ads.admanager.v1.ReportService, this._opts, this._providedCustomServicePath);
250
+ this.reportServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
251
+ this._protos.lookupService('google.ads.admanager.v1.ReportService') :
252
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
253
+ this._protos.google.ads.admanager.v1.ReportService, this._opts, this._providedCustomServicePath);
260
254
  // Iterate over each of the methods that the service provides
261
255
  // and create an API call method for each.
262
- const reportServiceStubMethods = [
263
- 'getReport',
264
- 'listReports',
265
- 'createReport',
266
- 'updateReport',
267
- 'runReport',
268
- 'fetchReportResultRows',
269
- ];
256
+ const reportServiceStubMethods = ['getReport', 'listReports', 'createReport', 'updateReport', 'runReport', 'fetchReportResultRows'];
270
257
  for (const methodName of reportServiceStubMethods) {
271
258
  const callPromise = this.reportServiceStub.then(stub => (...args) => {
272
259
  if (this._terminated) {
@@ -291,8 +278,7 @@ class ReportServiceClient {
291
278
  * @returns {string} The DNS address for this service.
292
279
  */
293
280
  static get servicePath() {
294
- if (typeof process === 'object' &&
295
- typeof process.emitWarning === 'function') {
281
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
296
282
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
297
283
  }
298
284
  return 'admanager.googleapis.com';
@@ -303,8 +289,7 @@ class ReportServiceClient {
303
289
  * @returns {string} The DNS address for this service.
304
290
  */
305
291
  static get apiEndpoint() {
306
- if (typeof process === 'object' &&
307
- typeof process.emitWarning === 'function') {
292
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
308
293
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
309
294
  }
310
295
  return 'admanager.googleapis.com';
@@ -332,7 +317,9 @@ class ReportServiceClient {
332
317
  * @returns {string[]} List of default scopes.
333
318
  */
334
319
  static get scopes() {
335
- return [];
320
+ return [
321
+ 'https://www.googleapis.com/auth/admanager'
322
+ ];
336
323
  }
337
324
  /**
338
325
  * Return the project ID used by this class.
@@ -358,13 +345,10 @@ class ReportServiceClient {
358
345
  options = options || {};
359
346
  options.otherArgs = options.otherArgs || {};
360
347
  options.otherArgs.headers = options.otherArgs.headers || {};
361
- options.otherArgs.headers['x-goog-request-params'] =
362
- this._gaxModule.routingHeader.fromParams({
363
- name: request.name ?? '',
364
- });
365
- this.initialize().catch(err => {
366
- throw err;
348
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
349
+ 'name': request.name ?? '',
367
350
  });
351
+ this.initialize().catch(err => { throw err; });
368
352
  this._log.info('getReport request %j', request);
369
353
  const wrappedCallback = callback
370
354
  ? (error, response, options, rawResponse) => {
@@ -372,11 +356,16 @@ class ReportServiceClient {
372
356
  callback(error, response, options, rawResponse); // We verified callback above.
373
357
  }
374
358
  : undefined;
375
- return this.innerApiCalls
376
- .getReport(request, options, wrappedCallback)
359
+ return this.innerApiCalls.getReport(request, options, wrappedCallback)
377
360
  ?.then(([response, options, rawResponse]) => {
378
361
  this._log.info('getReport response %j', response);
379
362
  return [response, options, rawResponse];
363
+ }).catch((error) => {
364
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
365
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
366
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
367
+ }
368
+ throw error;
380
369
  });
381
370
  }
382
371
  createReport(request, optionsOrCallback, callback) {
@@ -392,13 +381,10 @@ class ReportServiceClient {
392
381
  options = options || {};
393
382
  options.otherArgs = options.otherArgs || {};
394
383
  options.otherArgs.headers = options.otherArgs.headers || {};
395
- options.otherArgs.headers['x-goog-request-params'] =
396
- this._gaxModule.routingHeader.fromParams({
397
- parent: request.parent ?? '',
398
- });
399
- this.initialize().catch(err => {
400
- throw err;
384
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
385
+ 'parent': request.parent ?? '',
401
386
  });
387
+ this.initialize().catch(err => { throw err; });
402
388
  this._log.info('createReport request %j', request);
403
389
  const wrappedCallback = callback
404
390
  ? (error, response, options, rawResponse) => {
@@ -406,11 +392,16 @@ class ReportServiceClient {
406
392
  callback(error, response, options, rawResponse); // We verified callback above.
407
393
  }
408
394
  : undefined;
409
- return this.innerApiCalls
410
- .createReport(request, options, wrappedCallback)
395
+ return this.innerApiCalls.createReport(request, options, wrappedCallback)
411
396
  ?.then(([response, options, rawResponse]) => {
412
397
  this._log.info('createReport response %j', response);
413
398
  return [response, options, rawResponse];
399
+ }).catch((error) => {
400
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
401
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
402
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
403
+ }
404
+ throw error;
414
405
  });
415
406
  }
416
407
  updateReport(request, optionsOrCallback, callback) {
@@ -426,13 +417,10 @@ class ReportServiceClient {
426
417
  options = options || {};
427
418
  options.otherArgs = options.otherArgs || {};
428
419
  options.otherArgs.headers = options.otherArgs.headers || {};
429
- options.otherArgs.headers['x-goog-request-params'] =
430
- this._gaxModule.routingHeader.fromParams({
431
- 'report.name': request.report.name ?? '',
432
- });
433
- this.initialize().catch(err => {
434
- throw err;
420
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
421
+ 'report.name': request.report.name ?? '',
435
422
  });
423
+ this.initialize().catch(err => { throw err; });
436
424
  this._log.info('updateReport request %j', request);
437
425
  const wrappedCallback = callback
438
426
  ? (error, response, options, rawResponse) => {
@@ -440,11 +428,16 @@ class ReportServiceClient {
440
428
  callback(error, response, options, rawResponse); // We verified callback above.
441
429
  }
442
430
  : undefined;
443
- return this.innerApiCalls
444
- .updateReport(request, options, wrappedCallback)
431
+ return this.innerApiCalls.updateReport(request, options, wrappedCallback)
445
432
  ?.then(([response, options, rawResponse]) => {
446
433
  this._log.info('updateReport response %j', response);
447
434
  return [response, options, rawResponse];
435
+ }).catch((error) => {
436
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
437
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
438
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
439
+ }
440
+ throw error;
448
441
  });
449
442
  }
450
443
  runReport(request, optionsOrCallback, callback) {
@@ -460,13 +453,10 @@ class ReportServiceClient {
460
453
  options = options || {};
461
454
  options.otherArgs = options.otherArgs || {};
462
455
  options.otherArgs.headers = options.otherArgs.headers || {};
463
- options.otherArgs.headers['x-goog-request-params'] =
464
- this._gaxModule.routingHeader.fromParams({
465
- name: request.name ?? '',
466
- });
467
- this.initialize().catch(err => {
468
- throw err;
456
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
457
+ 'name': request.name ?? '',
469
458
  });
459
+ this.initialize().catch(err => { throw err; });
470
460
  const wrappedCallback = callback
471
461
  ? (error, response, rawResponse, _) => {
472
462
  this._log.info('runReport response %j', rawResponse);
@@ -474,8 +464,7 @@ class ReportServiceClient {
474
464
  }
475
465
  : undefined;
476
466
  this._log.info('runReport request %j', request);
477
- return this.innerApiCalls
478
- .runReport(request, options, wrappedCallback)
467
+ return this.innerApiCalls.runReport(request, options, wrappedCallback)
479
468
  ?.then(([response, rawResponse, _]) => {
480
469
  this._log.info('runReport response %j', rawResponse);
481
470
  return [response, rawResponse, _];
@@ -512,13 +501,10 @@ class ReportServiceClient {
512
501
  options = options || {};
513
502
  options.otherArgs = options.otherArgs || {};
514
503
  options.otherArgs.headers = options.otherArgs.headers || {};
515
- options.otherArgs.headers['x-goog-request-params'] =
516
- this._gaxModule.routingHeader.fromParams({
517
- parent: request.parent ?? '',
518
- });
519
- this.initialize().catch(err => {
520
- throw err;
504
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
505
+ 'parent': request.parent ?? '',
521
506
  });
507
+ this.initialize().catch(err => { throw err; });
522
508
  const wrappedCallback = callback
523
509
  ? (error, values, nextPageRequest, rawResponse) => {
524
510
  this._log.info('listReports values %j', values);
@@ -577,15 +563,12 @@ class ReportServiceClient {
577
563
  options = options || {};
578
564
  options.otherArgs = options.otherArgs || {};
579
565
  options.otherArgs.headers = options.otherArgs.headers || {};
580
- options.otherArgs.headers['x-goog-request-params'] =
581
- this._gaxModule.routingHeader.fromParams({
582
- parent: request.parent ?? '',
583
- });
566
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
567
+ 'parent': request.parent ?? '',
568
+ });
584
569
  const defaultCallSettings = this._defaults['listReports'];
585
570
  const callSettings = defaultCallSettings.merge(options);
586
- this.initialize().catch(err => {
587
- throw err;
588
- });
571
+ this.initialize().catch(err => { throw err; });
589
572
  this._log.info('listReports stream %j', request);
590
573
  return this.descriptors.page.listReports.createStream(this.innerApiCalls.listReports, request, callSettings);
591
574
  }
@@ -636,15 +619,12 @@ class ReportServiceClient {
636
619
  options = options || {};
637
620
  options.otherArgs = options.otherArgs || {};
638
621
  options.otherArgs.headers = options.otherArgs.headers || {};
639
- options.otherArgs.headers['x-goog-request-params'] =
640
- this._gaxModule.routingHeader.fromParams({
641
- parent: request.parent ?? '',
642
- });
622
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
623
+ 'parent': request.parent ?? '',
624
+ });
643
625
  const defaultCallSettings = this._defaults['listReports'];
644
626
  const callSettings = defaultCallSettings.merge(options);
645
- this.initialize().catch(err => {
646
- throw err;
647
- });
627
+ this.initialize().catch(err => { throw err; });
648
628
  this._log.info('listReports iterate %j', request);
649
629
  return this.descriptors.page.listReports.asyncIterate(this.innerApiCalls['listReports'], request, callSettings);
650
630
  }
@@ -661,13 +641,10 @@ class ReportServiceClient {
661
641
  options = options || {};
662
642
  options.otherArgs = options.otherArgs || {};
663
643
  options.otherArgs.headers = options.otherArgs.headers || {};
664
- options.otherArgs.headers['x-goog-request-params'] =
665
- this._gaxModule.routingHeader.fromParams({
666
- name: request.name ?? '',
667
- });
668
- this.initialize().catch(err => {
669
- throw err;
644
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
645
+ 'name': request.name ?? '',
670
646
  });
647
+ this.initialize().catch(err => { throw err; });
671
648
  const wrappedCallback = callback
672
649
  ? (error, values, nextPageRequest, rawResponse) => {
673
650
  this._log.info('fetchReportResultRows values %j', values);
@@ -713,15 +690,12 @@ class ReportServiceClient {
713
690
  options = options || {};
714
691
  options.otherArgs = options.otherArgs || {};
715
692
  options.otherArgs.headers = options.otherArgs.headers || {};
716
- options.otherArgs.headers['x-goog-request-params'] =
717
- this._gaxModule.routingHeader.fromParams({
718
- name: request.name ?? '',
719
- });
693
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
694
+ 'name': request.name ?? '',
695
+ });
720
696
  const defaultCallSettings = this._defaults['fetchReportResultRows'];
721
697
  const callSettings = defaultCallSettings.merge(options);
722
- this.initialize().catch(err => {
723
- throw err;
724
- });
698
+ this.initialize().catch(err => { throw err; });
725
699
  this._log.info('fetchReportResultRows stream %j', request);
726
700
  return this.descriptors.page.fetchReportResultRows.createStream(this.innerApiCalls.fetchReportResultRows, request, callSettings);
727
701
  }
@@ -759,48 +733,45 @@ class ReportServiceClient {
759
733
  options = options || {};
760
734
  options.otherArgs = options.otherArgs || {};
761
735
  options.otherArgs.headers = options.otherArgs.headers || {};
762
- options.otherArgs.headers['x-goog-request-params'] =
763
- this._gaxModule.routingHeader.fromParams({
764
- name: request.name ?? '',
765
- });
736
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
737
+ 'name': request.name ?? '',
738
+ });
766
739
  const defaultCallSettings = this._defaults['fetchReportResultRows'];
767
740
  const callSettings = defaultCallSettings.merge(options);
768
- this.initialize().catch(err => {
769
- throw err;
770
- });
741
+ this.initialize().catch(err => { throw err; });
771
742
  this._log.info('fetchReportResultRows iterate %j', request);
772
743
  return this.descriptors.page.fetchReportResultRows.asyncIterate(this.innerApiCalls['fetchReportResultRows'], request, callSettings);
773
744
  }
774
745
  /**
775
- * Gets the latest state of a long-running operation. Clients can use this
776
- * method to poll the operation result at intervals as recommended by the API
777
- * service.
778
- *
779
- * @param {Object} request - The request object that will be sent.
780
- * @param {string} request.name - The name of the operation resource.
781
- * @param {Object=} options
782
- * Optional parameters. You can override the default settings for this call,
783
- * e.g, timeout, retries, paginations, etc. See {@link
784
- * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
785
- * for the details.
786
- * @param {function(?Error, ?Object)=} callback
787
- * The function which will be called with the result of the API call.
788
- *
789
- * The second parameter to the callback is an object representing
790
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
791
- * @return {Promise} - The promise which resolves to an array.
792
- * The first element of the array is an object representing
793
- * {@link google.longrunning.Operation | google.longrunning.Operation}.
794
- * The promise has a method named "cancel" which cancels the ongoing API call.
795
- *
796
- * @example
797
- * ```
798
- * const client = longrunning.operationsClient();
799
- * const name = '';
800
- * const [response] = await client.getOperation({name});
801
- * // doThingsWith(response)
802
- * ```
803
- */
746
+ * Gets the latest state of a long-running operation. Clients can use this
747
+ * method to poll the operation result at intervals as recommended by the API
748
+ * service.
749
+ *
750
+ * @param {Object} request - The request object that will be sent.
751
+ * @param {string} request.name - The name of the operation resource.
752
+ * @param {Object=} options
753
+ * Optional parameters. You can override the default settings for this call,
754
+ * e.g, timeout, retries, paginations, etc. See {@link
755
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
756
+ * for the details.
757
+ * @param {function(?Error, ?Object)=} callback
758
+ * The function which will be called with the result of the API call.
759
+ *
760
+ * The second parameter to the callback is an object representing
761
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
762
+ * @return {Promise} - The promise which resolves to an array.
763
+ * The first element of the array is an object representing
764
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
765
+ * The promise has a method named "cancel" which cancels the ongoing API call.
766
+ *
767
+ * @example
768
+ * ```
769
+ * const client = longrunning.operationsClient();
770
+ * const name = '';
771
+ * const [response] = await client.getOperation({name});
772
+ * // doThingsWith(response)
773
+ * ```
774
+ */
804
775
  getOperation(request, optionsOrCallback, callback) {
805
776
  let options;
806
777
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -954,6 +925,51 @@ class ReportServiceClient {
954
925
  // --------------------
955
926
  // -- Path templates --
956
927
  // --------------------
928
+ /**
929
+ * Return a fully-qualified adBreak resource name string.
930
+ *
931
+ * @param {string} network_code
932
+ * @param {string} asset_key
933
+ * @param {string} ad_break
934
+ * @returns {string} Resource name string.
935
+ */
936
+ adBreakPath(networkCode, assetKey, adBreak) {
937
+ return this.pathTemplates.adBreakPathTemplate.render({
938
+ network_code: networkCode,
939
+ asset_key: assetKey,
940
+ ad_break: adBreak,
941
+ });
942
+ }
943
+ /**
944
+ * Parse the network_code from AdBreak resource.
945
+ *
946
+ * @param {string} adBreakName
947
+ * A fully-qualified path representing AdBreak resource.
948
+ * @returns {string} A string representing the network_code.
949
+ */
950
+ matchNetworkCodeFromAdBreakName(adBreakName) {
951
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code;
952
+ }
953
+ /**
954
+ * Parse the asset_key from AdBreak resource.
955
+ *
956
+ * @param {string} adBreakName
957
+ * A fully-qualified path representing AdBreak resource.
958
+ * @returns {string} A string representing the asset_key.
959
+ */
960
+ matchAssetKeyFromAdBreakName(adBreakName) {
961
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key;
962
+ }
963
+ /**
964
+ * Parse the ad_break from AdBreak resource.
965
+ *
966
+ * @param {string} adBreakName
967
+ * A fully-qualified path representing AdBreak resource.
968
+ * @returns {string} A string representing the ad_break.
969
+ */
970
+ matchAdBreakFromAdBreakName(adBreakName) {
971
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break;
972
+ }
957
973
  /**
958
974
  * Return a fully-qualified adUnit resource name string.
959
975
  *
@@ -987,6 +1003,39 @@ class ReportServiceClient {
987
1003
  matchAdUnitFromAdUnitName(adUnitName) {
988
1004
  return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
989
1005
  }
1006
+ /**
1007
+ * Return a fully-qualified bandwidthGroup resource name string.
1008
+ *
1009
+ * @param {string} network_code
1010
+ * @param {string} bandwidth_group
1011
+ * @returns {string} Resource name string.
1012
+ */
1013
+ bandwidthGroupPath(networkCode, bandwidthGroup) {
1014
+ return this.pathTemplates.bandwidthGroupPathTemplate.render({
1015
+ network_code: networkCode,
1016
+ bandwidth_group: bandwidthGroup,
1017
+ });
1018
+ }
1019
+ /**
1020
+ * Parse the network_code from BandwidthGroup resource.
1021
+ *
1022
+ * @param {string} bandwidthGroupName
1023
+ * A fully-qualified path representing BandwidthGroup resource.
1024
+ * @returns {string} A string representing the network_code.
1025
+ */
1026
+ matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName) {
1027
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code;
1028
+ }
1029
+ /**
1030
+ * Parse the bandwidth_group from BandwidthGroup resource.
1031
+ *
1032
+ * @param {string} bandwidthGroupName
1033
+ * A fully-qualified path representing BandwidthGroup resource.
1034
+ * @returns {string} A string representing the bandwidth_group.
1035
+ */
1036
+ matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName) {
1037
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group;
1038
+ }
990
1039
  /**
991
1040
  * Return a fully-qualified company resource name string.
992
1041
  *
@@ -1008,8 +1057,7 @@ class ReportServiceClient {
1008
1057
  * @returns {string} A string representing the network_code.
1009
1058
  */
1010
1059
  matchNetworkCodeFromCompanyName(companyName) {
1011
- return this.pathTemplates.companyPathTemplate.match(companyName)
1012
- .network_code;
1060
+ return this.pathTemplates.companyPathTemplate.match(companyName).network_code;
1013
1061
  }
1014
1062
  /**
1015
1063
  * Parse the company from Company resource.
@@ -1042,8 +1090,7 @@ class ReportServiceClient {
1042
1090
  * @returns {string} A string representing the network_code.
1043
1091
  */
1044
1092
  matchNetworkCodeFromContactName(contactName) {
1045
- return this.pathTemplates.contactPathTemplate.match(contactName)
1046
- .network_code;
1093
+ return this.pathTemplates.contactPathTemplate.match(contactName).network_code;
1047
1094
  }
1048
1095
  /**
1049
1096
  * Parse the contact from Contact resource.
@@ -1076,8 +1123,7 @@ class ReportServiceClient {
1076
1123
  * @returns {string} A string representing the network_code.
1077
1124
  */
1078
1125
  matchNetworkCodeFromCustomFieldName(customFieldName) {
1079
- return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
1080
- .network_code;
1126
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code;
1081
1127
  }
1082
1128
  /**
1083
1129
  * Parse the custom_field from CustomField resource.
@@ -1087,8 +1133,7 @@ class ReportServiceClient {
1087
1133
  * @returns {string} A string representing the custom_field.
1088
1134
  */
1089
1135
  matchCustomFieldFromCustomFieldName(customFieldName) {
1090
- return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
1091
- .custom_field;
1136
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field;
1092
1137
  }
1093
1138
  /**
1094
1139
  * Return a fully-qualified customTargetingKey resource name string.
@@ -1127,14 +1172,12 @@ class ReportServiceClient {
1127
1172
  * Return a fully-qualified customTargetingValue resource name string.
1128
1173
  *
1129
1174
  * @param {string} network_code
1130
- * @param {string} custom_targeting_key
1131
1175
  * @param {string} custom_targeting_value
1132
1176
  * @returns {string} Resource name string.
1133
1177
  */
1134
- customTargetingValuePath(networkCode, customTargetingKey, customTargetingValue) {
1178
+ customTargetingValuePath(networkCode, customTargetingValue) {
1135
1179
  return this.pathTemplates.customTargetingValuePathTemplate.render({
1136
1180
  network_code: networkCode,
1137
- custom_targeting_key: customTargetingKey,
1138
1181
  custom_targeting_value: customTargetingValue,
1139
1182
  });
1140
1183
  }
@@ -1148,16 +1191,6 @@ class ReportServiceClient {
1148
1191
  matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
1149
1192
  return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
1150
1193
  }
1151
- /**
1152
- * Parse the custom_targeting_key from CustomTargetingValue resource.
1153
- *
1154
- * @param {string} customTargetingValueName
1155
- * A fully-qualified path representing CustomTargetingValue resource.
1156
- * @returns {string} A string representing the custom_targeting_key.
1157
- */
1158
- matchCustomTargetingKeyFromCustomTargetingValueName(customTargetingValueName) {
1159
- return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_key;
1160
- }
1161
1194
  /**
1162
1195
  * Parse the custom_targeting_value from CustomTargetingValue resource.
1163
1196
  *
@@ -1168,6 +1201,39 @@ class ReportServiceClient {
1168
1201
  matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
1169
1202
  return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
1170
1203
  }
1204
+ /**
1205
+ * Return a fully-qualified deviceCategory resource name string.
1206
+ *
1207
+ * @param {string} network_code
1208
+ * @param {string} device_category
1209
+ * @returns {string} Resource name string.
1210
+ */
1211
+ deviceCategoryPath(networkCode, deviceCategory) {
1212
+ return this.pathTemplates.deviceCategoryPathTemplate.render({
1213
+ network_code: networkCode,
1214
+ device_category: deviceCategory,
1215
+ });
1216
+ }
1217
+ /**
1218
+ * Parse the network_code from DeviceCategory resource.
1219
+ *
1220
+ * @param {string} deviceCategoryName
1221
+ * A fully-qualified path representing DeviceCategory resource.
1222
+ * @returns {string} A string representing the network_code.
1223
+ */
1224
+ matchNetworkCodeFromDeviceCategoryName(deviceCategoryName) {
1225
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code;
1226
+ }
1227
+ /**
1228
+ * Parse the device_category from DeviceCategory resource.
1229
+ *
1230
+ * @param {string} deviceCategoryName
1231
+ * A fully-qualified path representing DeviceCategory resource.
1232
+ * @returns {string} A string representing the device_category.
1233
+ */
1234
+ matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName) {
1235
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category;
1236
+ }
1171
1237
  /**
1172
1238
  * Return a fully-qualified entitySignalsMapping resource name string.
1173
1239
  *
@@ -1201,6 +1267,39 @@ class ReportServiceClient {
1201
1267
  matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
1202
1268
  return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
1203
1269
  }
1270
+ /**
1271
+ * Return a fully-qualified geoTarget resource name string.
1272
+ *
1273
+ * @param {string} network_code
1274
+ * @param {string} geo_target
1275
+ * @returns {string} Resource name string.
1276
+ */
1277
+ geoTargetPath(networkCode, geoTarget) {
1278
+ return this.pathTemplates.geoTargetPathTemplate.render({
1279
+ network_code: networkCode,
1280
+ geo_target: geoTarget,
1281
+ });
1282
+ }
1283
+ /**
1284
+ * Parse the network_code from GeoTarget resource.
1285
+ *
1286
+ * @param {string} geoTargetName
1287
+ * A fully-qualified path representing GeoTarget resource.
1288
+ * @returns {string} A string representing the network_code.
1289
+ */
1290
+ matchNetworkCodeFromGeoTargetName(geoTargetName) {
1291
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code;
1292
+ }
1293
+ /**
1294
+ * Parse the geo_target from GeoTarget resource.
1295
+ *
1296
+ * @param {string} geoTargetName
1297
+ * A fully-qualified path representing GeoTarget resource.
1298
+ * @returns {string} A string representing the geo_target.
1299
+ */
1300
+ matchGeoTargetFromGeoTargetName(geoTargetName) {
1301
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target;
1302
+ }
1204
1303
  /**
1205
1304
  * Return a fully-qualified label resource name string.
1206
1305
  *
@@ -1234,6 +1333,39 @@ class ReportServiceClient {
1234
1333
  matchLabelFromLabelName(labelName) {
1235
1334
  return this.pathTemplates.labelPathTemplate.match(labelName).label;
1236
1335
  }
1336
+ /**
1337
+ * Return a fully-qualified liveStreamEvent resource name string.
1338
+ *
1339
+ * @param {string} network_code
1340
+ * @param {string} live_stream_event
1341
+ * @returns {string} Resource name string.
1342
+ */
1343
+ liveStreamEventPath(networkCode, liveStreamEvent) {
1344
+ return this.pathTemplates.liveStreamEventPathTemplate.render({
1345
+ network_code: networkCode,
1346
+ live_stream_event: liveStreamEvent,
1347
+ });
1348
+ }
1349
+ /**
1350
+ * Parse the network_code from LiveStreamEvent resource.
1351
+ *
1352
+ * @param {string} liveStreamEventName
1353
+ * A fully-qualified path representing LiveStreamEvent resource.
1354
+ * @returns {string} A string representing the network_code.
1355
+ */
1356
+ matchNetworkCodeFromLiveStreamEventName(liveStreamEventName) {
1357
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code;
1358
+ }
1359
+ /**
1360
+ * Parse the live_stream_event from LiveStreamEvent resource.
1361
+ *
1362
+ * @param {string} liveStreamEventName
1363
+ * A fully-qualified path representing LiveStreamEvent resource.
1364
+ * @returns {string} A string representing the live_stream_event.
1365
+ */
1366
+ matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName) {
1367
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event;
1368
+ }
1237
1369
  /**
1238
1370
  * Return a fully-qualified network resource name string.
1239
1371
  *
@@ -1253,8 +1385,73 @@ class ReportServiceClient {
1253
1385
  * @returns {string} A string representing the network_code.
1254
1386
  */
1255
1387
  matchNetworkCodeFromNetworkName(networkName) {
1256
- return this.pathTemplates.networkPathTemplate.match(networkName)
1257
- .network_code;
1388
+ return this.pathTemplates.networkPathTemplate.match(networkName).network_code;
1389
+ }
1390
+ /**
1391
+ * Return a fully-qualified operatingSystem resource name string.
1392
+ *
1393
+ * @param {string} network_code
1394
+ * @param {string} operating_system
1395
+ * @returns {string} Resource name string.
1396
+ */
1397
+ operatingSystemPath(networkCode, operatingSystem) {
1398
+ return this.pathTemplates.operatingSystemPathTemplate.render({
1399
+ network_code: networkCode,
1400
+ operating_system: operatingSystem,
1401
+ });
1402
+ }
1403
+ /**
1404
+ * Parse the network_code from OperatingSystem resource.
1405
+ *
1406
+ * @param {string} operatingSystemName
1407
+ * A fully-qualified path representing OperatingSystem resource.
1408
+ * @returns {string} A string representing the network_code.
1409
+ */
1410
+ matchNetworkCodeFromOperatingSystemName(operatingSystemName) {
1411
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code;
1412
+ }
1413
+ /**
1414
+ * Parse the operating_system from OperatingSystem resource.
1415
+ *
1416
+ * @param {string} operatingSystemName
1417
+ * A fully-qualified path representing OperatingSystem resource.
1418
+ * @returns {string} A string representing the operating_system.
1419
+ */
1420
+ matchOperatingSystemFromOperatingSystemName(operatingSystemName) {
1421
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system;
1422
+ }
1423
+ /**
1424
+ * Return a fully-qualified operatingSystemVersion resource name string.
1425
+ *
1426
+ * @param {string} network_code
1427
+ * @param {string} operating_system_version
1428
+ * @returns {string} Resource name string.
1429
+ */
1430
+ operatingSystemVersionPath(networkCode, operatingSystemVersion) {
1431
+ return this.pathTemplates.operatingSystemVersionPathTemplate.render({
1432
+ network_code: networkCode,
1433
+ operating_system_version: operatingSystemVersion,
1434
+ });
1435
+ }
1436
+ /**
1437
+ * Parse the network_code from OperatingSystemVersion resource.
1438
+ *
1439
+ * @param {string} operatingSystemVersionName
1440
+ * A fully-qualified path representing OperatingSystemVersion resource.
1441
+ * @returns {string} A string representing the network_code.
1442
+ */
1443
+ matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName) {
1444
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code;
1445
+ }
1446
+ /**
1447
+ * Parse the operating_system_version from OperatingSystemVersion resource.
1448
+ *
1449
+ * @param {string} operatingSystemVersionName
1450
+ * A fully-qualified path representing OperatingSystemVersion resource.
1451
+ * @returns {string} A string representing the operating_system_version.
1452
+ */
1453
+ matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName) {
1454
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version;
1258
1455
  }
1259
1456
  /**
1260
1457
  * Return a fully-qualified order resource name string.
@@ -1310,8 +1507,7 @@ class ReportServiceClient {
1310
1507
  * @returns {string} A string representing the network_code.
1311
1508
  */
1312
1509
  matchNetworkCodeFromPlacementName(placementName) {
1313
- return this.pathTemplates.placementPathTemplate.match(placementName)
1314
- .network_code;
1510
+ return this.pathTemplates.placementPathTemplate.match(placementName).network_code;
1315
1511
  }
1316
1512
  /**
1317
1513
  * Parse the placement from Placement resource.
@@ -1321,8 +1517,106 @@ class ReportServiceClient {
1321
1517
  * @returns {string} A string representing the placement.
1322
1518
  */
1323
1519
  matchPlacementFromPlacementName(placementName) {
1324
- return this.pathTemplates.placementPathTemplate.match(placementName)
1325
- .placement;
1520
+ return this.pathTemplates.placementPathTemplate.match(placementName).placement;
1521
+ }
1522
+ /**
1523
+ * Return a fully-qualified privateAuction resource name string.
1524
+ *
1525
+ * @param {string} network_code
1526
+ * @param {string} private_auction
1527
+ * @returns {string} Resource name string.
1528
+ */
1529
+ privateAuctionPath(networkCode, privateAuction) {
1530
+ return this.pathTemplates.privateAuctionPathTemplate.render({
1531
+ network_code: networkCode,
1532
+ private_auction: privateAuction,
1533
+ });
1534
+ }
1535
+ /**
1536
+ * Parse the network_code from PrivateAuction resource.
1537
+ *
1538
+ * @param {string} privateAuctionName
1539
+ * A fully-qualified path representing PrivateAuction resource.
1540
+ * @returns {string} A string representing the network_code.
1541
+ */
1542
+ matchNetworkCodeFromPrivateAuctionName(privateAuctionName) {
1543
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code;
1544
+ }
1545
+ /**
1546
+ * Parse the private_auction from PrivateAuction resource.
1547
+ *
1548
+ * @param {string} privateAuctionName
1549
+ * A fully-qualified path representing PrivateAuction resource.
1550
+ * @returns {string} A string representing the private_auction.
1551
+ */
1552
+ matchPrivateAuctionFromPrivateAuctionName(privateAuctionName) {
1553
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction;
1554
+ }
1555
+ /**
1556
+ * Return a fully-qualified privateAuctionDeal resource name string.
1557
+ *
1558
+ * @param {string} network_code
1559
+ * @param {string} private_auction_deal
1560
+ * @returns {string} Resource name string.
1561
+ */
1562
+ privateAuctionDealPath(networkCode, privateAuctionDeal) {
1563
+ return this.pathTemplates.privateAuctionDealPathTemplate.render({
1564
+ network_code: networkCode,
1565
+ private_auction_deal: privateAuctionDeal,
1566
+ });
1567
+ }
1568
+ /**
1569
+ * Parse the network_code from PrivateAuctionDeal resource.
1570
+ *
1571
+ * @param {string} privateAuctionDealName
1572
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1573
+ * @returns {string} A string representing the network_code.
1574
+ */
1575
+ matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName) {
1576
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code;
1577
+ }
1578
+ /**
1579
+ * Parse the private_auction_deal from PrivateAuctionDeal resource.
1580
+ *
1581
+ * @param {string} privateAuctionDealName
1582
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1583
+ * @returns {string} A string representing the private_auction_deal.
1584
+ */
1585
+ matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName) {
1586
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal;
1587
+ }
1588
+ /**
1589
+ * Return a fully-qualified programmaticBuyer resource name string.
1590
+ *
1591
+ * @param {string} network_code
1592
+ * @param {string} programmatic_buyer
1593
+ * @returns {string} Resource name string.
1594
+ */
1595
+ programmaticBuyerPath(networkCode, programmaticBuyer) {
1596
+ return this.pathTemplates.programmaticBuyerPathTemplate.render({
1597
+ network_code: networkCode,
1598
+ programmatic_buyer: programmaticBuyer,
1599
+ });
1600
+ }
1601
+ /**
1602
+ * Parse the network_code from ProgrammaticBuyer resource.
1603
+ *
1604
+ * @param {string} programmaticBuyerName
1605
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1606
+ * @returns {string} A string representing the network_code.
1607
+ */
1608
+ matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName) {
1609
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code;
1610
+ }
1611
+ /**
1612
+ * Parse the programmatic_buyer from ProgrammaticBuyer resource.
1613
+ *
1614
+ * @param {string} programmaticBuyerName
1615
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1616
+ * @returns {string} A string representing the programmatic_buyer.
1617
+ */
1618
+ matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName) {
1619
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer;
1326
1620
  }
1327
1621
  /**
1328
1622
  * Return a fully-qualified report resource name string.
@@ -1501,7 +1795,7 @@ class ReportServiceClient {
1501
1795
  this._log.info('ending gRPC channel');
1502
1796
  this._terminated = true;
1503
1797
  stub.close();
1504
- this.operationsClient.close();
1798
+ void this.operationsClient.close();
1505
1799
  });
1506
1800
  }
1507
1801
  return Promise.resolve();