@google-ads/admanager 0.4.0 → 0.5.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 (276) hide show
  1. package/README.md +152 -173
  2. package/build/protos/google/ads/admanager/v1/ad_break_service.proto +1 -1
  3. package/build/protos/google/ads/admanager/v1/ad_review_center_ad_enums.proto +44 -0
  4. package/build/protos/google/ads/admanager/v1/ad_review_center_ad_messages.proto +62 -0
  5. package/build/protos/google/ads/admanager/v1/ad_review_center_ad_service.proto +237 -0
  6. package/build/protos/google/ads/admanager/v1/ad_unit_messages.proto +7 -7
  7. package/build/protos/google/ads/admanager/v1/ad_unit_service.proto +6 -6
  8. package/build/protos/google/ads/admanager/v1/application_messages.proto +47 -0
  9. package/build/protos/google/ads/admanager/v1/application_service.proto +129 -0
  10. package/build/protos/google/ads/admanager/v1/audience_segment_messages.proto +49 -0
  11. package/build/protos/google/ads/admanager/v1/audience_segment_service.proto +129 -0
  12. package/build/protos/google/ads/admanager/v1/bandwidth_group_service.proto +3 -3
  13. package/build/protos/google/ads/admanager/v1/browser_language_messages.proto +45 -0
  14. package/build/protos/google/ads/admanager/v1/browser_language_service.proto +129 -0
  15. package/build/protos/google/ads/admanager/v1/browser_messages.proto +51 -0
  16. package/build/protos/google/ads/admanager/v1/browser_service.proto +128 -0
  17. package/build/protos/google/ads/admanager/v1/cms_metadata_key_enums.proto +41 -0
  18. package/build/protos/google/ads/admanager/v1/cms_metadata_key_messages.proto +50 -0
  19. package/build/protos/google/ads/admanager/v1/cms_metadata_key_service.proto +129 -0
  20. package/build/protos/google/ads/admanager/v1/cms_metadata_value_enums.proto +44 -0
  21. package/build/protos/google/ads/admanager/v1/cms_metadata_value_messages.proto +61 -0
  22. package/build/protos/google/ads/admanager/v1/cms_metadata_value_service.proto +130 -0
  23. package/build/protos/google/ads/admanager/v1/company_messages.proto +14 -12
  24. package/build/protos/google/ads/admanager/v1/company_service.proto +3 -3
  25. package/build/protos/google/ads/admanager/v1/contact_enums.proto +57 -0
  26. package/build/protos/google/ads/admanager/v1/contact_messages.proto +45 -2
  27. package/build/protos/google/ads/admanager/v1/contact_service.proto +244 -0
  28. package/build/protos/google/ads/admanager/v1/content_bundle_messages.proto +53 -0
  29. package/build/protos/google/ads/admanager/v1/content_bundle_service.proto +129 -0
  30. package/build/protos/google/ads/admanager/v1/content_label_messages.proto +45 -0
  31. package/build/protos/google/ads/admanager/v1/content_label_service.proto +129 -0
  32. package/build/protos/google/ads/admanager/v1/content_messages.proto +45 -0
  33. package/build/protos/google/ads/admanager/v1/content_service.proto +128 -0
  34. package/build/protos/google/ads/admanager/v1/creative_template_enums.proto +63 -0
  35. package/build/protos/google/ads/admanager/v1/creative_template_messages.proto +253 -0
  36. package/build/protos/google/ads/admanager/v1/creative_template_service.proto +130 -0
  37. package/build/protos/google/ads/admanager/v1/creative_template_variable_url_type_enum.proto +47 -0
  38. package/build/protos/google/ads/admanager/v1/custom_field_messages.proto +5 -2
  39. package/build/protos/google/ads/admanager/v1/custom_field_service.proto +185 -3
  40. package/build/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto +7 -6
  41. package/build/protos/google/ads/admanager/v1/custom_targeting_key_service.proto +1 -1
  42. package/build/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto +9 -9
  43. package/build/protos/google/ads/admanager/v1/custom_targeting_value_service.proto +1 -1
  44. package/build/protos/google/ads/admanager/v1/device_capability_messages.proto +45 -0
  45. package/build/protos/google/ads/admanager/v1/device_capability_service.proto +130 -0
  46. package/build/protos/google/ads/admanager/v1/device_category_service.proto +2 -2
  47. package/build/protos/google/ads/admanager/v1/device_manufacturer_messages.proto +46 -0
  48. package/build/protos/google/ads/admanager/v1/device_manufacturer_service.proto +131 -0
  49. package/build/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto +1 -1
  50. package/build/protos/google/ads/admanager/v1/exchange_syndication_product_enum.proto +47 -0
  51. package/build/protos/google/ads/admanager/v1/geo_target_service.proto +3 -3
  52. package/build/protos/google/ads/admanager/v1/mobile_carrier_messages.proto +48 -0
  53. package/build/protos/google/ads/admanager/v1/mobile_carrier_service.proto +129 -0
  54. package/build/protos/google/ads/admanager/v1/mobile_device_messages.proto +54 -0
  55. package/build/protos/google/ads/admanager/v1/mobile_device_service.proto +129 -0
  56. package/build/protos/google/ads/admanager/v1/mobile_device_submodel_messages.proto +55 -0
  57. package/build/protos/google/ads/admanager/v1/mobile_device_submodel_service.proto +133 -0
  58. package/build/protos/google/ads/admanager/v1/operating_system_service.proto +2 -2
  59. package/build/protos/google/ads/admanager/v1/operating_system_version_service.proto +2 -2
  60. package/build/protos/google/ads/admanager/v1/order_messages.proto +7 -8
  61. package/build/protos/google/ads/admanager/v1/order_service.proto +3 -3
  62. package/build/protos/google/ads/admanager/v1/placement_service.proto +220 -3
  63. package/build/protos/google/ads/admanager/v1/private_auction_deal_service.proto +2 -2
  64. package/build/protos/google/ads/admanager/v1/private_auction_service.proto +2 -2
  65. package/build/protos/google/ads/admanager/v1/programmatic_buyer_service.proto +1 -1
  66. package/build/protos/google/ads/admanager/v1/report_definition.proto +12478 -0
  67. package/build/protos/google/ads/admanager/v1/report_messages.proto +118 -3410
  68. package/build/protos/google/ads/admanager/v1/report_service.proto +10 -8
  69. package/build/protos/google/ads/admanager/v1/report_value.proto +73 -0
  70. package/build/protos/google/ads/admanager/v1/role_service.proto +3 -2
  71. package/build/protos/google/ads/admanager/v1/site_enums.proto +72 -0
  72. package/build/protos/google/ads/admanager/v1/site_messages.proto +77 -0
  73. package/build/protos/google/ads/admanager/v1/site_service.proto +295 -0
  74. package/build/protos/google/ads/admanager/v1/targeting.proto +311 -0
  75. package/build/protos/google/ads/admanager/v1/taxonomy_category_service.proto +1 -1
  76. package/build/protos/google/ads/admanager/v1/taxonomy_type_enum.proto +3 -0
  77. package/build/protos/google/ads/admanager/v1/team_enums.proto +62 -0
  78. package/build/protos/google/ads/admanager/v1/team_messages.proto +30 -0
  79. package/build/protos/google/ads/admanager/v1/team_service.proto +303 -0
  80. package/build/protos/google/ads/admanager/v1/web_property.proto +54 -0
  81. package/build/protos/protos.d.ts +30764 -11410
  82. package/build/protos/protos.js +93644 -43318
  83. package/build/protos/protos.json +9909 -3734
  84. package/build/src/index.d.ts +58 -1
  85. package/build/src/index.js +40 -2
  86. package/build/src/index.js.map +1 -1
  87. package/build/src/v1/ad_break_service_client.d.ts +441 -0
  88. package/build/src/v1/ad_break_service_client.js +624 -0
  89. package/build/src/v1/ad_break_service_client.js.map +1 -1
  90. package/build/src/v1/ad_break_service_proto_list.json +49 -1
  91. package/build/src/v1/ad_review_center_ad_service_client.d.ts +1607 -0
  92. package/build/src/v1/ad_review_center_ad_service_client.js +2291 -0
  93. package/build/src/v1/ad_review_center_ad_service_client.js.map +1 -0
  94. package/build/src/v1/ad_review_center_ad_service_client_config.json +38 -0
  95. package/build/src/v1/ad_review_center_ad_service_proto_list.json +122 -0
  96. package/build/src/v1/ad_unit_service_client.d.ts +453 -12
  97. package/build/src/v1/ad_unit_service_client.js +632 -8
  98. package/build/src/v1/ad_unit_service_client.js.map +1 -1
  99. package/build/src/v1/ad_unit_service_proto_list.json +49 -1
  100. package/build/src/v1/application_service_client.d.ts +1345 -0
  101. package/build/src/v1/application_service_client.js +1993 -0
  102. package/build/src/v1/application_service_client.js.map +1 -0
  103. package/build/src/v1/application_service_client_config.json +34 -0
  104. package/build/src/v1/application_service_proto_list.json +122 -0
  105. package/build/src/v1/audience_segment_service_client.d.ts +1345 -0
  106. package/build/src/v1/audience_segment_service_client.js +1993 -0
  107. package/build/src/v1/audience_segment_service_client.js.map +1 -0
  108. package/build/src/v1/audience_segment_service_client_config.json +34 -0
  109. package/build/src/v1/audience_segment_service_proto_list.json +122 -0
  110. package/build/src/v1/bandwidth_group_service_client.d.ts +447 -6
  111. package/build/src/v1/bandwidth_group_service_client.js +628 -4
  112. package/build/src/v1/bandwidth_group_service_client.js.map +1 -1
  113. package/build/src/v1/bandwidth_group_service_proto_list.json +49 -1
  114. package/build/src/v1/browser_language_service_client.d.ts +1345 -0
  115. package/build/src/v1/browser_language_service_client.js +1993 -0
  116. package/build/src/v1/browser_language_service_client.js.map +1 -0
  117. package/build/src/v1/browser_language_service_client_config.json +34 -0
  118. package/build/src/v1/browser_language_service_proto_list.json +122 -0
  119. package/build/src/v1/browser_service_client.d.ts +1345 -0
  120. package/build/src/v1/browser_service_client.js +1993 -0
  121. package/build/src/v1/browser_service_client.js.map +1 -0
  122. package/build/src/v1/browser_service_client_config.json +34 -0
  123. package/build/src/v1/browser_service_proto_list.json +122 -0
  124. package/build/src/v1/cms_metadata_key_service_client.d.ts +1345 -0
  125. package/build/src/v1/cms_metadata_key_service_client.js +1993 -0
  126. package/build/src/v1/cms_metadata_key_service_client.js.map +1 -0
  127. package/build/src/v1/cms_metadata_key_service_client_config.json +34 -0
  128. package/build/src/v1/cms_metadata_key_service_proto_list.json +122 -0
  129. package/build/src/v1/cms_metadata_value_service_client.d.ts +1345 -0
  130. package/build/src/v1/cms_metadata_value_service_client.js +1993 -0
  131. package/build/src/v1/cms_metadata_value_service_client.js.map +1 -0
  132. package/build/src/v1/cms_metadata_value_service_client_config.json +34 -0
  133. package/build/src/v1/cms_metadata_value_service_proto_list.json +122 -0
  134. package/build/src/v1/company_service_client.d.ts +447 -6
  135. package/build/src/v1/company_service_client.js +628 -4
  136. package/build/src/v1/company_service_client.js.map +1 -1
  137. package/build/src/v1/company_service_proto_list.json +49 -1
  138. package/build/src/v1/contact_service_client.d.ts +1456 -0
  139. package/build/src/v1/contact_service_client.js +2137 -0
  140. package/build/src/v1/contact_service_client.js.map +1 -0
  141. package/build/src/v1/contact_service_client_config.json +50 -0
  142. package/build/src/v1/contact_service_proto_list.json +122 -0
  143. package/build/src/v1/content_bundle_service_client.d.ts +1345 -0
  144. package/build/src/v1/content_bundle_service_client.js +1993 -0
  145. package/build/src/v1/content_bundle_service_client.js.map +1 -0
  146. package/build/src/v1/content_bundle_service_client_config.json +34 -0
  147. package/build/src/v1/content_bundle_service_proto_list.json +122 -0
  148. package/build/src/v1/content_label_service_client.d.ts +1345 -0
  149. package/build/src/v1/content_label_service_client.js +1993 -0
  150. package/build/src/v1/content_label_service_client.js.map +1 -0
  151. package/build/src/v1/content_label_service_client_config.json +34 -0
  152. package/build/src/v1/content_label_service_proto_list.json +122 -0
  153. package/build/src/v1/content_service_client.d.ts +1345 -0
  154. package/build/src/v1/content_service_client.js +1993 -0
  155. package/build/src/v1/content_service_client.js.map +1 -0
  156. package/build/src/v1/content_service_client_config.json +34 -0
  157. package/build/src/v1/content_service_proto_list.json +122 -0
  158. package/build/src/v1/creative_template_service_client.d.ts +1345 -0
  159. package/build/src/v1/creative_template_service_client.js +1993 -0
  160. package/build/src/v1/creative_template_service_client.js.map +1 -0
  161. package/build/src/v1/creative_template_service_client_config.json +34 -0
  162. package/build/src/v1/creative_template_service_proto_list.json +122 -0
  163. package/build/src/v1/custom_field_service_client.d.ts +610 -6
  164. package/build/src/v1/custom_field_service_client.js +845 -5
  165. package/build/src/v1/custom_field_service_client.js.map +1 -1
  166. package/build/src/v1/custom_field_service_client_config.json +24 -0
  167. package/build/src/v1/custom_field_service_proto_list.json +49 -1
  168. package/build/src/v1/custom_targeting_key_service_client.d.ts +441 -0
  169. package/build/src/v1/custom_targeting_key_service_client.js +624 -0
  170. package/build/src/v1/custom_targeting_key_service_client.js.map +1 -1
  171. package/build/src/v1/custom_targeting_key_service_proto_list.json +49 -1
  172. package/build/src/v1/custom_targeting_value_service_client.d.ts +441 -0
  173. package/build/src/v1/custom_targeting_value_service_client.js +624 -0
  174. package/build/src/v1/custom_targeting_value_service_client.js.map +1 -1
  175. package/build/src/v1/custom_targeting_value_service_proto_list.json +49 -1
  176. package/build/src/v1/device_capability_service_client.d.ts +1345 -0
  177. package/build/src/v1/device_capability_service_client.js +1993 -0
  178. package/build/src/v1/device_capability_service_client.js.map +1 -0
  179. package/build/src/v1/device_capability_service_client_config.json +34 -0
  180. package/build/src/v1/device_capability_service_proto_list.json +122 -0
  181. package/build/src/v1/device_category_service_client.d.ts +444 -3
  182. package/build/src/v1/device_category_service_client.js +626 -2
  183. package/build/src/v1/device_category_service_client.js.map +1 -1
  184. package/build/src/v1/device_category_service_proto_list.json +49 -1
  185. package/build/src/v1/device_manufacturer_service_client.d.ts +1346 -0
  186. package/build/src/v1/device_manufacturer_service_client.js +1993 -0
  187. package/build/src/v1/device_manufacturer_service_client.js.map +1 -0
  188. package/build/src/v1/device_manufacturer_service_client_config.json +34 -0
  189. package/build/src/v1/device_manufacturer_service_proto_list.json +122 -0
  190. package/build/src/v1/entity_signals_mapping_service_client.d.ts +441 -0
  191. package/build/src/v1/entity_signals_mapping_service_client.js +624 -0
  192. package/build/src/v1/entity_signals_mapping_service_client.js.map +1 -1
  193. package/build/src/v1/entity_signals_mapping_service_proto_list.json +49 -1
  194. package/build/src/v1/gapic_metadata.json +1026 -4
  195. package/build/src/v1/geo_target_service_client.d.ts +447 -6
  196. package/build/src/v1/geo_target_service_client.js +628 -4
  197. package/build/src/v1/geo_target_service_client.js.map +1 -1
  198. package/build/src/v1/geo_target_service_proto_list.json +49 -1
  199. package/build/src/v1/index.d.ts +19 -0
  200. package/build/src/v1/index.js +39 -1
  201. package/build/src/v1/index.js.map +1 -1
  202. package/build/src/v1/mobile_carrier_service_client.d.ts +1345 -0
  203. package/build/src/v1/mobile_carrier_service_client.js +1993 -0
  204. package/build/src/v1/mobile_carrier_service_client.js.map +1 -0
  205. package/build/src/v1/mobile_carrier_service_client_config.json +34 -0
  206. package/build/src/v1/mobile_carrier_service_proto_list.json +122 -0
  207. package/build/src/v1/mobile_device_service_client.d.ts +1345 -0
  208. package/build/src/v1/mobile_device_service_client.js +1993 -0
  209. package/build/src/v1/mobile_device_service_client.js.map +1 -0
  210. package/build/src/v1/mobile_device_service_client_config.json +34 -0
  211. package/build/src/v1/mobile_device_service_proto_list.json +122 -0
  212. package/build/src/v1/mobile_device_submodel_service_client.d.ts +1352 -0
  213. package/build/src/v1/mobile_device_submodel_service_client.js +1997 -0
  214. package/build/src/v1/mobile_device_submodel_service_client.js.map +1 -0
  215. package/build/src/v1/mobile_device_submodel_service_client_config.json +34 -0
  216. package/build/src/v1/mobile_device_submodel_service_proto_list.json +122 -0
  217. package/build/src/v1/network_service_client.d.ts +441 -0
  218. package/build/src/v1/network_service_client.js +624 -0
  219. package/build/src/v1/network_service_client.js.map +1 -1
  220. package/build/src/v1/network_service_proto_list.json +49 -1
  221. package/build/src/v1/operating_system_service_client.d.ts +444 -3
  222. package/build/src/v1/operating_system_service_client.js +626 -2
  223. package/build/src/v1/operating_system_service_client.js.map +1 -1
  224. package/build/src/v1/operating_system_service_proto_list.json +49 -1
  225. package/build/src/v1/operating_system_version_service_client.d.ts +444 -3
  226. package/build/src/v1/operating_system_version_service_client.js +626 -2
  227. package/build/src/v1/operating_system_version_service_client.js.map +1 -1
  228. package/build/src/v1/operating_system_version_service_proto_list.json +49 -1
  229. package/build/src/v1/order_service_client.d.ts +447 -6
  230. package/build/src/v1/order_service_client.js +628 -4
  231. package/build/src/v1/order_service_client.js.map +1 -1
  232. package/build/src/v1/order_service_proto_list.json +49 -1
  233. package/build/src/v1/placement_service_client.d.ts +638 -6
  234. package/build/src/v1/placement_service_client.js +937 -61
  235. package/build/src/v1/placement_service_client.js.map +1 -1
  236. package/build/src/v1/placement_service_client_config.json +28 -0
  237. package/build/src/v1/placement_service_proto_list.json +49 -1
  238. package/build/src/v1/private_auction_deal_service_client.d.ts +444 -3
  239. package/build/src/v1/private_auction_deal_service_client.js +626 -2
  240. package/build/src/v1/private_auction_deal_service_client.js.map +1 -1
  241. package/build/src/v1/private_auction_deal_service_proto_list.json +49 -1
  242. package/build/src/v1/private_auction_service_client.d.ts +444 -3
  243. package/build/src/v1/private_auction_service_client.js +626 -2
  244. package/build/src/v1/private_auction_service_client.js.map +1 -1
  245. package/build/src/v1/private_auction_service_proto_list.json +49 -1
  246. package/build/src/v1/programmatic_buyer_service_client.d.ts +441 -0
  247. package/build/src/v1/programmatic_buyer_service_client.js +624 -0
  248. package/build/src/v1/programmatic_buyer_service_client.js.map +1 -1
  249. package/build/src/v1/programmatic_buyer_service_proto_list.json +49 -1
  250. package/build/src/v1/report_service_client.d.ts +461 -17
  251. package/build/src/v1/report_service_client.js +634 -8
  252. package/build/src/v1/report_service_client.js.map +1 -1
  253. package/build/src/v1/report_service_proto_list.json +49 -1
  254. package/build/src/v1/role_service_client.d.ts +447 -3
  255. package/build/src/v1/role_service_client.js +628 -2
  256. package/build/src/v1/role_service_client.js.map +1 -1
  257. package/build/src/v1/role_service_proto_list.json +49 -1
  258. package/build/src/v1/site_service_client.d.ts +1506 -0
  259. package/build/src/v1/site_service_client.js +2209 -0
  260. package/build/src/v1/site_service_client.js.map +1 -0
  261. package/build/src/v1/site_service_client_config.json +58 -0
  262. package/build/src/v1/site_service_proto_list.json +122 -0
  263. package/build/src/v1/taxonomy_category_service_client.d.ts +441 -0
  264. package/build/src/v1/taxonomy_category_service_client.js +624 -0
  265. package/build/src/v1/taxonomy_category_service_client.js.map +1 -1
  266. package/build/src/v1/taxonomy_category_service_proto_list.json +49 -1
  267. package/build/src/v1/team_service_client.d.ts +1508 -0
  268. package/build/src/v1/team_service_client.js +2209 -0
  269. package/build/src/v1/team_service_client.js.map +1 -0
  270. package/build/src/v1/team_service_client_config.json +58 -0
  271. package/build/src/v1/team_service_proto_list.json +122 -0
  272. package/build/src/v1/user_service_client.d.ts +441 -0
  273. package/build/src/v1/user_service_client.js +624 -0
  274. package/build/src/v1/user_service_client.js.map +1 -1
  275. package/build/src/v1/user_service_proto_list.json +49 -1
  276. package/package.json +1 -1
