@google-cloud/pubsub 4.4.1 → 4.5.0-otel-beta.2

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 (59) hide show
  1. package/README.md +3 -1
  2. package/build/protos/google/pubsub/v1/pubsub.proto +28 -0
  3. package/build/protos/protos.d.ts +26 -1
  4. package/build/protos/protos.js +115 -1
  5. package/build/protos/protos.json +30 -1
  6. package/build/src/ack-metadata.js +2 -3
  7. package/build/src/ack-metadata.js.map +1 -1
  8. package/build/src/iam.d.ts +11 -3
  9. package/build/src/iam.js +12 -2
  10. package/build/src/iam.js.map +1 -1
  11. package/build/src/index.d.ts +2 -0
  12. package/build/src/index.js +5 -1
  13. package/build/src/index.js.map +1 -1
  14. package/build/src/lease-manager.d.ts +2 -3
  15. package/build/src/lease-manager.js +19 -3
  16. package/build/src/lease-manager.js.map +1 -1
  17. package/build/src/message-queues.d.ts +8 -4
  18. package/build/src/message-queues.js +17 -8
  19. package/build/src/message-queues.js.map +1 -1
  20. package/build/src/message-stream.d.ts +0 -1
  21. package/build/src/publisher/flow-publisher.js +5 -0
  22. package/build/src/publisher/flow-publisher.js.map +1 -1
  23. package/build/src/publisher/index.d.ts +3 -3
  24. package/build/src/publisher/index.js +24 -46
  25. package/build/src/publisher/index.js.map +1 -1
  26. package/build/src/publisher/message-batch.d.ts +7 -1
  27. package/build/src/publisher/message-batch.js +11 -1
  28. package/build/src/publisher/message-batch.js.map +1 -1
  29. package/build/src/publisher/message-queues.d.ts +0 -2
  30. package/build/src/publisher/message-queues.js +32 -6
  31. package/build/src/publisher/message-queues.js.map +1 -1
  32. package/build/src/publisher/pubsub-message.d.ts +36 -1
  33. package/build/src/publisher/pubsub-message.js +26 -2
  34. package/build/src/publisher/pubsub-message.js.map +1 -1
  35. package/build/src/pubsub.d.ts +5 -1
  36. package/build/src/pubsub.js +4 -14
  37. package/build/src/pubsub.js.map +1 -1
  38. package/build/src/subscriber.d.ts +72 -8
  39. package/build/src/subscriber.js +179 -51
  40. package/build/src/subscriber.js.map +1 -1
  41. package/build/src/subscription.d.ts +3 -3
  42. package/build/src/subscription.js +7 -4
  43. package/build/src/subscription.js.map +1 -1
  44. package/build/src/telemetry-tracing.d.ts +231 -0
  45. package/build/src/telemetry-tracing.js +623 -0
  46. package/build/src/telemetry-tracing.js.map +1 -0
  47. package/build/src/topic.d.ts +2 -2
  48. package/build/src/topic.js +8 -4
  49. package/build/src/topic.js.map +1 -1
  50. package/build/src/util.js +4 -4
  51. package/build/src/util.js.map +1 -1
  52. package/build/src/v1/publisher_client.d.ts +0 -1
  53. package/build/src/v1/schema_service_client.d.ts +0 -1
  54. package/build/src/v1/subscriber_client.d.ts +0 -1
  55. package/package.json +6 -5
  56. package/CHANGELOG.md +0 -1517
  57. package/build/src/opentelemetry-tracing.d.ts +0 -23
  58. package/build/src/opentelemetry-tracing.js +0 -42
  59. package/build/src/opentelemetry-tracing.js.map +0 -1
package/README.md CHANGED
@@ -131,6 +131,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
131
131
  | Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createPushSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createPushSubscription.js,samples/README.md) |
132
132
  | Create Push Subscription With No Wrapper | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createPushSubscriptionNoWrapper.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createPushSubscriptionNoWrapper.js,samples/README.md) |
133
133
  | Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscription.js,samples/README.md) |
134
+ | Create a Cloud Storage subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithCloudStorage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithCloudStorage.js,samples/README.md) |
134
135
  | Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithDeadLetterPolicy.js,samples/README.md) |
135
136
  | Create an exactly-once delivery subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithExactlyOnceDelivery.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithExactlyOnceDelivery.js,samples/README.md) |
136
137
  | Create Subscription With Filtering | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithFiltering.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithFiltering.js,samples/README.md) |
@@ -162,8 +163,8 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
162
163
  | Listen with exactly-once delivery | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForMessagesWithExactlyOnceDelivery.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForMessagesWithExactlyOnceDelivery.js,samples/README.md) |
163
164
  | Listen For Protobuf Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForProtobufMessages.js,samples/README.md) |
