|
16 | 16 |
|
17 | 17 | const gapicConfig = require('./publisher_client_config.json'); |
18 | 18 | const gax = require('google-gax'); |
19 | | -const merge = require('lodash.merge'); |
20 | 19 | const path = require('path'); |
21 | 20 | const protobuf = require('protobufjs'); |
22 | 21 |
|
@@ -90,16 +89,9 @@ class PublisherClient { |
90 | 89 | } |
91 | 90 |
|
92 | 91 | // Load the applicable protos. |
93 | | - const protos = merge( |
94 | | - {}, |
95 | | - gaxGrpc.loadProto( |
96 | | - path.join(__dirname, '..', '..', 'protos'), |
97 | | - 'google/iam/v1/iam_policy.proto' |
98 | | - ), |
99 | | - gaxGrpc.loadProto( |
100 | | - path.join(__dirname, '..', '..', 'protos'), |
101 | | - 'google/pubsub/v1/pubsub.proto' |
102 | | - ) |
| 92 | + const protos = gaxGrpc.loadProto( |
| 93 | + path.join(__dirname, '..', '..', 'protos'), |
| 94 | + ['google/iam/v1/iam_policy.proto', 'google/pubsub/v1/pubsub.proto'] |
103 | 95 | ); |
104 | 96 |
|
105 | 97 | // This API contains "path templates"; forward-slash-separated |
@@ -320,7 +312,7 @@ class PublisherClient { |
320 | 312 | * for production use. It is not subject to any SLA or deprecation policy. |
321 | 313 | * @param {Object} [options] |
322 | 314 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
323 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 315 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
324 | 316 | * @param {function(?Error, ?Object)} [callback] |
325 | 317 | * The function which will be called with the result of the API call. |
326 | 318 | * |
@@ -384,7 +376,7 @@ class PublisherClient { |
384 | 376 | * This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask} |
385 | 377 | * @param {Object} [options] |
386 | 378 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
387 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 379 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
388 | 380 | * @param {function(?Error, ?Object)} [callback] |
389 | 381 | * The function which will be called with the result of the API call. |
390 | 382 | * |
@@ -448,7 +440,7 @@ class PublisherClient { |
448 | 440 | * This object should have the same structure as [PubsubMessage]{@link google.pubsub.v1.PubsubMessage} |
449 | 441 | * @param {Object} [options] |
450 | 442 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
451 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 443 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
452 | 444 | * @param {function(?Error, ?Object)} [callback] |
453 | 445 | * The function which will be called with the result of the API call. |
454 | 446 | * |
@@ -511,7 +503,7 @@ class PublisherClient { |
511 | 503 | * Format is `projects/{project}/topics/{topic}`. |
512 | 504 | * @param {Object} [options] |
513 | 505 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
514 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 506 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
515 | 507 | * @param {function(?Error, ?Object)} [callback] |
516 | 508 | * The function which will be called with the result of the API call. |
517 | 509 | * |
@@ -571,7 +563,7 @@ class PublisherClient { |
571 | 563 | * resources in a page. |
572 | 564 | * @param {Object} [options] |
573 | 565 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
574 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 566 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
575 | 567 | * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] |
576 | 568 | * The function which will be called with the result of the API call. |
577 | 569 | * |
@@ -683,7 +675,7 @@ class PublisherClient { |
683 | 675 | * resources in a page. |
684 | 676 | * @param {Object} [options] |
685 | 677 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
686 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 678 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
687 | 679 | * @returns {Stream} |
688 | 680 | * An object stream which emits an object representing [Topic]{@link google.pubsub.v1.Topic} on 'data' event. |
689 | 681 | * |
@@ -729,7 +721,7 @@ class PublisherClient { |
729 | 721 | * resources in a page. |
730 | 722 | * @param {Object} [options] |
731 | 723 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
732 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 724 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
733 | 725 | * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] |
734 | 726 | * The function which will be called with the result of the API call. |
735 | 727 | * |
@@ -845,7 +837,7 @@ class PublisherClient { |
845 | 837 | * resources in a page. |
846 | 838 | * @param {Object} [options] |
847 | 839 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
848 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 840 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
849 | 841 | * @returns {Stream} |
850 | 842 | * An object stream which emits a string on 'data' event. |
851 | 843 | * |
@@ -889,7 +881,7 @@ class PublisherClient { |
889 | 881 | * Format is `projects/{project}/topics/{topic}`. |
890 | 882 | * @param {Object} [options] |
891 | 883 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
892 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 884 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
893 | 885 | * @param {function(?Error)} [callback] |
894 | 886 | * The function which will be called with the result of the API call. |
895 | 887 | * @returns {Promise} - The promise which resolves when API call finishes. |
@@ -943,7 +935,7 @@ class PublisherClient { |
943 | 935 | * This object should have the same structure as [Policy]{@link google.iam.v1.Policy} |
944 | 936 | * @param {Object} [options] |
945 | 937 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
946 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 938 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
947 | 939 | * @param {function(?Error, ?Object)} [callback] |
948 | 940 | * The function which will be called with the result of the API call. |
949 | 941 | * |
@@ -1004,7 +996,7 @@ class PublisherClient { |
1004 | 996 | * See the operation documentation for the appropriate value for this field. |
1005 | 997 | * @param {Object} [options] |
1006 | 998 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
1007 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 999 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
1008 | 1000 | * @param {function(?Error, ?Object)} [callback] |
1009 | 1001 | * The function which will be called with the result of the API call. |
1010 | 1002 | * |
@@ -1069,7 +1061,7 @@ class PublisherClient { |
1069 | 1061 | * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
1070 | 1062 | * @param {Object} [options] |
1071 | 1063 | * Optional parameters. You can override the default settings for this call, e.g, timeout, |
1072 | | - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details. |
| 1064 | + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. |
1073 | 1065 | * @param {function(?Error, ?Object)} [callback] |
1074 | 1066 | * The function which will be called with the result of the API call. |
1075 | 1067 | * |
|
0 commit comments