@@ -0,0 +1,2137 @@
1
+ "use strict";
2
+ // Copyright 2025 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.ContactServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ const google_gax_1 = require("google-gax");
23
+ /**
24
+ * Client JSON configuration object, loaded from
25
+ * `src/v1/contact_service_client_config.json`.
26
+ * This file defines retry strategy and timeouts for all API methods in this library.
27
+ */
28
+ const gapicConfig = require("./contact_service_client_config.json");
29
+ const version = require('../../../package.json').version;
30
+ /**
31
+ * Provides methods for handling `Contact` objects.
32
+ * @class
33
+ * @memberof v1
34
+ */
35
+ class ContactServiceClient {
36
+ _terminated = false;
37
+ _opts;
38
+ _providedCustomServicePath;
39
+ _gaxModule;
40
+ _gaxGrpc;
41
+ _protos;
42
+ _defaults;
43
+ _universeDomain;
44
+ _servicePath;
45
+ _log = google_gax_1.loggingUtils.log('admanager');
46
+ auth;
47
+ descriptors = {
48
+ page: {},
49
+ stream: {},
50
+ longrunning: {},
51
+ batching: {},
52
+ };
53
+ warn;
54
+ innerApiCalls;
55
+ pathTemplates;
56
+ contactServiceStub;
57
+ /**
58
+ * Construct an instance of ContactServiceClient.
59
+ *
60
+ * @param {object} [options] - The configuration object.
61
+ * The options accepted by the constructor are described in detail
62
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
63
+ * The common options are:
64
+ * @param {object} [options.credentials] - Credentials object.
65
+ * @param {string} [options.credentials.client_email]
66
+ * @param {string} [options.credentials.private_key]
67
+ * @param {string} [options.email] - Account email address. Required when
68
+ * using a .pem or .p12 keyFilename.
69
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
70
+ * .p12 key downloaded from the Google Developers Console. If you provide
71
+ * a path to a JSON file, the projectId option below is not necessary.
72
+ * NOTE: .pem and .p12 require you to specify options.email as well.
73
+ * @param {number} [options.port] - The port on which to connect to
74
+ * the remote host.
75
+ * @param {string} [options.projectId] - The project ID from the Google
76
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
77
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
78
+ * app is running in an environment which supports
79
+ * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
80
+ * your project ID will be detected automatically.
81
+ * @param {string} [options.apiEndpoint] - The domain name of the
82
+ * API remote host.
83
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
84
+ * Follows the structure of {@link gapicConfig}.
85
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
86
+ * For more information, please check the
87
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
88
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
89
+ * need to avoid loading the default gRPC version and want to use the fallback
90
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
91
+ * ```
92
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
93
+ * const client = new ContactServiceClient({fallback: true}, gax);
94
+ * ```
95
+ */
96
+ constructor(opts, gaxInstance) {
97
+ // Ensure that options include all the required fields.
98
+ const staticMembers = this.constructor;
99
+ if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
100
+ throw new Error('Please set either universe_domain or universeDomain, but not both.');
101
+ }
102
+ const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
103
+ this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
104
+ this._servicePath = 'admanager.' + this._universeDomain;
105
+ const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
106
+ this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
107
+ const port = opts?.port || staticMembers.port;
108
+ const clientConfig = opts?.clientConfig ?? {};
109
+ // Implicitly enable HTTP transport for the APIs that use REST as transport (e.g. Google Cloud Compute).
110
+ if (!opts) {
111
+ opts = { fallback: true };
112
+ }
113
+ else {
114
+ opts.fallback = opts.fallback ?? true;
115
+ }
116
+ const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
117
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
118
+ // Request numeric enum values if REST transport is used.
119
+ opts.numericEnums = true;
120
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
121
+ if (servicePath !== this._servicePath && !('scopes' in opts)) {
122
+ opts['scopes'] = staticMembers.scopes;
123
+ }
124
+ // Load google-gax module synchronously if needed
125
+ if (!gaxInstance) {
126
+ gaxInstance = require('google-gax');
127
+ }
128
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
129
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
130
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
131
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
132
+ // Save options to use in initialize() method.
133
+ this._opts = opts;
134
+ // Save the auth object to the client, for use by other methods.
135
+ this.auth = this._gaxGrpc.auth;
136
+ // Set useJWTAccessWithScope on the auth object.
137
+ this.auth.useJWTAccessWithScope = true;
138
+ // Set defaultServicePath on the auth object.
139
+ this.auth.defaultServicePath = this._servicePath;
140
+ // Set the default scopes in auth client if needed.
141
+ if (servicePath === this._servicePath) {
142
+ this.auth.defaultScopes = staticMembers.scopes;
143
+ }
144
+ // Determine the client header string.
145
+ const clientHeader = [
146
+ `gax/${this._gaxModule.version}`,
147
+ `gapic/${version}`,
148
+ ];
149
+ if (typeof process === 'object' && 'versions' in process) {
150
+ clientHeader.push(`gl-node/${process.versions.node}`);
151
+ }
152
+ else {
153
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
154
+ }
155
+ if (!opts.fallback) {
156
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
157
+ }
158
+ else {
159
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
160
+ }
161
+ if (opts.libName && opts.libVersion) {
162
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
163
+ }
164
+ // Load the applicable protos.
165
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
166
+ // This API contains "path templates"; forward-slash-separated
167
+ // identifiers to uniquely identify resources within the API.
168
+ // Create useful helper objects for these.
169
+ this.pathTemplates = {
170
+ adBreakPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}'),
171
+ adReviewCenterAdPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad}'),
172
+ adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
173
+ applicationPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/applications/{application}'),
174
+ audienceSegmentPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/audienceSegments/{audience_segment}'),
175
+ bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/bandwidthGroups/{bandwidth_group}'),
176
+ browserPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/browsers/{browser}'),
177
+ browserLanguagePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/browserLanguages/{browser_language}'),
178
+ cmsMetadataKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/cmsMetadataKeys/{cms_metadata_key}'),
179
+ cmsMetadataValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/cmsMetadataValues/{cms_metadata_value}'),
180
+ companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
181
+ contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
182
+ contentPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/content/{content}'),
183
+ contentBundlePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contentBundles/{content_bundle}'),
184
+ contentLabelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contentLabels/{content_label}'),
185
+ creativeTemplatePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/creativeTemplates/{creative_template}'),
186
+ customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
187
+ customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
188
+ customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingValues/{custom_targeting_value}'),
189
+ deviceCapabilityPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceCapabilities/{device_capability}'),
190
+ deviceCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceCategories/{device_category}'),
191
+ deviceManufacturerPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceManufacturers/{device_manufacturer}'),
192
+ entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}'),
193
+ geoTargetPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/geoTargets/{geo_target}'),
194
+ labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
195
+ liveStreamEventPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEvents/{live_stream_event}'),
196
+ mobileCarrierPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/mobileCarriers/{mobile_carrier}'),
197
+ mobileDevicePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/mobileDevices/{mobile_device}'),
198
+ mobileDeviceSubmodelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/mobileDeviceSubmodels/{mobile_device_submodel}'),
199
+ networkPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}'),
200
+ operatingSystemPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystems/{operating_system}'),
201
+ operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystemVersions/{operating_system_version}'),
202
+ orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
203
+ placementPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/placements/{placement}'),
204
+ privateAuctionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctions/{private_auction}'),
205
+ privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctionDeals/{private_auction_deal}'),
206
+ programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/programmaticBuyers/{programmatic_buyer}'),
207
+ reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
208
+ rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
209
+ sitePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/sites/{site}'),
210
+ taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
211
+ teamPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/teams/{team}'),
212
+ userPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/users/{user}'),
213
+ webPropertyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/webProperties/{web_property}'),
214
+ };
215
+ // Some of the methods on this service return "paged" results,
216
+ // (e.g. 50 results at a time, with tokens to get subsequent
217
+ // pages). Denote the keys used for pagination and results.
218
+ this.descriptors.page = {
219
+ listContacts: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'contacts')
220
+ };
221
+ // Put together the default options sent with requests.
222
+ this._defaults = this._gaxGrpc.constructSettings('google.ads.admanager.v1.ContactService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
223
+ // Set up a dictionary of "inner API calls"; the core implementation
224
+ // of calling the API is handled in `google-gax`, with this code
225
+ // merely providing the destination and request information.
226
+ this.innerApiCalls = {};
227
+ // Add a warn function to the client constructor so it can be easily tested.
228
+ this.warn = this._gaxModule.warn;
229
+ }
230
+ /**
231
+ * Initialize the client.
232
+ * Performs asynchronous operations (such as authentication) and prepares the client.
233
+ * This function will be called automatically when any class method is called for the
234
+ * first time, but if you need to initialize it before calling an actual method,
235
+ * feel free to call initialize() directly.
236
+ *
237
+ * You can await on this method if you want to make sure the client is initialized.
238
+ *
239
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
240
+ */
241
+ initialize() {
242
+ // If the client stub promise is already initialized, return immediately.
243
+ if (this.contactServiceStub) {
244
+ return this.contactServiceStub;
245
+ }
246
+ // Put together the "service stub" for
247
+ // google.ads.admanager.v1.ContactService.
248
+ this.contactServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
249
+ this._protos.lookupService('google.ads.admanager.v1.ContactService') :
250
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
251
+ this._protos.google.ads.admanager.v1.ContactService, this._opts, this._providedCustomServicePath);
252
+ // Iterate over each of the methods that the service provides
253
+ // and create an API call method for each.
254
+ const contactServiceStubMethods = ['getContact', 'listContacts', 'createContact', 'batchCreateContacts', 'updateContact', 'batchUpdateContacts'];
255
+ for (const methodName of contactServiceStubMethods) {
256
+ const callPromise = this.contactServiceStub.then(stub => (...args) => {
257
+ if (this._terminated) {
258
+ return Promise.reject('The client has already been closed.');
259
+ }
260
+ const func = stub[methodName];
261
+ return func.apply(stub, args);
262
+ }, (err) => () => {
263
+ throw err;
264
+ });
265
+ const descriptor = this.descriptors.page[methodName] ||
266
+ undefined;
267
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
268
+ this.innerApiCalls[methodName] = apiCall;
269
+ }
270
+ return this.contactServiceStub;
271
+ }
272
+ /**
273
+ * The DNS address for this API service.
274
+ * @deprecated Use the apiEndpoint method of the client instance.
275
+ * @returns {string} The DNS address for this service.
276
+ */
277
+ static get servicePath() {
278
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
279
+ process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
280
+ }
281
+ return 'admanager.googleapis.com';
282
+ }
283
+ /**
284
+ * The DNS address for this API service - same as servicePath.
285
+ * @deprecated Use the apiEndpoint method of the client instance.
286
+ * @returns {string} The DNS address for this service.
287
+ */
288
+ static get apiEndpoint() {
289
+ if (typeof process === 'object' && typeof process.emitWarning === 'function') {
290
+ process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
291
+ }
292
+ return 'admanager.googleapis.com';
293
+ }
294
+ /**
295
+ * The DNS address for this API service.
296
+ * @returns {string} The DNS address for this service.
297
+ */
298
+ get apiEndpoint() {
299
+ return this._servicePath;
300
+ }
301
+ get universeDomain() {
302
+ return this._universeDomain;
303
+ }
304
+ /**
305
+ * The port for this API service.
306
+ * @returns {number} The default port for this service.
307
+ */
308
+ static get port() {
309
+ return 443;
310
+ }
311
+ /**
312
+ * The scopes needed to make gRPC calls for every method defined
313
+ * in this service.
314
+ * @returns {string[]} List of default scopes.
315
+ */
316
+ static get scopes() {
317
+ return [
318
+ 'https://www.googleapis.com/auth/admanager'
319
+ ];
320
+ }
321
+ /**
322
+ * Return the project ID used by this class.
323
+ * @returns {Promise} A promise that resolves to string containing the project ID.
324
+ */
325
+ getProjectId(callback) {
326
+ if (callback) {
327
+ this.auth.getProjectId(callback);
328
+ return;
329
+ }
330
+ return this.auth.getProjectId();
331
+ }
332
+ getContact(request, optionsOrCallback, callback) {
333
+ request = request || {};
334
+ let options;
335
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
336
+ callback = optionsOrCallback;
337
+ options = {};
338
+ }
339
+ else {
340
+ options = optionsOrCallback;
341
+ }
342
+ options = options || {};
343
+ options.otherArgs = options.otherArgs || {};
344
+ options.otherArgs.headers = options.otherArgs.headers || {};
345
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
346
+ 'name': request.name ?? '',
347
+ });
348
+ this.initialize().catch(err => { throw err; });
349
+ this._log.info('getContact request %j', request);
350
+ const wrappedCallback = callback
351
+ ? (error, response, options, rawResponse) => {
352
+ this._log.info('getContact response %j', response);
353
+ callback(error, response, options, rawResponse); // We verified callback above.
354
+ }
355
+ : undefined;
356
+ return this.innerApiCalls.getContact(request, options, wrappedCallback)
357
+ ?.then(([response, options, rawResponse]) => {
358
+ this._log.info('getContact response %j', response);
359
+ return [response, options, rawResponse];
360
+ }).catch((error) => {
361
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
362
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
363
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
364
+ }
365
+ throw error;
366
+ });
367
+ }
368
+ createContact(request, optionsOrCallback, callback) {
369
+ request = request || {};
370
+ let options;
371
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
372
+ callback = optionsOrCallback;
373
+ options = {};
374
+ }
375
+ else {
376
+ options = optionsOrCallback;
377
+ }
378
+ options = options || {};
379
+ options.otherArgs = options.otherArgs || {};
380
+ options.otherArgs.headers = options.otherArgs.headers || {};
381
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
382
+ 'parent': request.parent ?? '',
383
+ });
384
+ this.initialize().catch(err => { throw err; });
385
+ this._log.info('createContact request %j', request);
386
+ const wrappedCallback = callback
387
+ ? (error, response, options, rawResponse) => {
388
+ this._log.info('createContact response %j', response);
389
+ callback(error, response, options, rawResponse); // We verified callback above.
390
+ }
391
+ : undefined;
392
+ return this.innerApiCalls.createContact(request, options, wrappedCallback)
393
+ ?.then(([response, options, rawResponse]) => {
394
+ this._log.info('createContact response %j', response);
395
+ return [response, options, rawResponse];
396
+ }).catch((error) => {
397
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
398
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
399
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
400
+ }
401
+ throw error;
402
+ });
403
+ }
404
+ batchCreateContacts(request, optionsOrCallback, callback) {
405
+ request = request || {};
406
+ let options;
407
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
408
+ callback = optionsOrCallback;
409
+ options = {};
410
+ }
411
+ else {
412
+ options = optionsOrCallback;
413
+ }
414
+ options = options || {};
415
+ options.otherArgs = options.otherArgs || {};
416
+ options.otherArgs.headers = options.otherArgs.headers || {};
417
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
418
+ 'parent': request.parent ?? '',
419
+ });
420
+ this.initialize().catch(err => { throw err; });
421
+ this._log.info('batchCreateContacts request %j', request);
422
+ const wrappedCallback = callback
423
+ ? (error, response, options, rawResponse) => {
424
+ this._log.info('batchCreateContacts response %j', response);
425
+ callback(error, response, options, rawResponse); // We verified callback above.
426
+ }
427
+ : undefined;
428
+ return this.innerApiCalls.batchCreateContacts(request, options, wrappedCallback)
429
+ ?.then(([response, options, rawResponse]) => {
430
+ this._log.info('batchCreateContacts response %j', response);
431
+ return [response, options, rawResponse];
432
+ }).catch((error) => {
433
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
434
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
435
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
436
+ }
437
+ throw error;
438
+ });
439
+ }
440
+ updateContact(request, optionsOrCallback, callback) {
441
+ request = request || {};
442
+ let options;
443
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
444
+ callback = optionsOrCallback;
445
+ options = {};
446
+ }
447
+ else {
448
+ options = optionsOrCallback;
449
+ }
450
+ options = options || {};
451
+ options.otherArgs = options.otherArgs || {};
452
+ options.otherArgs.headers = options.otherArgs.headers || {};
453
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
454
+ 'contact.name': request.contact.name ?? '',
455
+ });
456
+ this.initialize().catch(err => { throw err; });
457
+ this._log.info('updateContact request %j', request);
458
+ const wrappedCallback = callback
459
+ ? (error, response, options, rawResponse) => {
460
+ this._log.info('updateContact response %j', response);
461
+ callback(error, response, options, rawResponse); // We verified callback above.
462
+ }
463
+ : undefined;
464
+ return this.innerApiCalls.updateContact(request, options, wrappedCallback)
465
+ ?.then(([response, options, rawResponse]) => {
466
+ this._log.info('updateContact response %j', response);
467
+ return [response, options, rawResponse];
468
+ }).catch((error) => {
469
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
470
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
471
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
472
+ }
473
+ throw error;
474
+ });
475
+ }
476
+ batchUpdateContacts(request, optionsOrCallback, callback) {
477
+ request = request || {};
478
+ let options;
479
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
480
+ callback = optionsOrCallback;
481
+ options = {};
482
+ }
483
+ else {
484
+ options = optionsOrCallback;
485
+ }
486
+ options = options || {};
487
+ options.otherArgs = options.otherArgs || {};
488
+ options.otherArgs.headers = options.otherArgs.headers || {};
489
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
490
+ 'parent': request.parent ?? '',
491
+ });
492
+ this.initialize().catch(err => { throw err; });
493
+ this._log.info('batchUpdateContacts request %j', request);
494
+ const wrappedCallback = callback
495
+ ? (error, response, options, rawResponse) => {
496
+ this._log.info('batchUpdateContacts response %j', response);
497
+ callback(error, response, options, rawResponse); // We verified callback above.
498
+ }
499
+ : undefined;
500
+ return this.innerApiCalls.batchUpdateContacts(request, options, wrappedCallback)
501
+ ?.then(([response, options, rawResponse]) => {
502
+ this._log.info('batchUpdateContacts response %j', response);
503
+ return [response, options, rawResponse];
504
+ }).catch((error) => {
505
+ if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
506
+ const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
507
+ error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
508
+ }
509
+ throw error;
510
+ });
511
+ }
512
+ listContacts(request, optionsOrCallback, callback) {
513
+ request = request || {};
514
+ let options;
515
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
516
+ callback = optionsOrCallback;
517
+ options = {};
518
+ }
519
+ else {
520
+ options = optionsOrCallback;
521
+ }
522
+ options = options || {};
523
+ options.otherArgs = options.otherArgs || {};
524
+ options.otherArgs.headers = options.otherArgs.headers || {};
525
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
526
+ 'parent': request.parent ?? '',
527
+ });
528
+ this.initialize().catch(err => { throw err; });
529
+ const wrappedCallback = callback
530
+ ? (error, values, nextPageRequest, rawResponse) => {
531
+ this._log.info('listContacts values %j', values);
532
+ callback(error, values, nextPageRequest, rawResponse); // We verified callback above.
533
+ }
534
+ : undefined;
535
+ this._log.info('listContacts request %j', request);
536
+ return this.innerApiCalls
537
+ .listContacts(request, options, wrappedCallback)
538
+ ?.then(([response, input, output]) => {
539
+ this._log.info('listContacts values %j', response);
540
+ return [response, input, output];
541
+ });
542
+ }
543
+ /**
544
+ * Equivalent to `listContacts`, but returns a NodeJS Stream object.
545
+ * @param {Object} request
546
+ * The request object that will be sent.
547
+ * @param {string} request.parent
548
+ * Required. The parent, which owns this collection of Contacts.
549
+ * Format: `networks/{network_code}`
550
+ * @param {number} [request.pageSize]
551
+ * Optional. The maximum number of `Contacts` to return. The service may
552
+ * return fewer than this value. If unspecified, at most 50 `Contacts` will be
553
+ * returned. The maximum value is 1000; values greater than 1000 will be
554
+ * coerced to 1000.
555
+ * @param {string} [request.pageToken]
556
+ * Optional. A page token, received from a previous `ListContacts` call.
557
+ * Provide this to retrieve the subsequent page.
558
+ *
559
+ * When paginating, all other parameters provided to `ListContacts` must match
560
+ * the call that provided the page token.
561
+ * @param {string} [request.filter]
562
+ * Optional. Expression to filter the response.
563
+ * See syntax details at
564
+ * https://developers.google.com/ad-manager/api/beta/filters
565
+ * @param {string} [request.orderBy]
566
+ * Optional. Expression to specify sorting order.
567
+ * See syntax details at
568
+ * https://developers.google.com/ad-manager/api/beta/filters#order
569
+ * @param {number} [request.skip]
570
+ * Optional. Number of individual resources to skip while paginating.
571
+ * @param {object} [options]
572
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
573
+ * @returns {Stream}
574
+ * An object stream which emits an object representing {@link protos.google.ads.admanager.v1.Contact|Contact} on 'data' event.
575
+ * The client library will perform auto-pagination by default: it will call the API as many
576
+ * times as needed. Note that it can affect your quota.
577
+ * We recommend using `listContactsAsync()`
578
+ * method described below for async iteration which you can stop as needed.
579
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
580
+ * for more details and examples.
581
+ */
582
+ listContactsStream(request, options) {
583
+ request = request || {};
584
+ options = options || {};
585
+ options.otherArgs = options.otherArgs || {};
586
+ options.otherArgs.headers = options.otherArgs.headers || {};
587
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
588
+ 'parent': request.parent ?? '',
589
+ });
590
+ const defaultCallSettings = this._defaults['listContacts'];
591
+ const callSettings = defaultCallSettings.merge(options);
592
+ this.initialize().catch(err => { throw err; });
593
+ this._log.info('listContacts stream %j', request);
594
+ return this.descriptors.page.listContacts.createStream(this.innerApiCalls.listContacts, request, callSettings);
595
+ }
596
+ /**
597
+ * Equivalent to `listContacts`, but returns an iterable object.
598
+ *
599
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
600
+ * @param {Object} request
601
+ * The request object that will be sent.
602
+ * @param {string} request.parent
603
+ * Required. The parent, which owns this collection of Contacts.
604
+ * Format: `networks/{network_code}`
605
+ * @param {number} [request.pageSize]
606
+ * Optional. The maximum number of `Contacts` to return. The service may
607
+ * return fewer than this value. If unspecified, at most 50 `Contacts` will be
608
+ * returned. The maximum value is 1000; values greater than 1000 will be
609
+ * coerced to 1000.
610
+ * @param {string} [request.pageToken]
611
+ * Optional. A page token, received from a previous `ListContacts` call.
612
+ * Provide this to retrieve the subsequent page.
613
+ *
614
+ * When paginating, all other parameters provided to `ListContacts` must match
615
+ * the call that provided the page token.
616
+ * @param {string} [request.filter]
617
+ * Optional. Expression to filter the response.
618
+ * See syntax details at
619
+ * https://developers.google.com/ad-manager/api/beta/filters
620
+ * @param {string} [request.orderBy]
621
+ * Optional. Expression to specify sorting order.
622
+ * See syntax details at
623
+ * https://developers.google.com/ad-manager/api/beta/filters#order
624
+ * @param {number} [request.skip]
625
+ * Optional. Number of individual resources to skip while paginating.
626
+ * @param {object} [options]
627
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
628
+ * @returns {Object}
629
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
630
+ * When you iterate the returned iterable, each element will be an object representing
631
+ * {@link protos.google.ads.admanager.v1.Contact|Contact}. The API will be called under the hood as needed, once per the page,
632
+ * so you can stop the iteration when you don't need more results.
633
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
634
+ * for more details and examples.
635
+ * @example <caption>include:samples/generated/v1/contact_service.list_contacts.js</caption>
636
+ * region_tag:admanager_v1_generated_ContactService_ListContacts_async
637
+ */
638
+ listContactsAsync(request, options) {
639
+ request = request || {};
640
+ options = options || {};
641
+ options.otherArgs = options.otherArgs || {};
642
+ options.otherArgs.headers = options.otherArgs.headers || {};
643
+ options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
644
+ 'parent': request.parent ?? '',
645
+ });
646
+ const defaultCallSettings = this._defaults['listContacts'];
647
+ const callSettings = defaultCallSettings.merge(options);
648
+ this.initialize().catch(err => { throw err; });
649
+ this._log.info('listContacts iterate %j', request);
650
+ return this.descriptors.page.listContacts.asyncIterate(this.innerApiCalls['listContacts'], request, callSettings);
651
+ }
652
+ // --------------------
653
+ // -- Path templates --
654
+ // --------------------
655
+ /**
656
+ * Return a fully-qualified adBreak resource name string.
657
+ *
658
+ * @param {string} network_code
659
+ * @param {string} asset_key
660
+ * @param {string} ad_break
661
+ * @returns {string} Resource name string.
662
+ */
663
+ adBreakPath(networkCode, assetKey, adBreak) {
664
+ return this.pathTemplates.adBreakPathTemplate.render({
665
+ network_code: networkCode,
666
+ asset_key: assetKey,
667
+ ad_break: adBreak,
668
+ });
669
+ }
670
+ /**
671
+ * Parse the network_code from AdBreak resource.
672
+ *
673
+ * @param {string} adBreakName
674
+ * A fully-qualified path representing AdBreak resource.
675
+ * @returns {string} A string representing the network_code.
676
+ */
677
+ matchNetworkCodeFromAdBreakName(adBreakName) {
678
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code;
679
+ }
680
+ /**
681
+ * Parse the asset_key from AdBreak resource.
682
+ *
683
+ * @param {string} adBreakName
684
+ * A fully-qualified path representing AdBreak resource.
685
+ * @returns {string} A string representing the asset_key.
686
+ */
687
+ matchAssetKeyFromAdBreakName(adBreakName) {
688
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key;
689
+ }
690
+ /**
691
+ * Parse the ad_break from AdBreak resource.
692
+ *
693
+ * @param {string} adBreakName
694
+ * A fully-qualified path representing AdBreak resource.
695
+ * @returns {string} A string representing the ad_break.
696
+ */
697
+ matchAdBreakFromAdBreakName(adBreakName) {
698
+ return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break;
699
+ }
700
+ /**
701
+ * Return a fully-qualified adReviewCenterAd resource name string.
702
+ *
703
+ * @param {string} network_code
704
+ * @param {string} web_property_code
705
+ * @param {string} ad_review_center_ad
706
+ * @returns {string} Resource name string.
707
+ */
708
+ adReviewCenterAdPath(networkCode, webPropertyCode, adReviewCenterAd) {
709
+ return this.pathTemplates.adReviewCenterAdPathTemplate.render({
710
+ network_code: networkCode,
711
+ web_property_code: webPropertyCode,
712
+ ad_review_center_ad: adReviewCenterAd,
713
+ });
714
+ }
715
+ /**
716
+ * Parse the network_code from AdReviewCenterAd resource.
717
+ *
718
+ * @param {string} adReviewCenterAdName
719
+ * A fully-qualified path representing AdReviewCenterAd resource.
720
+ * @returns {string} A string representing the network_code.
721
+ */
722
+ matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName) {
723
+ return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).network_code;
724
+ }
725
+ /**
726
+ * Parse the web_property_code from AdReviewCenterAd resource.
727
+ *
728
+ * @param {string} adReviewCenterAdName
729
+ * A fully-qualified path representing AdReviewCenterAd resource.
730
+ * @returns {string} A string representing the web_property_code.
731
+ */
732
+ matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName) {
733
+ return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).web_property_code;
734
+ }
735
+ /**
736
+ * Parse the ad_review_center_ad from AdReviewCenterAd resource.
737
+ *
738
+ * @param {string} adReviewCenterAdName
739
+ * A fully-qualified path representing AdReviewCenterAd resource.
740
+ * @returns {string} A string representing the ad_review_center_ad.
741
+ */
742
+ matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName) {
743
+ return this.pathTemplates.adReviewCenterAdPathTemplate.match(adReviewCenterAdName).ad_review_center_ad;
744
+ }
745
+ /**
746
+ * Return a fully-qualified adUnit resource name string.
747
+ *
748
+ * @param {string} network_code
749
+ * @param {string} ad_unit
750
+ * @returns {string} Resource name string.
751
+ */
752
+ adUnitPath(networkCode, adUnit) {
753
+ return this.pathTemplates.adUnitPathTemplate.render({
754
+ network_code: networkCode,
755
+ ad_unit: adUnit,
756
+ });
757
+ }
758
+ /**
759
+ * Parse the network_code from AdUnit resource.
760
+ *
761
+ * @param {string} adUnitName
762
+ * A fully-qualified path representing AdUnit resource.
763
+ * @returns {string} A string representing the network_code.
764
+ */
765
+ matchNetworkCodeFromAdUnitName(adUnitName) {
766
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).network_code;
767
+ }
768
+ /**
769
+ * Parse the ad_unit from AdUnit resource.
770
+ *
771
+ * @param {string} adUnitName
772
+ * A fully-qualified path representing AdUnit resource.
773
+ * @returns {string} A string representing the ad_unit.
774
+ */
775
+ matchAdUnitFromAdUnitName(adUnitName) {
776
+ return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
777
+ }
778
+ /**
779
+ * Return a fully-qualified application resource name string.
780
+ *
781
+ * @param {string} network_code
782
+ * @param {string} application
783
+ * @returns {string} Resource name string.
784
+ */
785
+ applicationPath(networkCode, application) {
786
+ return this.pathTemplates.applicationPathTemplate.render({
787
+ network_code: networkCode,
788
+ application: application,
789
+ });
790
+ }
791
+ /**
792
+ * Parse the network_code from Application resource.
793
+ *
794
+ * @param {string} applicationName
795
+ * A fully-qualified path representing Application resource.
796
+ * @returns {string} A string representing the network_code.
797
+ */
798
+ matchNetworkCodeFromApplicationName(applicationName) {
799
+ return this.pathTemplates.applicationPathTemplate.match(applicationName).network_code;
800
+ }
801
+ /**
802
+ * Parse the application from Application resource.
803
+ *
804
+ * @param {string} applicationName
805
+ * A fully-qualified path representing Application resource.
806
+ * @returns {string} A string representing the application.
807
+ */
808
+ matchApplicationFromApplicationName(applicationName) {
809
+ return this.pathTemplates.applicationPathTemplate.match(applicationName).application;
810
+ }
811
+ /**
812
+ * Return a fully-qualified audienceSegment resource name string.
813
+ *
814
+ * @param {string} network_code
815
+ * @param {string} audience_segment
816
+ * @returns {string} Resource name string.
817
+ */
818
+ audienceSegmentPath(networkCode, audienceSegment) {
819
+ return this.pathTemplates.audienceSegmentPathTemplate.render({
820
+ network_code: networkCode,
821
+ audience_segment: audienceSegment,
822
+ });
823
+ }
824
+ /**
825
+ * Parse the network_code from AudienceSegment resource.
826
+ *
827
+ * @param {string} audienceSegmentName
828
+ * A fully-qualified path representing AudienceSegment resource.
829
+ * @returns {string} A string representing the network_code.
830
+ */
831
+ matchNetworkCodeFromAudienceSegmentName(audienceSegmentName) {
832
+ return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).network_code;
833
+ }
834
+ /**
835
+ * Parse the audience_segment from AudienceSegment resource.
836
+ *
837
+ * @param {string} audienceSegmentName
838
+ * A fully-qualified path representing AudienceSegment resource.
839
+ * @returns {string} A string representing the audience_segment.
840
+ */
841
+ matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName) {
842
+ return this.pathTemplates.audienceSegmentPathTemplate.match(audienceSegmentName).audience_segment;
843
+ }
844
+ /**
845
+ * Return a fully-qualified bandwidthGroup resource name string.
846
+ *
847
+ * @param {string} network_code
848
+ * @param {string} bandwidth_group
849
+ * @returns {string} Resource name string.
850
+ */
851
+ bandwidthGroupPath(networkCode, bandwidthGroup) {
852
+ return this.pathTemplates.bandwidthGroupPathTemplate.render({
853
+ network_code: networkCode,
854
+ bandwidth_group: bandwidthGroup,
855
+ });
856
+ }
857
+ /**
858
+ * Parse the network_code from BandwidthGroup resource.
859
+ *
860
+ * @param {string} bandwidthGroupName
861
+ * A fully-qualified path representing BandwidthGroup resource.
862
+ * @returns {string} A string representing the network_code.
863
+ */
864
+ matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName) {
865
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code;
866
+ }
867
+ /**
868
+ * Parse the bandwidth_group from BandwidthGroup resource.
869
+ *
870
+ * @param {string} bandwidthGroupName
871
+ * A fully-qualified path representing BandwidthGroup resource.
872
+ * @returns {string} A string representing the bandwidth_group.
873
+ */
874
+ matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName) {
875
+ return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group;
876
+ }
877
+ /**
878
+ * Return a fully-qualified browser resource name string.
879
+ *
880
+ * @param {string} network_code
881
+ * @param {string} browser
882
+ * @returns {string} Resource name string.
883
+ */
884
+ browserPath(networkCode, browser) {
885
+ return this.pathTemplates.browserPathTemplate.render({
886
+ network_code: networkCode,
887
+ browser: browser,
888
+ });
889
+ }
890
+ /**
891
+ * Parse the network_code from Browser resource.
892
+ *
893
+ * @param {string} browserName
894
+ * A fully-qualified path representing Browser resource.
895
+ * @returns {string} A string representing the network_code.
896
+ */
897
+ matchNetworkCodeFromBrowserName(browserName) {
898
+ return this.pathTemplates.browserPathTemplate.match(browserName).network_code;
899
+ }
900
+ /**
901
+ * Parse the browser from Browser resource.
902
+ *
903
+ * @param {string} browserName
904
+ * A fully-qualified path representing Browser resource.
905
+ * @returns {string} A string representing the browser.
906
+ */
907
+ matchBrowserFromBrowserName(browserName) {
908
+ return this.pathTemplates.browserPathTemplate.match(browserName).browser;
909
+ }
910
+ /**
911
+ * Return a fully-qualified browserLanguage resource name string.
912
+ *
913
+ * @param {string} network_code
914
+ * @param {string} browser_language
915
+ * @returns {string} Resource name string.
916
+ */
917
+ browserLanguagePath(networkCode, browserLanguage) {
918
+ return this.pathTemplates.browserLanguagePathTemplate.render({
919
+ network_code: networkCode,
920
+ browser_language: browserLanguage,
921
+ });
922
+ }
923
+ /**
924
+ * Parse the network_code from BrowserLanguage resource.
925
+ *
926
+ * @param {string} browserLanguageName
927
+ * A fully-qualified path representing BrowserLanguage resource.
928
+ * @returns {string} A string representing the network_code.
929
+ */
930
+ matchNetworkCodeFromBrowserLanguageName(browserLanguageName) {
931
+ return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).network_code;
932
+ }
933
+ /**
934
+ * Parse the browser_language from BrowserLanguage resource.
935
+ *
936
+ * @param {string} browserLanguageName
937
+ * A fully-qualified path representing BrowserLanguage resource.
938
+ * @returns {string} A string representing the browser_language.
939
+ */
940
+ matchBrowserLanguageFromBrowserLanguageName(browserLanguageName) {
941
+ return this.pathTemplates.browserLanguagePathTemplate.match(browserLanguageName).browser_language;
942
+ }
943
+ /**
944
+ * Return a fully-qualified cmsMetadataKey resource name string.
945
+ *
946
+ * @param {string} network_code
947
+ * @param {string} cms_metadata_key
948
+ * @returns {string} Resource name string.
949
+ */
950
+ cmsMetadataKeyPath(networkCode, cmsMetadataKey) {
951
+ return this.pathTemplates.cmsMetadataKeyPathTemplate.render({
952
+ network_code: networkCode,
953
+ cms_metadata_key: cmsMetadataKey,
954
+ });
955
+ }
956
+ /**
957
+ * Parse the network_code from CmsMetadataKey resource.
958
+ *
959
+ * @param {string} cmsMetadataKeyName
960
+ * A fully-qualified path representing CmsMetadataKey resource.
961
+ * @returns {string} A string representing the network_code.
962
+ */
963
+ matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName) {
964
+ return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).network_code;
965
+ }
966
+ /**
967
+ * Parse the cms_metadata_key from CmsMetadataKey resource.
968
+ *
969
+ * @param {string} cmsMetadataKeyName
970
+ * A fully-qualified path representing CmsMetadataKey resource.
971
+ * @returns {string} A string representing the cms_metadata_key.
972
+ */
973
+ matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName) {
974
+ return this.pathTemplates.cmsMetadataKeyPathTemplate.match(cmsMetadataKeyName).cms_metadata_key;
975
+ }
976
+ /**
977
+ * Return a fully-qualified cmsMetadataValue resource name string.
978
+ *
979
+ * @param {string} network_code
980
+ * @param {string} cms_metadata_value
981
+ * @returns {string} Resource name string.
982
+ */
983
+ cmsMetadataValuePath(networkCode, cmsMetadataValue) {
984
+ return this.pathTemplates.cmsMetadataValuePathTemplate.render({
985
+ network_code: networkCode,
986
+ cms_metadata_value: cmsMetadataValue,
987
+ });
988
+ }
989
+ /**
990
+ * Parse the network_code from CmsMetadataValue resource.
991
+ *
992
+ * @param {string} cmsMetadataValueName
993
+ * A fully-qualified path representing CmsMetadataValue resource.
994
+ * @returns {string} A string representing the network_code.
995
+ */
996
+ matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName) {
997
+ return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).network_code;
998
+ }
999
+ /**
1000
+ * Parse the cms_metadata_value from CmsMetadataValue resource.
1001
+ *
1002
+ * @param {string} cmsMetadataValueName
1003
+ * A fully-qualified path representing CmsMetadataValue resource.
1004
+ * @returns {string} A string representing the cms_metadata_value.
1005
+ */
1006
+ matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName) {
1007
+ return this.pathTemplates.cmsMetadataValuePathTemplate.match(cmsMetadataValueName).cms_metadata_value;
1008
+ }
1009
+ /**
1010
+ * Return a fully-qualified company resource name string.
1011
+ *
1012
+ * @param {string} network_code
1013
+ * @param {string} company
1014
+ * @returns {string} Resource name string.
1015
+ */
1016
+ companyPath(networkCode, company) {
1017
+ return this.pathTemplates.companyPathTemplate.render({
1018
+ network_code: networkCode,
1019
+ company: company,
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Parse the network_code from Company resource.
1024
+ *
1025
+ * @param {string} companyName
1026
+ * A fully-qualified path representing Company resource.
1027
+ * @returns {string} A string representing the network_code.
1028
+ */
1029
+ matchNetworkCodeFromCompanyName(companyName) {
1030
+ return this.pathTemplates.companyPathTemplate.match(companyName).network_code;
1031
+ }
1032
+ /**
1033
+ * Parse the company from Company resource.
1034
+ *
1035
+ * @param {string} companyName
1036
+ * A fully-qualified path representing Company resource.
1037
+ * @returns {string} A string representing the company.
1038
+ */
1039
+ matchCompanyFromCompanyName(companyName) {
1040
+ return this.pathTemplates.companyPathTemplate.match(companyName).company;
1041
+ }
1042
+ /**
1043
+ * Return a fully-qualified contact resource name string.
1044
+ *
1045
+ * @param {string} network_code
1046
+ * @param {string} contact
1047
+ * @returns {string} Resource name string.
1048
+ */
1049
+ contactPath(networkCode, contact) {
1050
+ return this.pathTemplates.contactPathTemplate.render({
1051
+ network_code: networkCode,
1052
+ contact: contact,
1053
+ });
1054
+ }
1055
+ /**
1056
+ * Parse the network_code from Contact resource.
1057
+ *
1058
+ * @param {string} contactName
1059
+ * A fully-qualified path representing Contact resource.
1060
+ * @returns {string} A string representing the network_code.
1061
+ */
1062
+ matchNetworkCodeFromContactName(contactName) {
1063
+ return this.pathTemplates.contactPathTemplate.match(contactName).network_code;
1064
+ }
1065
+ /**
1066
+ * Parse the contact from Contact resource.
1067
+ *
1068
+ * @param {string} contactName
1069
+ * A fully-qualified path representing Contact resource.
1070
+ * @returns {string} A string representing the contact.
1071
+ */
1072
+ matchContactFromContactName(contactName) {
1073
+ return this.pathTemplates.contactPathTemplate.match(contactName).contact;
1074
+ }
1075
+ /**
1076
+ * Return a fully-qualified content resource name string.
1077
+ *
1078
+ * @param {string} network_code
1079
+ * @param {string} content
1080
+ * @returns {string} Resource name string.
1081
+ */
1082
+ contentPath(networkCode, content) {
1083
+ return this.pathTemplates.contentPathTemplate.render({
1084
+ network_code: networkCode,
1085
+ content: content,
1086
+ });
1087
+ }
1088
+ /**
1089
+ * Parse the network_code from Content resource.
1090
+ *
1091
+ * @param {string} contentName
1092
+ * A fully-qualified path representing Content resource.
1093
+ * @returns {string} A string representing the network_code.
1094
+ */
1095
+ matchNetworkCodeFromContentName(contentName) {
1096
+ return this.pathTemplates.contentPathTemplate.match(contentName).network_code;
1097
+ }
1098
+ /**
1099
+ * Parse the content from Content resource.
1100
+ *
1101
+ * @param {string} contentName
1102
+ * A fully-qualified path representing Content resource.
1103
+ * @returns {string} A string representing the content.
1104
+ */
1105
+ matchContentFromContentName(contentName) {
1106
+ return this.pathTemplates.contentPathTemplate.match(contentName).content;
1107
+ }
1108
+ /**
1109
+ * Return a fully-qualified contentBundle resource name string.
1110
+ *
1111
+ * @param {string} network_code
1112
+ * @param {string} content_bundle
1113
+ * @returns {string} Resource name string.
1114
+ */
1115
+ contentBundlePath(networkCode, contentBundle) {
1116
+ return this.pathTemplates.contentBundlePathTemplate.render({
1117
+ network_code: networkCode,
1118
+ content_bundle: contentBundle,
1119
+ });
1120
+ }
1121
+ /**
1122
+ * Parse the network_code from ContentBundle resource.
1123
+ *
1124
+ * @param {string} contentBundleName
1125
+ * A fully-qualified path representing ContentBundle resource.
1126
+ * @returns {string} A string representing the network_code.
1127
+ */
1128
+ matchNetworkCodeFromContentBundleName(contentBundleName) {
1129
+ return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).network_code;
1130
+ }
1131
+ /**
1132
+ * Parse the content_bundle from ContentBundle resource.
1133
+ *
1134
+ * @param {string} contentBundleName
1135
+ * A fully-qualified path representing ContentBundle resource.
1136
+ * @returns {string} A string representing the content_bundle.
1137
+ */
1138
+ matchContentBundleFromContentBundleName(contentBundleName) {
1139
+ return this.pathTemplates.contentBundlePathTemplate.match(contentBundleName).content_bundle;
1140
+ }
1141
+ /**
1142
+ * Return a fully-qualified contentLabel resource name string.
1143
+ *
1144
+ * @param {string} network_code
1145
+ * @param {string} content_label
1146
+ * @returns {string} Resource name string.
1147
+ */
1148
+ contentLabelPath(networkCode, contentLabel) {
1149
+ return this.pathTemplates.contentLabelPathTemplate.render({
1150
+ network_code: networkCode,
1151
+ content_label: contentLabel,
1152
+ });
1153
+ }
1154
+ /**
1155
+ * Parse the network_code from ContentLabel resource.
1156
+ *
1157
+ * @param {string} contentLabelName
1158
+ * A fully-qualified path representing ContentLabel resource.
1159
+ * @returns {string} A string representing the network_code.
1160
+ */
1161
+ matchNetworkCodeFromContentLabelName(contentLabelName) {
1162
+ return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).network_code;
1163
+ }
1164
+ /**
1165
+ * Parse the content_label from ContentLabel resource.
1166
+ *
1167
+ * @param {string} contentLabelName
1168
+ * A fully-qualified path representing ContentLabel resource.
1169
+ * @returns {string} A string representing the content_label.
1170
+ */
1171
+ matchContentLabelFromContentLabelName(contentLabelName) {
1172
+ return this.pathTemplates.contentLabelPathTemplate.match(contentLabelName).content_label;
1173
+ }
1174
+ /**
1175
+ * Return a fully-qualified creativeTemplate resource name string.
1176
+ *
1177
+ * @param {string} network_code
1178
+ * @param {string} creative_template
1179
+ * @returns {string} Resource name string.
1180
+ */
1181
+ creativeTemplatePath(networkCode, creativeTemplate) {
1182
+ return this.pathTemplates.creativeTemplatePathTemplate.render({
1183
+ network_code: networkCode,
1184
+ creative_template: creativeTemplate,
1185
+ });
1186
+ }
1187
+ /**
1188
+ * Parse the network_code from CreativeTemplate resource.
1189
+ *
1190
+ * @param {string} creativeTemplateName
1191
+ * A fully-qualified path representing CreativeTemplate resource.
1192
+ * @returns {string} A string representing the network_code.
1193
+ */
1194
+ matchNetworkCodeFromCreativeTemplateName(creativeTemplateName) {
1195
+ return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).network_code;
1196
+ }
1197
+ /**
1198
+ * Parse the creative_template from CreativeTemplate resource.
1199
+ *
1200
+ * @param {string} creativeTemplateName
1201
+ * A fully-qualified path representing CreativeTemplate resource.
1202
+ * @returns {string} A string representing the creative_template.
1203
+ */
1204
+ matchCreativeTemplateFromCreativeTemplateName(creativeTemplateName) {
1205
+ return this.pathTemplates.creativeTemplatePathTemplate.match(creativeTemplateName).creative_template;
1206
+ }
1207
+ /**
1208
+ * Return a fully-qualified customField resource name string.
1209
+ *
1210
+ * @param {string} network_code
1211
+ * @param {string} custom_field
1212
+ * @returns {string} Resource name string.
1213
+ */
1214
+ customFieldPath(networkCode, customField) {
1215
+ return this.pathTemplates.customFieldPathTemplate.render({
1216
+ network_code: networkCode,
1217
+ custom_field: customField,
1218
+ });
1219
+ }
1220
+ /**
1221
+ * Parse the network_code from CustomField resource.
1222
+ *
1223
+ * @param {string} customFieldName
1224
+ * A fully-qualified path representing CustomField resource.
1225
+ * @returns {string} A string representing the network_code.
1226
+ */
1227
+ matchNetworkCodeFromCustomFieldName(customFieldName) {
1228
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code;
1229
+ }
1230
+ /**
1231
+ * Parse the custom_field from CustomField resource.
1232
+ *
1233
+ * @param {string} customFieldName
1234
+ * A fully-qualified path representing CustomField resource.
1235
+ * @returns {string} A string representing the custom_field.
1236
+ */
1237
+ matchCustomFieldFromCustomFieldName(customFieldName) {
1238
+ return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field;
1239
+ }
1240
+ /**
1241
+ * Return a fully-qualified customTargetingKey resource name string.
1242
+ *
1243
+ * @param {string} network_code
1244
+ * @param {string} custom_targeting_key
1245
+ * @returns {string} Resource name string.
1246
+ */
1247
+ customTargetingKeyPath(networkCode, customTargetingKey) {
1248
+ return this.pathTemplates.customTargetingKeyPathTemplate.render({
1249
+ network_code: networkCode,
1250
+ custom_targeting_key: customTargetingKey,
1251
+ });
1252
+ }
1253
+ /**
1254
+ * Parse the network_code from CustomTargetingKey resource.
1255
+ *
1256
+ * @param {string} customTargetingKeyName
1257
+ * A fully-qualified path representing CustomTargetingKey resource.
1258
+ * @returns {string} A string representing the network_code.
1259
+ */
1260
+ matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName) {
1261
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).network_code;
1262
+ }
1263
+ /**
1264
+ * Parse the custom_targeting_key from CustomTargetingKey resource.
1265
+ *
1266
+ * @param {string} customTargetingKeyName
1267
+ * A fully-qualified path representing CustomTargetingKey resource.
1268
+ * @returns {string} A string representing the custom_targeting_key.
1269
+ */
1270
+ matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName) {
1271
+ return this.pathTemplates.customTargetingKeyPathTemplate.match(customTargetingKeyName).custom_targeting_key;
1272
+ }
1273
+ /**
1274
+ * Return a fully-qualified customTargetingValue resource name string.
1275
+ *
1276
+ * @param {string} network_code
1277
+ * @param {string} custom_targeting_value
1278
+ * @returns {string} Resource name string.
1279
+ */
1280
+ customTargetingValuePath(networkCode, customTargetingValue) {
1281
+ return this.pathTemplates.customTargetingValuePathTemplate.render({
1282
+ network_code: networkCode,
1283
+ custom_targeting_value: customTargetingValue,
1284
+ });
1285
+ }
1286
+ /**
1287
+ * Parse the network_code from CustomTargetingValue resource.
1288
+ *
1289
+ * @param {string} customTargetingValueName
1290
+ * A fully-qualified path representing CustomTargetingValue resource.
1291
+ * @returns {string} A string representing the network_code.
1292
+ */
1293
+ matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
1294
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
1295
+ }
1296
+ /**
1297
+ * Parse the custom_targeting_value from CustomTargetingValue resource.
1298
+ *
1299
+ * @param {string} customTargetingValueName
1300
+ * A fully-qualified path representing CustomTargetingValue resource.
1301
+ * @returns {string} A string representing the custom_targeting_value.
1302
+ */
1303
+ matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
1304
+ return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
1305
+ }
1306
+ /**
1307
+ * Return a fully-qualified deviceCapability resource name string.
1308
+ *
1309
+ * @param {string} network_code
1310
+ * @param {string} device_capability
1311
+ * @returns {string} Resource name string.
1312
+ */
1313
+ deviceCapabilityPath(networkCode, deviceCapability) {
1314
+ return this.pathTemplates.deviceCapabilityPathTemplate.render({
1315
+ network_code: networkCode,
1316
+ device_capability: deviceCapability,
1317
+ });
1318
+ }
1319
+ /**
1320
+ * Parse the network_code from DeviceCapability resource.
1321
+ *
1322
+ * @param {string} deviceCapabilityName
1323
+ * A fully-qualified path representing DeviceCapability resource.
1324
+ * @returns {string} A string representing the network_code.
1325
+ */
1326
+ matchNetworkCodeFromDeviceCapabilityName(deviceCapabilityName) {
1327
+ return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).network_code;
1328
+ }
1329
+ /**
1330
+ * Parse the device_capability from DeviceCapability resource.
1331
+ *
1332
+ * @param {string} deviceCapabilityName
1333
+ * A fully-qualified path representing DeviceCapability resource.
1334
+ * @returns {string} A string representing the device_capability.
1335
+ */
1336
+ matchDeviceCapabilityFromDeviceCapabilityName(deviceCapabilityName) {
1337
+ return this.pathTemplates.deviceCapabilityPathTemplate.match(deviceCapabilityName).device_capability;
1338
+ }
1339
+ /**
1340
+ * Return a fully-qualified deviceCategory resource name string.
1341
+ *
1342
+ * @param {string} network_code
1343
+ * @param {string} device_category
1344
+ * @returns {string} Resource name string.
1345
+ */
1346
+ deviceCategoryPath(networkCode, deviceCategory) {
1347
+ return this.pathTemplates.deviceCategoryPathTemplate.render({
1348
+ network_code: networkCode,
1349
+ device_category: deviceCategory,
1350
+ });
1351
+ }
1352
+ /**
1353
+ * Parse the network_code from DeviceCategory resource.
1354
+ *
1355
+ * @param {string} deviceCategoryName
1356
+ * A fully-qualified path representing DeviceCategory resource.
1357
+ * @returns {string} A string representing the network_code.
1358
+ */
1359
+ matchNetworkCodeFromDeviceCategoryName(deviceCategoryName) {
1360
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code;
1361
+ }
1362
+ /**
1363
+ * Parse the device_category from DeviceCategory resource.
1364
+ *
1365
+ * @param {string} deviceCategoryName
1366
+ * A fully-qualified path representing DeviceCategory resource.
1367
+ * @returns {string} A string representing the device_category.
1368
+ */
1369
+ matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName) {
1370
+ return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category;
1371
+ }
1372
+ /**
1373
+ * Return a fully-qualified deviceManufacturer resource name string.
1374
+ *
1375
+ * @param {string} network_code
1376
+ * @param {string} device_manufacturer
1377
+ * @returns {string} Resource name string.
1378
+ */
1379
+ deviceManufacturerPath(networkCode, deviceManufacturer) {
1380
+ return this.pathTemplates.deviceManufacturerPathTemplate.render({
1381
+ network_code: networkCode,
1382
+ device_manufacturer: deviceManufacturer,
1383
+ });
1384
+ }
1385
+ /**
1386
+ * Parse the network_code from DeviceManufacturer resource.
1387
+ *
1388
+ * @param {string} deviceManufacturerName
1389
+ * A fully-qualified path representing DeviceManufacturer resource.
1390
+ * @returns {string} A string representing the network_code.
1391
+ */
1392
+ matchNetworkCodeFromDeviceManufacturerName(deviceManufacturerName) {
1393
+ return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).network_code;
1394
+ }
1395
+ /**
1396
+ * Parse the device_manufacturer from DeviceManufacturer resource.
1397
+ *
1398
+ * @param {string} deviceManufacturerName
1399
+ * A fully-qualified path representing DeviceManufacturer resource.
1400
+ * @returns {string} A string representing the device_manufacturer.
1401
+ */
1402
+ matchDeviceManufacturerFromDeviceManufacturerName(deviceManufacturerName) {
1403
+ return this.pathTemplates.deviceManufacturerPathTemplate.match(deviceManufacturerName).device_manufacturer;
1404
+ }
1405
+ /**
1406
+ * Return a fully-qualified entitySignalsMapping resource name string.
1407
+ *
1408
+ * @param {string} network_code
1409
+ * @param {string} entity_signals_mapping
1410
+ * @returns {string} Resource name string.
1411
+ */
1412
+ entitySignalsMappingPath(networkCode, entitySignalsMapping) {
1413
+ return this.pathTemplates.entitySignalsMappingPathTemplate.render({
1414
+ network_code: networkCode,
1415
+ entity_signals_mapping: entitySignalsMapping,
1416
+ });
1417
+ }
1418
+ /**
1419
+ * Parse the network_code from EntitySignalsMapping resource.
1420
+ *
1421
+ * @param {string} entitySignalsMappingName
1422
+ * A fully-qualified path representing EntitySignalsMapping resource.
1423
+ * @returns {string} A string representing the network_code.
1424
+ */
1425
+ matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName) {
1426
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).network_code;
1427
+ }
1428
+ /**
1429
+ * Parse the entity_signals_mapping from EntitySignalsMapping resource.
1430
+ *
1431
+ * @param {string} entitySignalsMappingName
1432
+ * A fully-qualified path representing EntitySignalsMapping resource.
1433
+ * @returns {string} A string representing the entity_signals_mapping.
1434
+ */
1435
+ matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
1436
+ return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
1437
+ }
1438
+ /**
1439
+ * Return a fully-qualified geoTarget resource name string.
1440
+ *
1441
+ * @param {string} network_code
1442
+ * @param {string} geo_target
1443
+ * @returns {string} Resource name string.
1444
+ */
1445
+ geoTargetPath(networkCode, geoTarget) {
1446
+ return this.pathTemplates.geoTargetPathTemplate.render({
1447
+ network_code: networkCode,
1448
+ geo_target: geoTarget,
1449
+ });
1450
+ }
1451
+ /**
1452
+ * Parse the network_code from GeoTarget resource.
1453
+ *
1454
+ * @param {string} geoTargetName
1455
+ * A fully-qualified path representing GeoTarget resource.
1456
+ * @returns {string} A string representing the network_code.
1457
+ */
1458
+ matchNetworkCodeFromGeoTargetName(geoTargetName) {
1459
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code;
1460
+ }
1461
+ /**
1462
+ * Parse the geo_target from GeoTarget resource.
1463
+ *
1464
+ * @param {string} geoTargetName
1465
+ * A fully-qualified path representing GeoTarget resource.
1466
+ * @returns {string} A string representing the geo_target.
1467
+ */
1468
+ matchGeoTargetFromGeoTargetName(geoTargetName) {
1469
+ return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target;
1470
+ }
1471
+ /**
1472
+ * Return a fully-qualified label resource name string.
1473
+ *
1474
+ * @param {string} network_code
1475
+ * @param {string} label
1476
+ * @returns {string} Resource name string.
1477
+ */
1478
+ labelPath(networkCode, label) {
1479
+ return this.pathTemplates.labelPathTemplate.render({
1480
+ network_code: networkCode,
1481
+ label: label,
1482
+ });
1483
+ }
1484
+ /**
1485
+ * Parse the network_code from Label resource.
1486
+ *
1487
+ * @param {string} labelName
1488
+ * A fully-qualified path representing Label resource.
1489
+ * @returns {string} A string representing the network_code.
1490
+ */
1491
+ matchNetworkCodeFromLabelName(labelName) {
1492
+ return this.pathTemplates.labelPathTemplate.match(labelName).network_code;
1493
+ }
1494
+ /**
1495
+ * Parse the label from Label resource.
1496
+ *
1497
+ * @param {string} labelName
1498
+ * A fully-qualified path representing Label resource.
1499
+ * @returns {string} A string representing the label.
1500
+ */
1501
+ matchLabelFromLabelName(labelName) {
1502
+ return this.pathTemplates.labelPathTemplate.match(labelName).label;
1503
+ }
1504
+ /**
1505
+ * Return a fully-qualified liveStreamEvent resource name string.
1506
+ *
1507
+ * @param {string} network_code
1508
+ * @param {string} live_stream_event
1509
+ * @returns {string} Resource name string.
1510
+ */
1511
+ liveStreamEventPath(networkCode, liveStreamEvent) {
1512
+ return this.pathTemplates.liveStreamEventPathTemplate.render({
1513
+ network_code: networkCode,
1514
+ live_stream_event: liveStreamEvent,
1515
+ });
1516
+ }
1517
+ /**
1518
+ * Parse the network_code from LiveStreamEvent resource.
1519
+ *
1520
+ * @param {string} liveStreamEventName
1521
+ * A fully-qualified path representing LiveStreamEvent resource.
1522
+ * @returns {string} A string representing the network_code.
1523
+ */
1524
+ matchNetworkCodeFromLiveStreamEventName(liveStreamEventName) {
1525
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code;
1526
+ }
1527
+ /**
1528
+ * Parse the live_stream_event from LiveStreamEvent resource.
1529
+ *
1530
+ * @param {string} liveStreamEventName
1531
+ * A fully-qualified path representing LiveStreamEvent resource.
1532
+ * @returns {string} A string representing the live_stream_event.
1533
+ */
1534
+ matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName) {
1535
+ return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event;
1536
+ }
1537
+ /**
1538
+ * Return a fully-qualified mobileCarrier resource name string.
1539
+ *
1540
+ * @param {string} network_code
1541
+ * @param {string} mobile_carrier
1542
+ * @returns {string} Resource name string.
1543
+ */
1544
+ mobileCarrierPath(networkCode, mobileCarrier) {
1545
+ return this.pathTemplates.mobileCarrierPathTemplate.render({
1546
+ network_code: networkCode,
1547
+ mobile_carrier: mobileCarrier,
1548
+ });
1549
+ }
1550
+ /**
1551
+ * Parse the network_code from MobileCarrier resource.
1552
+ *
1553
+ * @param {string} mobileCarrierName
1554
+ * A fully-qualified path representing MobileCarrier resource.
1555
+ * @returns {string} A string representing the network_code.
1556
+ */
1557
+ matchNetworkCodeFromMobileCarrierName(mobileCarrierName) {
1558
+ return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).network_code;
1559
+ }
1560
+ /**
1561
+ * Parse the mobile_carrier from MobileCarrier resource.
1562
+ *
1563
+ * @param {string} mobileCarrierName
1564
+ * A fully-qualified path representing MobileCarrier resource.
1565
+ * @returns {string} A string representing the mobile_carrier.
1566
+ */
1567
+ matchMobileCarrierFromMobileCarrierName(mobileCarrierName) {
1568
+ return this.pathTemplates.mobileCarrierPathTemplate.match(mobileCarrierName).mobile_carrier;
1569
+ }
1570
+ /**
1571
+ * Return a fully-qualified mobileDevice resource name string.
1572
+ *
1573
+ * @param {string} network_code
1574
+ * @param {string} mobile_device
1575
+ * @returns {string} Resource name string.
1576
+ */
1577
+ mobileDevicePath(networkCode, mobileDevice) {
1578
+ return this.pathTemplates.mobileDevicePathTemplate.render({
1579
+ network_code: networkCode,
1580
+ mobile_device: mobileDevice,
1581
+ });
1582
+ }
1583
+ /**
1584
+ * Parse the network_code from MobileDevice resource.
1585
+ *
1586
+ * @param {string} mobileDeviceName
1587
+ * A fully-qualified path representing MobileDevice resource.
1588
+ * @returns {string} A string representing the network_code.
1589
+ */
1590
+ matchNetworkCodeFromMobileDeviceName(mobileDeviceName) {
1591
+ return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).network_code;
1592
+ }
1593
+ /**
1594
+ * Parse the mobile_device from MobileDevice resource.
1595
+ *
1596
+ * @param {string} mobileDeviceName
1597
+ * A fully-qualified path representing MobileDevice resource.
1598
+ * @returns {string} A string representing the mobile_device.
1599
+ */
1600
+ matchMobileDeviceFromMobileDeviceName(mobileDeviceName) {
1601
+ return this.pathTemplates.mobileDevicePathTemplate.match(mobileDeviceName).mobile_device;
1602
+ }
1603
+ /**
1604
+ * Return a fully-qualified mobileDeviceSubmodel resource name string.
1605
+ *
1606
+ * @param {string} network_code
1607
+ * @param {string} mobile_device_submodel
1608
+ * @returns {string} Resource name string.
1609
+ */
1610
+ mobileDeviceSubmodelPath(networkCode, mobileDeviceSubmodel) {
1611
+ return this.pathTemplates.mobileDeviceSubmodelPathTemplate.render({
1612
+ network_code: networkCode,
1613
+ mobile_device_submodel: mobileDeviceSubmodel,
1614
+ });
1615
+ }
1616
+ /**
1617
+ * Parse the network_code from MobileDeviceSubmodel resource.
1618
+ *
1619
+ * @param {string} mobileDeviceSubmodelName
1620
+ * A fully-qualified path representing MobileDeviceSubmodel resource.
1621
+ * @returns {string} A string representing the network_code.
1622
+ */
1623
+ matchNetworkCodeFromMobileDeviceSubmodelName(mobileDeviceSubmodelName) {
1624
+ return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).network_code;
1625
+ }
1626
+ /**
1627
+ * Parse the mobile_device_submodel from MobileDeviceSubmodel resource.
1628
+ *
1629
+ * @param {string} mobileDeviceSubmodelName
1630
+ * A fully-qualified path representing MobileDeviceSubmodel resource.
1631
+ * @returns {string} A string representing the mobile_device_submodel.
1632
+ */
1633
+ matchMobileDeviceSubmodelFromMobileDeviceSubmodelName(mobileDeviceSubmodelName) {
1634
+ return this.pathTemplates.mobileDeviceSubmodelPathTemplate.match(mobileDeviceSubmodelName).mobile_device_submodel;
1635
+ }
1636
+ /**
1637
+ * Return a fully-qualified network resource name string.
1638
+ *
1639
+ * @param {string} network_code
1640
+ * @returns {string} Resource name string.
1641
+ */
1642
+ networkPath(networkCode) {
1643
+ return this.pathTemplates.networkPathTemplate.render({
1644
+ network_code: networkCode,
1645
+ });
1646
+ }
1647
+ /**
1648
+ * Parse the network_code from Network resource.
1649
+ *
1650
+ * @param {string} networkName
1651
+ * A fully-qualified path representing Network resource.
1652
+ * @returns {string} A string representing the network_code.
1653
+ */
1654
+ matchNetworkCodeFromNetworkName(networkName) {
1655
+ return this.pathTemplates.networkPathTemplate.match(networkName).network_code;
1656
+ }
1657
+ /**
1658
+ * Return a fully-qualified operatingSystem resource name string.
1659
+ *
1660
+ * @param {string} network_code
1661
+ * @param {string} operating_system
1662
+ * @returns {string} Resource name string.
1663
+ */
1664
+ operatingSystemPath(networkCode, operatingSystem) {
1665
+ return this.pathTemplates.operatingSystemPathTemplate.render({
1666
+ network_code: networkCode,
1667
+ operating_system: operatingSystem,
1668
+ });
1669
+ }
1670
+ /**
1671
+ * Parse the network_code from OperatingSystem resource.
1672
+ *
1673
+ * @param {string} operatingSystemName
1674
+ * A fully-qualified path representing OperatingSystem resource.
1675
+ * @returns {string} A string representing the network_code.
1676
+ */
1677
+ matchNetworkCodeFromOperatingSystemName(operatingSystemName) {
1678
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code;
1679
+ }
1680
+ /**
1681
+ * Parse the operating_system from OperatingSystem resource.
1682
+ *
1683
+ * @param {string} operatingSystemName
1684
+ * A fully-qualified path representing OperatingSystem resource.
1685
+ * @returns {string} A string representing the operating_system.
1686
+ */
1687
+ matchOperatingSystemFromOperatingSystemName(operatingSystemName) {
1688
+ return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system;
1689
+ }
1690
+ /**
1691
+ * Return a fully-qualified operatingSystemVersion resource name string.
1692
+ *
1693
+ * @param {string} network_code
1694
+ * @param {string} operating_system_version
1695
+ * @returns {string} Resource name string.
1696
+ */
1697
+ operatingSystemVersionPath(networkCode, operatingSystemVersion) {
1698
+ return this.pathTemplates.operatingSystemVersionPathTemplate.render({
1699
+ network_code: networkCode,
1700
+ operating_system_version: operatingSystemVersion,
1701
+ });
1702
+ }
1703
+ /**
1704
+ * Parse the network_code from OperatingSystemVersion resource.
1705
+ *
1706
+ * @param {string} operatingSystemVersionName
1707
+ * A fully-qualified path representing OperatingSystemVersion resource.
1708
+ * @returns {string} A string representing the network_code.
1709
+ */
1710
+ matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName) {
1711
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code;
1712
+ }
1713
+ /**
1714
+ * Parse the operating_system_version from OperatingSystemVersion resource.
1715
+ *
1716
+ * @param {string} operatingSystemVersionName
1717
+ * A fully-qualified path representing OperatingSystemVersion resource.
1718
+ * @returns {string} A string representing the operating_system_version.
1719
+ */
1720
+ matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName) {
1721
+ return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version;
1722
+ }
1723
+ /**
1724
+ * Return a fully-qualified order resource name string.
1725
+ *
1726
+ * @param {string} network_code
1727
+ * @param {string} order
1728
+ * @returns {string} Resource name string.
1729
+ */
1730
+ orderPath(networkCode, order) {
1731
+ return this.pathTemplates.orderPathTemplate.render({
1732
+ network_code: networkCode,
1733
+ order: order,
1734
+ });
1735
+ }
1736
+ /**
1737
+ * Parse the network_code from Order resource.
1738
+ *
1739
+ * @param {string} orderName
1740
+ * A fully-qualified path representing Order resource.
1741
+ * @returns {string} A string representing the network_code.
1742
+ */
1743
+ matchNetworkCodeFromOrderName(orderName) {
1744
+ return this.pathTemplates.orderPathTemplate.match(orderName).network_code;
1745
+ }
1746
+ /**
1747
+ * Parse the order from Order resource.
1748
+ *
1749
+ * @param {string} orderName
1750
+ * A fully-qualified path representing Order resource.
1751
+ * @returns {string} A string representing the order.
1752
+ */
1753
+ matchOrderFromOrderName(orderName) {
1754
+ return this.pathTemplates.orderPathTemplate.match(orderName).order;
1755
+ }
1756
+ /**
1757
+ * Return a fully-qualified placement resource name string.
1758
+ *
1759
+ * @param {string} network_code
1760
+ * @param {string} placement
1761
+ * @returns {string} Resource name string.
1762
+ */
1763
+ placementPath(networkCode, placement) {
1764
+ return this.pathTemplates.placementPathTemplate.render({
1765
+ network_code: networkCode,
1766
+ placement: placement,
1767
+ });
1768
+ }
1769
+ /**
1770
+ * Parse the network_code from Placement resource.
1771
+ *
1772
+ * @param {string} placementName
1773
+ * A fully-qualified path representing Placement resource.
1774
+ * @returns {string} A string representing the network_code.
1775
+ */
1776
+ matchNetworkCodeFromPlacementName(placementName) {
1777
+ return this.pathTemplates.placementPathTemplate.match(placementName).network_code;
1778
+ }
1779
+ /**
1780
+ * Parse the placement from Placement resource.
1781
+ *
1782
+ * @param {string} placementName
1783
+ * A fully-qualified path representing Placement resource.
1784
+ * @returns {string} A string representing the placement.
1785
+ */
1786
+ matchPlacementFromPlacementName(placementName) {
1787
+ return this.pathTemplates.placementPathTemplate.match(placementName).placement;
1788
+ }
1789
+ /**
1790
+ * Return a fully-qualified privateAuction resource name string.
1791
+ *
1792
+ * @param {string} network_code
1793
+ * @param {string} private_auction
1794
+ * @returns {string} Resource name string.
1795
+ */
1796
+ privateAuctionPath(networkCode, privateAuction) {
1797
+ return this.pathTemplates.privateAuctionPathTemplate.render({
1798
+ network_code: networkCode,
1799
+ private_auction: privateAuction,
1800
+ });
1801
+ }
1802
+ /**
1803
+ * Parse the network_code from PrivateAuction resource.
1804
+ *
1805
+ * @param {string} privateAuctionName
1806
+ * A fully-qualified path representing PrivateAuction resource.
1807
+ * @returns {string} A string representing the network_code.
1808
+ */
1809
+ matchNetworkCodeFromPrivateAuctionName(privateAuctionName) {
1810
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code;
1811
+ }
1812
+ /**
1813
+ * Parse the private_auction from PrivateAuction resource.
1814
+ *
1815
+ * @param {string} privateAuctionName
1816
+ * A fully-qualified path representing PrivateAuction resource.
1817
+ * @returns {string} A string representing the private_auction.
1818
+ */
1819
+ matchPrivateAuctionFromPrivateAuctionName(privateAuctionName) {
1820
+ return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction;
1821
+ }
1822
+ /**
1823
+ * Return a fully-qualified privateAuctionDeal resource name string.
1824
+ *
1825
+ * @param {string} network_code
1826
+ * @param {string} private_auction_deal
1827
+ * @returns {string} Resource name string.
1828
+ */
1829
+ privateAuctionDealPath(networkCode, privateAuctionDeal) {
1830
+ return this.pathTemplates.privateAuctionDealPathTemplate.render({
1831
+ network_code: networkCode,
1832
+ private_auction_deal: privateAuctionDeal,
1833
+ });
1834
+ }
1835
+ /**
1836
+ * Parse the network_code from PrivateAuctionDeal resource.
1837
+ *
1838
+ * @param {string} privateAuctionDealName
1839
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1840
+ * @returns {string} A string representing the network_code.
1841
+ */
1842
+ matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName) {
1843
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code;
1844
+ }
1845
+ /**
1846
+ * Parse the private_auction_deal from PrivateAuctionDeal resource.
1847
+ *
1848
+ * @param {string} privateAuctionDealName
1849
+ * A fully-qualified path representing PrivateAuctionDeal resource.
1850
+ * @returns {string} A string representing the private_auction_deal.
1851
+ */
1852
+ matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName) {
1853
+ return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal;
1854
+ }
1855
+ /**
1856
+ * Return a fully-qualified programmaticBuyer resource name string.
1857
+ *
1858
+ * @param {string} network_code
1859
+ * @param {string} programmatic_buyer
1860
+ * @returns {string} Resource name string.
1861
+ */
1862
+ programmaticBuyerPath(networkCode, programmaticBuyer) {
1863
+ return this.pathTemplates.programmaticBuyerPathTemplate.render({
1864
+ network_code: networkCode,
1865
+ programmatic_buyer: programmaticBuyer,
1866
+ });
1867
+ }
1868
+ /**
1869
+ * Parse the network_code from ProgrammaticBuyer resource.
1870
+ *
1871
+ * @param {string} programmaticBuyerName
1872
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1873
+ * @returns {string} A string representing the network_code.
1874
+ */
1875
+ matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName) {
1876
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code;
1877
+ }
1878
+ /**
1879
+ * Parse the programmatic_buyer from ProgrammaticBuyer resource.
1880
+ *
1881
+ * @param {string} programmaticBuyerName
1882
+ * A fully-qualified path representing ProgrammaticBuyer resource.
1883
+ * @returns {string} A string representing the programmatic_buyer.
1884
+ */
1885
+ matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName) {
1886
+ return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer;
1887
+ }
1888
+ /**
1889
+ * Return a fully-qualified report resource name string.
1890
+ *
1891
+ * @param {string} network_code
1892
+ * @param {string} report
1893
+ * @returns {string} Resource name string.
1894
+ */
1895
+ reportPath(networkCode, report) {
1896
+ return this.pathTemplates.reportPathTemplate.render({
1897
+ network_code: networkCode,
1898
+ report: report,
1899
+ });
1900
+ }
1901
+ /**
1902
+ * Parse the network_code from Report resource.
1903
+ *
1904
+ * @param {string} reportName
1905
+ * A fully-qualified path representing Report resource.
1906
+ * @returns {string} A string representing the network_code.
1907
+ */
1908
+ matchNetworkCodeFromReportName(reportName) {
1909
+ return this.pathTemplates.reportPathTemplate.match(reportName).network_code;
1910
+ }
1911
+ /**
1912
+ * Parse the report from Report resource.
1913
+ *
1914
+ * @param {string} reportName
1915
+ * A fully-qualified path representing Report resource.
1916
+ * @returns {string} A string representing the report.
1917
+ */
1918
+ matchReportFromReportName(reportName) {
1919
+ return this.pathTemplates.reportPathTemplate.match(reportName).report;
1920
+ }
1921
+ /**
1922
+ * Return a fully-qualified role resource name string.
1923
+ *
1924
+ * @param {string} network_code
1925
+ * @param {string} role
1926
+ * @returns {string} Resource name string.
1927
+ */
1928
+ rolePath(networkCode, role) {
1929
+ return this.pathTemplates.rolePathTemplate.render({
1930
+ network_code: networkCode,
1931
+ role: role,
1932
+ });
1933
+ }
1934
+ /**
1935
+ * Parse the network_code from Role resource.
1936
+ *
1937
+ * @param {string} roleName
1938
+ * A fully-qualified path representing Role resource.
1939
+ * @returns {string} A string representing the network_code.
1940
+ */
1941
+ matchNetworkCodeFromRoleName(roleName) {
1942
+ return this.pathTemplates.rolePathTemplate.match(roleName).network_code;
1943
+ }
1944
+ /**
1945
+ * Parse the role from Role resource.
1946
+ *
1947
+ * @param {string} roleName
1948
+ * A fully-qualified path representing Role resource.
1949
+ * @returns {string} A string representing the role.
1950
+ */
1951
+ matchRoleFromRoleName(roleName) {
1952
+ return this.pathTemplates.rolePathTemplate.match(roleName).role;
1953
+ }
1954
+ /**
1955
+ * Return a fully-qualified site resource name string.
1956
+ *
1957
+ * @param {string} network_code
1958
+ * @param {string} site
1959
+ * @returns {string} Resource name string.
1960
+ */
1961
+ sitePath(networkCode, site) {
1962
+ return this.pathTemplates.sitePathTemplate.render({
1963
+ network_code: networkCode,
1964
+ site: site,
1965
+ });
1966
+ }
1967
+ /**
1968
+ * Parse the network_code from Site resource.
1969
+ *
1970
+ * @param {string} siteName
1971
+ * A fully-qualified path representing Site resource.
1972
+ * @returns {string} A string representing the network_code.
1973
+ */
1974
+ matchNetworkCodeFromSiteName(siteName) {
1975
+ return this.pathTemplates.sitePathTemplate.match(siteName).network_code;
1976
+ }
1977
+ /**
1978
+ * Parse the site from Site resource.
1979
+ *
1980
+ * @param {string} siteName
1981
+ * A fully-qualified path representing Site resource.
1982
+ * @returns {string} A string representing the site.
1983
+ */
1984
+ matchSiteFromSiteName(siteName) {
1985
+ return this.pathTemplates.sitePathTemplate.match(siteName).site;
1986
+ }
1987
+ /**
1988
+ * Return a fully-qualified taxonomyCategory resource name string.
1989
+ *
1990
+ * @param {string} network_code
1991
+ * @param {string} taxonomy_category
1992
+ * @returns {string} Resource name string.
1993
+ */
1994
+ taxonomyCategoryPath(networkCode, taxonomyCategory) {
1995
+ return this.pathTemplates.taxonomyCategoryPathTemplate.render({
1996
+ network_code: networkCode,
1997
+ taxonomy_category: taxonomyCategory,
1998
+ });
1999
+ }
2000
+ /**
2001
+ * Parse the network_code from TaxonomyCategory resource.
2002
+ *
2003
+ * @param {string} taxonomyCategoryName
2004
+ * A fully-qualified path representing TaxonomyCategory resource.
2005
+ * @returns {string} A string representing the network_code.
2006
+ */
2007
+ matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName) {
2008
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).network_code;
2009
+ }
2010
+ /**
2011
+ * Parse the taxonomy_category from TaxonomyCategory resource.
2012
+ *
2013
+ * @param {string} taxonomyCategoryName
2014
+ * A fully-qualified path representing TaxonomyCategory resource.
2015
+ * @returns {string} A string representing the taxonomy_category.
2016
+ */
2017
+ matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName) {
2018
+ return this.pathTemplates.taxonomyCategoryPathTemplate.match(taxonomyCategoryName).taxonomy_category;
2019
+ }
2020
+ /**
2021
+ * Return a fully-qualified team resource name string.
2022
+ *
2023
+ * @param {string} network_code
2024
+ * @param {string} team
2025
+ * @returns {string} Resource name string.
2026
+ */
2027
+ teamPath(networkCode, team) {
2028
+ return this.pathTemplates.teamPathTemplate.render({
2029
+ network_code: networkCode,
2030
+ team: team,
2031
+ });
2032
+ }
2033
+ /**
2034
+ * Parse the network_code from Team resource.
2035
+ *
2036
+ * @param {string} teamName
2037
+ * A fully-qualified path representing Team resource.
2038
+ * @returns {string} A string representing the network_code.
2039
+ */
2040
+ matchNetworkCodeFromTeamName(teamName) {
2041
+ return this.pathTemplates.teamPathTemplate.match(teamName).network_code;
2042
+ }
2043
+ /**
2044
+ * Parse the team from Team resource.
2045
+ *
2046
+ * @param {string} teamName
2047
+ * A fully-qualified path representing Team resource.
2048
+ * @returns {string} A string representing the team.
2049
+ */
2050
+ matchTeamFromTeamName(teamName) {
2051
+ return this.pathTemplates.teamPathTemplate.match(teamName).team;
2052
+ }
2053
+ /**
2054
+ * Return a fully-qualified user resource name string.
2055
+ *
2056
+ * @param {string} network_code
2057
+ * @param {string} user
2058
+ * @returns {string} Resource name string.
2059
+ */
2060
+ userPath(networkCode, user) {
2061
+ return this.pathTemplates.userPathTemplate.render({
2062
+ network_code: networkCode,
2063
+ user: user,
2064
+ });
2065
+ }
2066
+ /**
2067
+ * Parse the network_code from User resource.
2068
+ *
2069
+ * @param {string} userName
2070
+ * A fully-qualified path representing User resource.
2071
+ * @returns {string} A string representing the network_code.
2072
+ */
2073
+ matchNetworkCodeFromUserName(userName) {
2074
+ return this.pathTemplates.userPathTemplate.match(userName).network_code;
2075
+ }
2076
+ /**
2077
+ * Parse the user from User resource.
2078
+ *
2079
+ * @param {string} userName
2080
+ * A fully-qualified path representing User resource.
2081
+ * @returns {string} A string representing the user.
2082
+ */
2083
+ matchUserFromUserName(userName) {
2084
+ return this.pathTemplates.userPathTemplate.match(userName).user;
2085
+ }
2086
+ /**
2087
+ * Return a fully-qualified webProperty resource name string.
2088
+ *
2089
+ * @param {string} network_code
2090
+ * @param {string} web_property
2091
+ * @returns {string} Resource name string.
2092
+ */
2093
+ webPropertyPath(networkCode, webProperty) {
2094
+ return this.pathTemplates.webPropertyPathTemplate.render({
2095
+ network_code: networkCode,
2096
+ web_property: webProperty,
2097
+ });
2098
+ }
2099
+ /**
2100
+ * Parse the network_code from WebProperty resource.
2101
+ *
2102
+ * @param {string} webPropertyName
2103
+ * A fully-qualified path representing WebProperty resource.
2104
+ * @returns {string} A string representing the network_code.
2105
+ */
2106
+ matchNetworkCodeFromWebPropertyName(webPropertyName) {
2107
+ return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).network_code;
2108
+ }
2109
+ /**
2110
+ * Parse the web_property from WebProperty resource.
2111
+ *
2112
+ * @param {string} webPropertyName
2113
+ * A fully-qualified path representing WebProperty resource.
2114
+ * @returns {string} A string representing the web_property.
2115
+ */
2116
+ matchWebPropertyFromWebPropertyName(webPropertyName) {
2117
+ return this.pathTemplates.webPropertyPathTemplate.match(webPropertyName).web_property;
2118
+ }
2119
+ /**
2120
+ * Terminate the gRPC channel and close the client.
2121
+ *
2122
+ * The client will no longer be usable and all future behavior is undefined.
2123
+ * @returns {Promise} A promise that resolves when the client is closed.
2124
+ */
2125
+ close() {
2126
+ if (this.contactServiceStub && !this._terminated) {
2127
+ return this.contactServiceStub.then(stub => {
2128
+ this._log.info('ending gRPC channel');
2129
+ this._terminated = true;
2130
+ stub.close();
2131
+ });
2132
+ }
2133
+ return Promise.resolve();
2134
+ }
2135
+ }
2136
+ exports.ContactServiceClient = ContactServiceClient;
2137
+ //# sourceMappingURL=contact_service_client.js.map