164
165
  | Listen For Messages With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenWithCustomAttributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenWithCustomAttributes.js,samples/README.md) |
166
+ | Subscribe with OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenWithOpenTelemetryTracing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenWithOpenTelemetryTracing.js,samples/README.md) |
165
167
  | Modify Push Configuration | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/modifyPushConfig.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/modifyPushConfig.js,samples/README.md) |
166
- | OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/openTelemetryTracing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/openTelemetryTracing.js,samples/README.md) |
167
168
  | Publish Avro Records to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishAvroRecords.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishAvroRecords.js,samples/README.md) |
168
169
  | Publish Batched Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishBatchedMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishBatchedMessages.js,samples/README.md) |
169
170
  | Publish Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishMessage.js,samples/README.md) |
@@ -171,6 +172,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree
171
172
  | Publish Ordered Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishOrderedMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishOrderedMessage.js,samples/README.md) |
172
173
  | Publish Protobuf Messages to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishProtobufMessages.js,samples/README.md) |
173
174
  | Publish with flow control | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishWithFlowControl.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithFlowControl.js,samples/README.md) |
175
+ | Publish with OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishWithOpenTelemetryTracing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithOpenTelemetryTracing.js,samples/README.md) |
174
176
  | Publish With Retry Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishWithRetrySettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithRetrySettings.js,samples/README.md) |
175
177
  | Quickstart | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
176
178
  | Remove Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/removeDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/removeDeadLetterPolicy.js,samples/README.md) |
@@ -1141,6 +1141,14 @@ message BigQueryConfig {
1141
1141
  // write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be
1142
1142
  // enabled at the same time.
1143
1143
  bool use_table_schema = 6 [(google.api.field_behavior) = OPTIONAL];
1144
+
1145
+ // Optional. The service account to use to write to BigQuery. The subscription
1146
+ // creator or updater that specifies this field must have
1147
+ // `iam.serviceAccounts.actAs` permission on the service account. If not
1148
+ // specified, the Pub/Sub [service
1149
+ // agent](https://cloud.google.com/iam/docs/service-agents),
1150
+ // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
1151
+ string service_account_email = 7 [(google.api.field_behavior) = OPTIONAL];
1144
1152
  }
1145
1153
 
1146
1154
  // Configuration for a Cloud Storage subscription.
@@ -1160,6 +1168,10 @@ message CloudStorageConfig {
1160
1168
  // data (for example, an ordering_key, if present) are added as entries in
1161
1169
  // the attributes map.
1162
1170
  bool write_metadata = 1 [(google.api.field_behavior) = OPTIONAL];
1171
+
1172
+ // Optional. When true, the output Cloud Storage file will be serialized
1173
+ // using the topic schema, if it exists.
1174
+ bool use_topic_schema = 2 [(google.api.field_behavior) = OPTIONAL];
1163
1175
  }
1164
1176
 
1165
1177
  // Possible states for a Cloud Storage subscription.
@@ -1180,6 +1192,10 @@ message CloudStorageConfig {
1180
1192
  // Cannot write to the destination because enforce_in_transit is set to true
1181
1193
  // and the destination locations are not in the allowed regions.
1182
1194
  IN_TRANSIT_LOCATION_RESTRICTION = 4;
1195
+
1196
+ // Cannot write to the Cloud Storage bucket due to an incompatibility
1197
+ // between the topic schema and subscription settings.
1198
+ SCHEMA_MISMATCH = 5;
1183
1199
  }
1184
1200
 
1185
1201
  // Required. User-provided name for the Cloud Storage bucket.
@@ -1224,9 +1240,21 @@ message CloudStorageConfig {
1224
1240
  // be exceeded in cases where messages are larger than the limit.
1225
1241
  int64 max_bytes = 7 [(google.api.field_behavior) = OPTIONAL];
1226
1242
 
1243
+ // Optional. The maximum number of messages that can be written to a Cloud
1244
+ // Storage file before a new file is created. Min 1000 messages.
1245
+ int64 max_messages = 8 [(google.api.field_behavior) = OPTIONAL];
1246
+
1227
1247
  // Output only. An output-only field that indicates whether or not the
1228
1248
  // subscription can receive messages.
1229
1249
  State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
1250
+
1251
+ // Optional. The service account to use to write to Cloud Storage. The
1252
+ // subscription creator or updater that specifies this field must have
1253
+ // `iam.serviceAccounts.actAs` permission on the service account. If not
1254
+ // specified, the Pub/Sub
1255
+ // [service agent](https://cloud.google.com/iam/docs/service-agents),
1256
+ // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.
1257
+ string service_account_email = 11 [(google.api.field_behavior) = OPTIONAL];
1230
1258
  }
1231
1259
 
1232
1260
  // A message and its corresponding acknowledgment ID.
@@ -3601,6 +3601,9 @@ export namespace google {
3601
3601
 
3602
3602
  /** BigQueryConfig useTableSchema */
3603
3603
  useTableSchema?: (boolean|null);
3604
+
3605
+ /** BigQueryConfig serviceAccountEmail */
3606
+ serviceAccountEmail?: (string|null);
3604
3607
  }
3605
3608
 
3606
3609
  /** Represents a BigQueryConfig. */
@@ -3630,6 +3633,9 @@ export namespace google {
3630
3633
  /** BigQueryConfig useTableSchema. */
3631
3634
  public useTableSchema: boolean;
3632
3635
 
3636
+ /** BigQueryConfig serviceAccountEmail. */
3637
+ public serviceAccountEmail: string;
3638
+
3633
3639
  /**
3634
3640
  * Creates a new BigQueryConfig instance using the specified properties.
3635
3641
  * @param [properties] Properties to set
@@ -3748,8 +3754,14 @@ export namespace google {
3748
3754
  /** CloudStorageConfig maxBytes */
3749
3755
  maxBytes?: (number|Long|string|null);
3750
3756
 
3757
+ /** CloudStorageConfig maxMessages */
3758
+ maxMessages?: (number|Long|string|null);
3759
+
3751
3760
  /** CloudStorageConfig state */
3752
3761
  state?: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State|null);
3762
+
3763
+ /** CloudStorageConfig serviceAccountEmail */
3764
+ serviceAccountEmail?: (string|null);
3753
3765
  }
3754
3766
 
3755
3767
  /** Represents a CloudStorageConfig. */
@@ -3785,9 +3797,15 @@ export namespace google {
3785
3797
  /** CloudStorageConfig maxBytes. */
3786
3798
  public maxBytes: (number|Long|string);
3787
3799
 
3800
+ /** CloudStorageConfig maxMessages. */
3801
+ public maxMessages: (number|Long|string);
3802
+
3788
3803
  /** CloudStorageConfig state. */
3789
3804
  public state: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State);
3790
3805
 
3806
+ /** CloudStorageConfig serviceAccountEmail. */
3807
+ public serviceAccountEmail: string;
3808
+
3791
3809
  /** CloudStorageConfig outputFormat. */
3792
3810
  public outputFormat?: ("textConfig"|"avroConfig");
3793
3811
 
@@ -3967,6 +3985,9 @@ export namespace google {
3967
3985
 
3968
3986
  /** AvroConfig writeMetadata */
3969
3987
  writeMetadata?: (boolean|null);
3988
+
3989
+ /** AvroConfig useTopicSchema */
3990
+ useTopicSchema?: (boolean|null);
3970
3991
  }
3971
3992
 
3972
3993
  /** Represents an AvroConfig. */
@@ -3981,6 +4002,9 @@ export namespace google {
3981
4002
  /** AvroConfig writeMetadata. */
3982
4003
  public writeMetadata: boolean;
3983
4004
 
4005
+ /** AvroConfig useTopicSchema. */
4006
+ public useTopicSchema: boolean;
4007
+
3984
4008
  /**
3985
4009
  * Creates a new AvroConfig instance using the specified properties.
3986
4010
  * @param [properties] Properties to set
@@ -4065,7 +4089,8 @@ export namespace google {
4065
4089
  ACTIVE = 1,
4066
4090
  PERMISSION_DENIED = 2,
4067
4091
  NOT_FOUND = 3,
4068
- IN_TRANSIT_LOCATION_RESTRICTION = 4
4092
+ IN_TRANSIT_LOCATION_RESTRICTION = 4,
4093
+ SCHEMA_MISMATCH = 5
4069
4094
  }
4070
4095
  }
4071
4096
 
@@ -8267,6 +8267,7 @@
8267
8267
  * @property {boolean|null} [dropUnknownFields] BigQueryConfig dropUnknownFields
8268
8268
  * @property {google.pubsub.v1.BigQueryConfig.State|null} [state] BigQueryConfig state
8269
8269
  * @property {boolean|null} [useTableSchema] BigQueryConfig useTableSchema
8270
+ * @property {string|null} [serviceAccountEmail] BigQueryConfig serviceAccountEmail
8270
8271
  */
8271
8272
 
8272
8273
  /**
@@ -8332,6 +8333,14 @@
8332
8333
  */
8333
8334
  BigQueryConfig.prototype.useTableSchema = false;
8334
8335
 
8336
+ /**
8337
+ * BigQueryConfig serviceAccountEmail.
8338
+ * @member {string} serviceAccountEmail
8339
+ * @memberof google.pubsub.v1.BigQueryConfig
8340
+ * @instance
8341
+ */
8342
+ BigQueryConfig.prototype.serviceAccountEmail = "";
8343
+
8335
8344
  /**
8336
8345
  * Creates a new BigQueryConfig instance using the specified properties.
8337
8346
  * @function create
@@ -8368,6 +8377,8 @@
8368
8377
  writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state);
8369
8378
  if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema"))
8370
8379
  writer.uint32(/* id 6, wireType 0 =*/48).bool(message.useTableSchema);
8380
+ if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail"))
8381
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccountEmail);
8371
8382
  return writer;
8372
8383
  };
8373
8384
 
@@ -8426,6 +8437,10 @@
8426
8437
  message.useTableSchema = reader.bool();
8427
8438
  break;
8428
8439
  }
8440
+ case 7: {
8441
+ message.serviceAccountEmail = reader.string();
8442
+ break;
8443
+ }
8429
8444
  default:
8430
8445
  reader.skipType(tag & 7);
8431
8446
  break;
@@ -8488,6 +8503,9 @@
8488
8503
  if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema"))
8489
8504
  if (typeof message.useTableSchema !== "boolean")
8490
8505
  return "useTableSchema: boolean expected";
8506
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
8507
+ if (!$util.isString(message.serviceAccountEmail))
8508
+ return "serviceAccountEmail: string expected";
8491
8509
  return null;
8492
8510
  };
8493
8511
 
@@ -8545,6 +8563,8 @@
8545
8563
  }
8546
8564
  if (object.useTableSchema != null)
8547
8565
  message.useTableSchema = Boolean(object.useTableSchema);
8566
+ if (object.serviceAccountEmail != null)
8567
+ message.serviceAccountEmail = String(object.serviceAccountEmail);
8548
8568
  return message;
8549
8569
  };
8550
8570
 
@@ -8568,6 +8588,7 @@
8568
8588
  object.dropUnknownFields = false;
8569
8589
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
8570
8590
  object.useTableSchema = false;
8591
+ object.serviceAccountEmail = "";
8571
8592
  }
8572
8593
  if (message.table != null && message.hasOwnProperty("table"))
8573
8594
  object.table = message.table;
@@ -8581,6 +8602,8 @@
8581
8602
  object.state = options.enums === String ? $root.google.pubsub.v1.BigQueryConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.BigQueryConfig.State[message.state] : message.state;
8582
8603
  if (message.useTableSchema != null && message.hasOwnProperty("useTableSchema"))
8583
8604
  object.useTableSchema = message.useTableSchema;
8605
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
8606
+ object.serviceAccountEmail = message.serviceAccountEmail;
8584
8607
  return object;
8585
8608
  };
8586
8609
 
@@ -8649,7 +8672,9 @@
8649
8672
  * @property {google.pubsub.v1.CloudStorageConfig.IAvroConfig|null} [avroConfig] CloudStorageConfig avroConfig
8650
8673
  * @property {google.protobuf.IDuration|null} [maxDuration] CloudStorageConfig maxDuration
8651
8674
  * @property {number|Long|null} [maxBytes] CloudStorageConfig maxBytes
8675
+ * @property {number|Long|null} [maxMessages] CloudStorageConfig maxMessages
8652
8676
  * @property {google.pubsub.v1.CloudStorageConfig.State|null} [state] CloudStorageConfig state
8677
+ * @property {string|null} [serviceAccountEmail] CloudStorageConfig serviceAccountEmail
8653
8678
  */
8654
8679
 
8655
8680
  /**
@@ -8731,6 +8756,14 @@
8731
8756
  */
8732
8757
  CloudStorageConfig.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
8733
8758
 
8759
+ /**
8760
+ * CloudStorageConfig maxMessages.
8761
+ * @member {number|Long} maxMessages
8762
+ * @memberof google.pubsub.v1.CloudStorageConfig
8763
+ * @instance
8764
+ */
8765
+ CloudStorageConfig.prototype.maxMessages = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
8766
+
8734
8767
  /**
8735
8768
  * CloudStorageConfig state.
8736
8769
  * @member {google.pubsub.v1.CloudStorageConfig.State} state
@@ -8739,6 +8772,14 @@
8739
8772
  */
8740
8773
  CloudStorageConfig.prototype.state = 0;
8741
8774
 
8775
+ /**
8776
+ * CloudStorageConfig serviceAccountEmail.
8777
+ * @member {string} serviceAccountEmail
8778
+ * @memberof google.pubsub.v1.CloudStorageConfig
8779
+ * @instance
8780
+ */
8781
+ CloudStorageConfig.prototype.serviceAccountEmail = "";
8782
+
8742
8783
  // OneOf field names bound to virtual getters and setters
8743
8784
  var $oneOfFields;
8744
8785
 
@@ -8791,10 +8832,14 @@
8791
8832
  $root.google.protobuf.Duration.encode(message.maxDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
8792
8833
  if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes"))
8793
8834
  writer.uint32(/* id 7, wireType 0 =*/56).int64(message.maxBytes);
8835
+ if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages"))
8836
+ writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxMessages);
8794
8837
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
8795
8838
  writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state);
8796
8839
  if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat"))
8797
8840
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.filenameDatetimeFormat);
8841
+ if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail"))
8842
+ writer.uint32(/* id 11, wireType 2 =*/90).string(message.serviceAccountEmail);
8798
8843
  return writer;
8799
8844
  };
8800
8845
 
@@ -8861,10 +8906,18 @@
8861
8906
  message.maxBytes = reader.int64();
8862
8907
  break;
8863
8908
  }
8909
+ case 8: {
8910
+ message.maxMessages = reader.int64();
8911
+ break;
8912
+ }
8864
8913
  case 9: {
8865
8914
  message.state = reader.int32();
8866
8915
  break;
8867
8916
  }
8917
+ case 11: {
8918
+ message.serviceAccountEmail = reader.string();
8919
+ break;
8920
+ }
8868
8921
  default:
8869
8922
  reader.skipType(tag & 7);
8870
8923
  break;
@@ -8939,6 +8992,9 @@
8939
8992
  if (message.maxBytes != null && message.hasOwnProperty("maxBytes"))
8940
8993
  if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high)))
8941
8994
  return "maxBytes: integer|Long expected";
8995
+ if (message.maxMessages != null && message.hasOwnProperty("maxMessages"))
8996
+ if (!$util.isInteger(message.maxMessages) && !(message.maxMessages && $util.isInteger(message.maxMessages.low) && $util.isInteger(message.maxMessages.high)))
8997
+ return "maxMessages: integer|Long expected";
8942
8998
  if (message.state != null && message.hasOwnProperty("state"))
8943
8999
  switch (message.state) {
8944
9000
  default:
@@ -8948,8 +9004,12 @@
8948
9004
  case 2:
8949
9005
  case 3:
8950
9006
  case 4:
9007
+ case 5:
8951
9008
  break;
8952
9009
  }
9010
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
9011
+ if (!$util.isString(message.serviceAccountEmail))
9012
+ return "serviceAccountEmail: string expected";
8953
9013
  return null;
8954
9014
  };
8955
9015
 
@@ -8997,6 +9057,15 @@
8997
9057
  message.maxBytes = object.maxBytes;
8998
9058
  else if (typeof object.maxBytes === "object")
8999
9059
  message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber();
9060
+ if (object.maxMessages != null)
9061
+ if ($util.Long)
9062
+ (message.maxMessages = $util.Long.fromValue(object.maxMessages)).unsigned = false;
9063
+ else if (typeof object.maxMessages === "string")
9064
+ message.maxMessages = parseInt(object.maxMessages, 10);
9065
+ else if (typeof object.maxMessages === "number")
9066
+ message.maxMessages = object.maxMessages;
9067
+ else if (typeof object.maxMessages === "object")
9068
+ message.maxMessages = new $util.LongBits(object.maxMessages.low >>> 0, object.maxMessages.high >>> 0).toNumber();
9000
9069
  switch (object.state) {
9001
9070
  default:
9002
9071
  if (typeof object.state === "number") {
@@ -9024,7 +9093,13 @@
9024
9093
  case 4:
9025
9094
  message.state = 4;
9026
9095
  break;
9096
+ case "SCHEMA_MISMATCH":
9097
+ case 5:
9098
+ message.state = 5;
9099
+ break;
9027
9100
  }
9101
+ if (object.serviceAccountEmail != null)
9102
+ message.serviceAccountEmail = String(object.serviceAccountEmail);
9028
9103
  return message;
9029
9104
  };
9030
9105
 
@@ -9051,8 +9126,14 @@
9051
9126
  object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9052
9127
  } else
9053
9128
  object.maxBytes = options.longs === String ? "0" : 0;
9129
+ if ($util.Long) {
9130
+ var long = new $util.Long(0, 0, false);
9131
+ object.maxMessages = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
9132
+ } else
9133
+ object.maxMessages = options.longs === String ? "0" : 0;
9054
9134
  object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
9055
9135
  object.filenameDatetimeFormat = "";
9136
+ object.serviceAccountEmail = "";
9056
9137
  }
9057
9138
  if (message.bucket != null && message.hasOwnProperty("bucket"))
9058
9139
  object.bucket = message.bucket;
@@ -9077,10 +9158,17 @@
9077
9158
  object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes;
9078
9159
  else
9079
9160
  object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes;
9161
+ if (message.maxMessages != null && message.hasOwnProperty("maxMessages"))
9162
+ if (typeof message.maxMessages === "number")
9163
+ object.maxMessages = options.longs === String ? String(message.maxMessages) : message.maxMessages;
9164
+ else
9165
+ object.maxMessages = options.longs === String ? $util.Long.prototype.toString.call(message.maxMessages) : options.longs === Number ? new $util.LongBits(message.maxMessages.low >>> 0, message.maxMessages.high >>> 0).toNumber() : message.maxMessages;
9080
9166
  if (message.state != null && message.hasOwnProperty("state"))
9081
9167
  object.state = options.enums === String ? $root.google.pubsub.v1.CloudStorageConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.CloudStorageConfig.State[message.state] : message.state;
9082
9168
  if (message.filenameDatetimeFormat != null && message.hasOwnProperty("filenameDatetimeFormat"))
9083
9169
  object.filenameDatetimeFormat = message.filenameDatetimeFormat;
9170
+ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail"))
9171
+ object.serviceAccountEmail = message.serviceAccountEmail;
9084
9172
  return object;
9085
9173
  };
9086
9174
 
@@ -9292,6 +9380,7 @@
9292
9380
  * @memberof google.pubsub.v1.CloudStorageConfig
9293
9381
  * @interface IAvroConfig
9294
9382
  * @property {boolean|null} [writeMetadata] AvroConfig writeMetadata
9383
+ * @property {boolean|null} [useTopicSchema] AvroConfig useTopicSchema
9295
9384
  */
9296
9385
 
9297
9386
  /**
@@ -9317,6 +9406,14 @@
9317
9406
  */
9318
9407
  AvroConfig.prototype.writeMetadata = false;
9319
9408
 
9409
+ /**
9410
+ * AvroConfig useTopicSchema.
9411
+ * @member {boolean} useTopicSchema
9412
+ * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
9413
+ * @instance
9414
+ */
9415
+ AvroConfig.prototype.useTopicSchema = false;
9416
+
9320
9417
  /**
9321
9418
  * Creates a new AvroConfig instance using the specified properties.
9322
9419
  * @function create
@@ -9343,6 +9440,8 @@
9343
9440
  writer = $Writer.create();
9344
9441
  if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata"))
9345
9442
  writer.uint32(/* id 1, wireType 0 =*/8).bool(message.writeMetadata);
9443
+ if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema"))
9444
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useTopicSchema);
9346
9445
  return writer;
9347
9446
  };
9348
9447
 
@@ -9381,6 +9480,10 @@
9381
9480
  message.writeMetadata = reader.bool();
9382
9481
  break;
9383
9482
  }
9483
+ case 2: {
9484
+ message.useTopicSchema = reader.bool();
9485
+ break;
9486
+ }
9384
9487
  default:
9385
9488
  reader.skipType(tag & 7);
9386
9489
  break;
@@ -9419,6 +9522,9 @@
9419
9522
  if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
9420
9523
  if (typeof message.writeMetadata !== "boolean")
9421
9524
  return "writeMetadata: boolean expected";
9525
+ if (message.useTopicSchema != null && message.hasOwnProperty("useTopicSchema"))
9526
+ if (typeof message.useTopicSchema !== "boolean")
9527
+ return "useTopicSchema: boolean expected";
9422
9528
  return null;
9423
9529
  };
9424
9530
 
@@ -9436,6 +9542,8 @@
9436
9542
  var message = new $root.google.pubsub.v1.CloudStorageConfig.AvroConfig();
9437
9543
  if (object.writeMetadata != null)
9438
9544
  message.writeMetadata = Boolean(object.writeMetadata);
9545
+ if (object.useTopicSchema != null)
9546
+ message.useTopicSchema = Boolean(object.useTopicSchema);
9439
9547
  return message;
9440
9548
  };
9441
9549
 
@@ -9452,10 +9560,14 @@
9452
9560
  if (!options)
9453
9561
  options = {};
9454
9562
  var object = {};
9455
- if (options.defaults)
9563
+ if (options.defaults) {
9456
9564
  object.writeMetadata = false;
9565
+ object.useTopicSchema = false;
9566
+ }
9457
9567
  if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
9458
9568
  object.writeMetadata = message.writeMetadata;
9569
+ if (message.useTopicSchema != null && message.hasOwnProperty("useTopicSchema"))
9570
+ object.useTopicSchema = message.useTopicSchema;
9459
9571
  return object;
9460
9572
  };
9461
9573
 
@@ -9497,6 +9609,7 @@
9497
9609
  * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value
9498
9610
  * @property {number} NOT_FOUND=3 NOT_FOUND value
9499
9611
  * @property {number} IN_TRANSIT_LOCATION_RESTRICTION=4 IN_TRANSIT_LOCATION_RESTRICTION value
9612
+ * @property {number} SCHEMA_MISMATCH=5 SCHEMA_MISMATCH value
9500
9613
  */
9501
9614
  CloudStorageConfig.State = (function() {
9502
9615
  var valuesById = {}, values = Object.create(valuesById);
@@ -9505,6 +9618,7 @@
9505
9618
  values[valuesById[2] = "PERMISSION_DENIED"] = 2;
9506
9619
  values[valuesById[3] = "NOT_FOUND"] = 3;
9507
9620
  values[valuesById[4] = "IN_TRANSIT_LOCATION_RESTRICTION"] = 4;
9621
+ values[valuesById[5] = "SCHEMA_MISMATCH"] = 5;
9508
9622
  return values;
9509
9623
  })();
9510
9624
 
@@ -1274,6 +1274,13 @@
1274
1274
  "options": {
1275
1275
  "(google.api.field_behavior)": "OPTIONAL"
1276
1276
  }
1277
+ },
1278
+ "serviceAccountEmail": {
1279
+ "type": "string",
1280
+ "id": 7,
1281
+ "options": {
1282
+ "(google.api.field_behavior)": "OPTIONAL"
1283
+ }
1277
1284
  }
1278
1285
  },
1279
1286
  "nested": {
@@ -1355,12 +1362,26 @@
1355
1362
  "(google.api.field_behavior)": "OPTIONAL"
1356
1363
  }
1357
1364
  },
1365
+ "maxMessages": {
1366
+ "type": "int64",
1367
+ "id": 8,
1368
+ "options": {
1369
+ "(google.api.field_behavior)": "OPTIONAL"
1370
+ }
1371
+ },
1358
1372
  "state": {
1359
1373
  "type": "State",
1360
1374
  "id": 9,
1361
1375
  "options": {
1362
1376
  "(google.api.field_behavior)": "OUTPUT_ONLY"
1363
1377
  }
1378
+ },
1379
+ "serviceAccountEmail": {
1380
+ "type": "string",
1381
+ "id": 11,
1382
+ "options": {
1383
+ "(google.api.field_behavior)": "OPTIONAL"
1384
+ }
1364
1385
  }
1365
1386
  },
1366
1387
  "nested": {
@@ -1375,6 +1396,13 @@
1375
1396
  "options": {
1376
1397
  "(google.api.field_behavior)": "OPTIONAL"
1377
1398
  }
1399
+ },
1400
+ "useTopicSchema": {
1401
+ "type": "bool",
1402
+ "id": 2,
1403
+ "options": {
1404
+ "(google.api.field_behavior)": "OPTIONAL"
1405
+ }
1378
1406
  }
1379
1407
  }
1380
1408
  },
@@ -1384,7 +1412,8 @@
1384
1412
  "ACTIVE": 1,
1385
1413
  "PERMISSION_DENIED": 2,
1386
1414
  "NOT_FOUND": 3,
1387
- "IN_TRANSIT_LOCATION_RESTRICTION": 4
1415
+ "IN_TRANSIT_LOCATION_RESTRICTION": 4,
1416
+ "SCHEMA_MISMATCH": 5
1388
1417
  }
1389
1418
  }
1390
1419
  }
@@ -13,7 +13,8 @@
13
13
  // See the License for the specific language governing permissions and
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.processAckRpcError = exports.processAckErrorInfo = void 0;
16
+ exports.processAckErrorInfo = processAckErrorInfo;
17
+ exports.processAckRpcError = processAckRpcError;
17
18
  const google_gax_1 = require("google-gax");
18
19
  const subscriber_1 = require("./subscriber");
19
20
  const permanentFailureInvalidAckId = 'PERMANENT_FAILURE_INVALID_ACK_ID';
@@ -64,7 +65,6 @@ function processAckErrorInfo(rpcError) {
64
65
  }
65
66
  return ret;
66
67
  }
67
- exports.processAckErrorInfo = processAckErrorInfo;
68
68
  /**
69
69
  * For a completely failed RPC call, this will find the appropriate
70
70
  * error information to return to an ack() caller.
@@ -89,5 +89,4 @@ function processAckRpcError(grpcCode) {
89
89
  }
90
90
  return ackError;
91
91
  }
92
- exports.processAckRpcError = processAckRpcError;
93
92
  //# sourceMappingURL=ack-metadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ack-metadata.js","sourceRoot":"","sources":["../../src/ack-metadata.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,2CAA+C;AAC/C,6CAAuD;AAEvD,MAAM,4BAA4B,GAAG,kCAAkC,CAAC;AACxE,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAE5C,4DAA4D;AAC5D,MAAM,uCAAuC,GAAG;IAC9C,mBAAM,CAAC,iBAAiB;IACxB,mBAAM,CAAC,kBAAkB;IACzB,mBAAM,CAAC,OAAO;IACd,mBAAM,CAAC,QAAQ;IACf,mBAAM,CAAC,WAAW;CACnB,CAAC;AAwBF;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,QAAqB;IACvD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAE5C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,2DAA2D;IAC3D,MAAM,QAAQ,GAAG,QAAQ,CAAC,iBAAmC,CAAC;IAE9D,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,IAAI,KAAK,4BAA4B,EAAE,CAAC;YAC1C,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,yBAAY,CAAC,OAAO;gBAC9B,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,yBAAY,CAAC,KAAK;gBAC5B,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAlCD,kDAkCC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,QAAgB;IACjD,MAAM,QAAQ,GAAiB;QAC7B,SAAS,EAAE,uCAAuC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACrE,aAAa,EAAE,QAAQ;KACxB,CAAC;IACF,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,mBAAM,CAAC,iBAAiB;YAC3B,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,gBAAgB,CAAC;YAClD,MAAM;QACR,KAAK,mBAAM,CAAC,mBAAmB;YAC7B,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,kBAAkB,CAAC;YACpD,MAAM;QACR;YACE,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,KAAK,CAAC;YACvC,MAAM;IACV,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAlBD,gDAkBC"}
1
+ {"version":3,"file":"ack-metadata.js","sourceRoot":"","sources":["../../src/ack-metadata.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AA6CjC,kDAkCC;AAQD,gDAkBC;AAvGD,2CAA+C;AAC/C,6CAAuD;AAEvD,MAAM,4BAA4B,GAAG,kCAAkC,CAAC;AACxE,MAAM,sBAAsB,GAAG,YAAY,CAAC;AAE5C,4DAA4D;AAC5D,MAAM,uCAAuC,GAAG;IAC9C,mBAAM,CAAC,iBAAiB;IACxB,mBAAM,CAAC,kBAAkB;IACzB,mBAAM,CAAC,OAAO;IACd,mBAAM,CAAC,QAAQ;IACf,mBAAM,CAAC,WAAW;CACnB,CAAC;AAwBF;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,QAAqB;IACvD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAE5C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,2DAA2D;IAC3D,MAAM,QAAQ,GAAG,QAAQ,CAAC,iBAAmC,CAAC;IAE9D,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,IAAI,KAAK,4BAA4B,EAAE,CAAC;YAC1C,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,yBAAY,CAAC,OAAO;gBAC9B,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;aAAM,IAAI,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,IAAI;gBACf,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE;gBACb,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,yBAAY,CAAC,KAAK;gBAC5B,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,QAAgB;IACjD,MAAM,QAAQ,GAAiB;QAC7B,SAAS,EAAE,uCAAuC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACrE,aAAa,EAAE,QAAQ;KACxB,CAAC;IACF,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,mBAAM,CAAC,iBAAiB;YAC3B,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,gBAAgB,CAAC;YAClD,MAAM;QACR,KAAK,mBAAM,CAAC,mBAAmB;YAC7B,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,kBAAkB,CAAC;YACpD,MAAM;QACR;YACE,QAAQ,CAAC,QAAQ,GAAG,yBAAY,CAAC,KAAK,CAAC;YACvC,MAAM;IACV,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- /// <reference types="node" />
17
16
  import { CallOptions, IamProtos } from 'google-gax';
18
17
  import { Omit, PubSub, RequestCallback, ResourceCallback } from './pubsub';
19
18
  export type Policy = {
@@ -23,6 +22,14 @@ export type GetPolicyCallback = RequestCallback<Policy>;
23
22
  export type SetPolicyCallback = RequestCallback<Policy>;
24
23
  export type SetPolicyResponse = [Policy];
25
24
  export type GetPolicyResponse = [Policy];
25
+ /**
26
+ * Allows us to get the most up to date full name of an object.
27
+ *
28
+ * @private
29
+ */
30
+ export interface Nameable {
31
+ name: string;
32
+ }
26
33
  /**
27
34
  * Shows which IAM permissions is allowed.
28
35
  * The key to this object are the IAM permissions (string) and the values are
@@ -79,8 +86,9 @@ export type TestIamPermissionsCallback = ResourceCallback<IamPermissionsMap, Iam
79
86
  export declare class IAM {
80
87
  pubsub: PubSub;
81
88
  request: typeof PubSub.prototype.request;
82
- id: string;
83
- constructor(pubsub: PubSub, id: string);
89
+ private nameable_;
90
+ constructor(pubsub: PubSub, nameOrNameable: Nameable | string);
91
+ get id(): string;
84
92
  /**
85
93
  * @typedef {array} GetPolicyResponse
86
94
  * @property {object} 0 The policy.