@google-cloud/pubsub 2.19.4 → 3.0.3

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 (47) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +1 -0
  3. package/build/protos/google/pubsub/v1/pubsub.proto +75 -3
  4. package/build/protos/protos.d.ts +154 -0
  5. package/build/protos/protos.js +429 -0
  6. package/build/protos/protos.json +65 -0
  7. package/build/src/iam.d.ts +4 -1
  8. package/build/src/iam.js +1 -1
  9. package/build/src/iam.js.map +1 -1
  10. package/build/src/index.js +1 -1
  11. package/build/src/message-queues.js.map +1 -1
  12. package/build/src/message-stream.js +2 -2
  13. package/build/src/message-stream.js.map +1 -1
  14. package/build/src/publisher/flow-publisher.js +4 -4
  15. package/build/src/publisher/flow-publisher.js.map +1 -1
  16. package/build/src/publisher/index.js +5 -5
  17. package/build/src/publisher/index.js.map +1 -1
  18. package/build/src/publisher/message-batch.js +2 -2
  19. package/build/src/publisher/message-batch.js.map +1 -1
  20. package/build/src/publisher/message-queues.d.ts +1 -0
  21. package/build/src/pubsub.js +2 -2
  22. package/build/src/pubsub.js.map +1 -1
  23. package/build/src/snapshot.js +1 -1
  24. package/build/src/snapshot.js.map +1 -1
  25. package/build/src/subscriber.d.ts +12 -1
  26. package/build/src/subscriber.js +26 -4
  27. package/build/src/subscriber.js.map +1 -1
  28. package/build/src/subscription.js +1 -1
  29. package/build/src/subscription.js.map +1 -1
  30. package/build/src/topic.d.ts +1 -1
  31. package/build/src/topic.js +1 -1
  32. package/build/src/topic.js.map +1 -1
  33. package/build/src/util.d.ts +17 -0
  34. package/build/src/util.js +28 -2
  35. package/build/src/util.js.map +1 -1
  36. package/build/src/v1/index.js +1 -0
  37. package/build/src/v1/index.js.map +1 -1
  38. package/build/src/v1/publisher_client.d.ts +50 -15
  39. package/build/src/v1/publisher_client.js +7 -7
  40. package/build/src/v1/publisher_client.js.map +1 -1
  41. package/build/src/v1/schema_service_client.d.ts +35 -12
  42. package/build/src/v1/schema_service_client.js +5 -6
  43. package/build/src/v1/schema_service_client.js.map +1 -1
  44. package/build/src/v1/subscriber_client.d.ts +91 -23
  45. package/build/src/v1/subscriber_client.js +6 -7
  46. package/build/src/v1/subscriber_client.js.map +1 -1
  47. package/package.json +15 -15
@@ -4843,6 +4843,7 @@
4843
4843
  * @property {string|null} [name] Subscription name
4844
4844
  * @property {string|null} [topic] Subscription topic
4845
4845
  * @property {google.pubsub.v1.IPushConfig|null} [pushConfig] Subscription pushConfig
4846
+ * @property {google.pubsub.v1.IBigQueryConfig|null} [bigqueryConfig] Subscription bigqueryConfig
4846
4847
  * @property {number|null} [ackDeadlineSeconds] Subscription ackDeadlineSeconds
4847
4848
  * @property {boolean|null} [retainAckedMessages] Subscription retainAckedMessages
4848
4849
  * @property {google.protobuf.IDuration|null} [messageRetentionDuration] Subscription messageRetentionDuration
@@ -4855,6 +4856,7 @@
4855
4856
  * @property {boolean|null} [detached] Subscription detached
4856
4857
  * @property {boolean|null} [enableExactlyOnceDelivery] Subscription enableExactlyOnceDelivery
4857
4858
  * @property {google.protobuf.IDuration|null} [topicMessageRetentionDuration] Subscription topicMessageRetentionDuration
4859
+ * @property {google.pubsub.v1.Subscription.State|null} [state] Subscription state
4858
4860
  */
4859
4861
 
4860
4862
  /**
@@ -4897,6 +4899,14 @@
4897
4899
  */
4898
4900
  Subscription.prototype.pushConfig = null;
4899
4901
 
4902
+ /**
4903
+ * Subscription bigqueryConfig.
4904
+ * @member {google.pubsub.v1.IBigQueryConfig|null|undefined} bigqueryConfig
4905
+ * @memberof google.pubsub.v1.Subscription
4906
+ * @instance
4907
+ */
4908
+ Subscription.prototype.bigqueryConfig = null;
4909
+
4900
4910
  /**
4901
4911
  * Subscription ackDeadlineSeconds.
4902
4912
  * @member {number} ackDeadlineSeconds
@@ -4993,6 +5003,14 @@
4993
5003
  */
4994
5004
  Subscription.prototype.topicMessageRetentionDuration = null;
4995
5005
 
5006
+ /**
5007
+ * Subscription state.
5008
+ * @member {google.pubsub.v1.Subscription.State} state
5009
+ * @memberof google.pubsub.v1.Subscription
5010
+ * @instance
5011
+ */
5012
+ Subscription.prototype.state = 0;
5013
+
4996
5014
  /**
4997
5015
  * Creates a new Subscription instance using the specified properties.
4998
5016
  * @function create
@@ -5048,6 +5066,10 @@
5048
5066
  writer.uint32(/* id 16, wireType 0 =*/128).bool(message.enableExactlyOnceDelivery);
5049
5067
  if (message.topicMessageRetentionDuration != null && Object.hasOwnProperty.call(message, "topicMessageRetentionDuration"))
5050
5068
  $root.google.protobuf.Duration.encode(message.topicMessageRetentionDuration, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
5069
+ if (message.bigqueryConfig != null && Object.hasOwnProperty.call(message, "bigqueryConfig"))
5070
+ $root.google.pubsub.v1.BigQueryConfig.encode(message.bigqueryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
5071
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
5072
+ writer.uint32(/* id 19, wireType 0 =*/152).int32(message.state);
5051
5073
  return writer;
5052
5074
  };
5053
5075
 
@@ -5091,6 +5113,9 @@
5091
5113
  case 4:
5092
5114
  message.pushConfig = $root.google.pubsub.v1.PushConfig.decode(reader, reader.uint32());
5093
5115
  break;
5116
+ case 18:
5117
+ message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.decode(reader, reader.uint32());
5118
+ break;
5094
5119
  case 5:
5095
5120
  message.ackDeadlineSeconds = reader.int32();
5096
5121
  break;
@@ -5146,6 +5171,9 @@
5146
5171
  case 17:
5147
5172
  message.topicMessageRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
5148
5173
  break;
5174
+ case 19:
5175
+ message.state = reader.int32();
5176
+ break;
5149
5177
  default:
5150
5178
  reader.skipType(tag & 7);
5151
5179
  break;
@@ -5192,6 +5220,11 @@
5192
5220
  if (error)
5193
5221
  return "pushConfig." + error;
5194
5222
  }
5223
+ if (message.bigqueryConfig != null && message.hasOwnProperty("bigqueryConfig")) {
5224
+ var error = $root.google.pubsub.v1.BigQueryConfig.verify(message.bigqueryConfig);
5225
+ if (error)
5226
+ return "bigqueryConfig." + error;
5227
+ }
5195
5228
  if (message.ackDeadlineSeconds != null && message.hasOwnProperty("ackDeadlineSeconds"))
5196
5229
  if (!$util.isInteger(message.ackDeadlineSeconds))
5197
5230
  return "ackDeadlineSeconds: integer expected";
@@ -5243,6 +5276,15 @@
5243
5276
  if (error)
5244
5277
  return "topicMessageRetentionDuration." + error;
5245
5278
  }
5279
+ if (message.state != null && message.hasOwnProperty("state"))
5280
+ switch (message.state) {
5281
+ default:
5282
+ return "state: enum value expected";
5283
+ case 0:
5284
+ case 1:
5285
+ case 2:
5286
+ break;
5287
+ }
5246
5288
  return null;
5247
5289
  };
5248
5290
 
@@ -5267,6 +5309,11 @@
5267
5309
  throw TypeError(".google.pubsub.v1.Subscription.pushConfig: object expected");
5268
5310
  message.pushConfig = $root.google.pubsub.v1.PushConfig.fromObject(object.pushConfig);
5269
5311
  }
5312
+ if (object.bigqueryConfig != null) {
5313
+ if (typeof object.bigqueryConfig !== "object")
5314
+ throw TypeError(".google.pubsub.v1.Subscription.bigqueryConfig: object expected");
5315
+ message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.fromObject(object.bigqueryConfig);
5316
+ }
5270
5317
  if (object.ackDeadlineSeconds != null)
5271
5318
  message.ackDeadlineSeconds = object.ackDeadlineSeconds | 0;
5272
5319
  if (object.retainAckedMessages != null)
@@ -5311,6 +5358,20 @@
5311
5358
  throw TypeError(".google.pubsub.v1.Subscription.topicMessageRetentionDuration: object expected");
5312
5359
  message.topicMessageRetentionDuration = $root.google.protobuf.Duration.fromObject(object.topicMessageRetentionDuration);
5313
5360
  }
5361
+ switch (object.state) {
5362
+ case "STATE_UNSPECIFIED":
5363
+ case 0:
5364
+ message.state = 0;
5365
+ break;
5366
+ case "ACTIVE":
5367
+ case 1:
5368
+ message.state = 1;
5369
+ break;
5370
+ case "RESOURCE_ERROR":
5371
+ case 2:
5372
+ message.state = 2;
5373
+ break;
5374
+ }
5314
5375
  return message;
5315
5376
  };
5316
5377
 
@@ -5344,6 +5405,8 @@
5344
5405
  object.detached = false;
5345
5406
  object.enableExactlyOnceDelivery = false;
5346
5407
  object.topicMessageRetentionDuration = null;
5408
+ object.bigqueryConfig = null;
5409
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
5347
5410
  }
5348
5411
  if (message.name != null && message.hasOwnProperty("name"))
5349
5412
  object.name = message.name;
@@ -5379,6 +5442,10 @@
5379
5442
  object.enableExactlyOnceDelivery = message.enableExactlyOnceDelivery;
5380
5443
  if (message.topicMessageRetentionDuration != null && message.hasOwnProperty("topicMessageRetentionDuration"))
5381
5444
  object.topicMessageRetentionDuration = $root.google.protobuf.Duration.toObject(message.topicMessageRetentionDuration, options);
5445
+ if (message.bigqueryConfig != null && message.hasOwnProperty("bigqueryConfig"))
5446
+ object.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.toObject(message.bigqueryConfig, options);
5447
+ if (message.state != null && message.hasOwnProperty("state"))
5448
+ object.state = options.enums === String ? $root.google.pubsub.v1.Subscription.State[message.state] : message.state;
5382
5449
  return object;
5383
5450
  };
5384
5451
 
@@ -5393,6 +5460,22 @@
5393
5460
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5394
5461
  };
5395
5462
 
5463
+ /**
5464
+ * State enum.
5465
+ * @name google.pubsub.v1.Subscription.State
5466
+ * @enum {number}
5467
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
5468
+ * @property {number} ACTIVE=1 ACTIVE value
5469
+ * @property {number} RESOURCE_ERROR=2 RESOURCE_ERROR value
5470
+ */
5471
+ Subscription.State = (function() {
5472
+ var valuesById = {}, values = Object.create(valuesById);
5473
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
5474
+ values[valuesById[1] = "ACTIVE"] = 1;
5475
+ values[valuesById[2] = "RESOURCE_ERROR"] = 2;
5476
+ return values;
5477
+ })();
5478
+
5396
5479
  return Subscription;
5397
5480
  })();
5398
5481
 
@@ -6520,6 +6603,330 @@
6520
6603
  return PushConfig;
6521
6604
  })();
6522
6605
 
6606
+ v1.BigQueryConfig = (function() {
6607
+
6608
+ /**
6609
+ * Properties of a BigQueryConfig.
6610
+ * @memberof google.pubsub.v1
6611
+ * @interface IBigQueryConfig
6612
+ * @property {string|null} [table] BigQueryConfig table
6613
+ * @property {boolean|null} [useTopicSchema] BigQueryConfig useTopicSchema
6614
+ * @property {boolean|null} [writeMetadata] BigQueryConfig writeMetadata
6615
+ * @property {boolean|null} [dropUnknownFields] BigQueryConfig dropUnknownFields
6616
+ * @property {google.pubsub.v1.BigQueryConfig.State|null} [state] BigQueryConfig state
6617
+ */
6618
+
6619
+ /**
6620
+ * Constructs a new BigQueryConfig.
6621
+ * @memberof google.pubsub.v1
6622
+ * @classdesc Represents a BigQueryConfig.
6623
+ * @implements IBigQueryConfig
6624
+ * @constructor
6625
+ * @param {google.pubsub.v1.IBigQueryConfig=} [properties] Properties to set
6626
+ */
6627
+ function BigQueryConfig(properties) {
6628
+ if (properties)
6629
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
6630
+ if (properties[keys[i]] != null)
6631
+ this[keys[i]] = properties[keys[i]];
6632
+ }
6633
+
6634
+ /**
6635
+ * BigQueryConfig table.
6636
+ * @member {string} table
6637
+ * @memberof google.pubsub.v1.BigQueryConfig
6638
+ * @instance
6639
+ */
6640
+ BigQueryConfig.prototype.table = "";
6641
+
6642
+ /**
6643
+ * BigQueryConfig useTopicSchema.
6644
+ * @member {boolean} useTopicSchema
6645
+ * @memberof google.pubsub.v1.BigQueryConfig
6646
+ * @instance
6647
+ */
6648
+ BigQueryConfig.prototype.useTopicSchema = false;
6649
+
6650
+ /**
6651
+ * BigQueryConfig writeMetadata.
6652
+ * @member {boolean} writeMetadata
6653
+ * @memberof google.pubsub.v1.BigQueryConfig
6654
+ * @instance
6655
+ */
6656
+ BigQueryConfig.prototype.writeMetadata = false;
6657
+
6658
+ /**
6659
+ * BigQueryConfig dropUnknownFields.
6660
+ * @member {boolean} dropUnknownFields
6661
+ * @memberof google.pubsub.v1.BigQueryConfig
6662
+ * @instance
6663
+ */
6664
+ BigQueryConfig.prototype.dropUnknownFields = false;
6665
+
6666
+ /**
6667
+ * BigQueryConfig state.
6668
+ * @member {google.pubsub.v1.BigQueryConfig.State} state
6669
+ * @memberof google.pubsub.v1.BigQueryConfig
6670
+ * @instance
6671
+ */
6672
+ BigQueryConfig.prototype.state = 0;
6673
+
6674
+ /**
6675
+ * Creates a new BigQueryConfig instance using the specified properties.
6676
+ * @function create
6677
+ * @memberof google.pubsub.v1.BigQueryConfig
6678
+ * @static
6679
+ * @param {google.pubsub.v1.IBigQueryConfig=} [properties] Properties to set
6680
+ * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig instance
6681
+ */
6682
+ BigQueryConfig.create = function create(properties) {
6683
+ return new BigQueryConfig(properties);
6684
+ };
6685
+
6686
+ /**
6687
+ * Encodes the specified BigQueryConfig message. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages.
6688
+ * @function encode
6689
+ * @memberof google.pubsub.v1.BigQueryConfig
6690
+ * @static
6691
+ * @param {google.pubsub.v1.IBigQueryConfig} message BigQueryConfig message or plain object to encode
6692
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6693
+ * @returns {$protobuf.Writer} Writer
6694
+ */
6695
+ BigQueryConfig.encode = function encode(message, writer) {
6696
+ if (!writer)
6697
+ writer = $Writer.create();
6698
+ if (message.table != null && Object.hasOwnProperty.call(message, "table"))
6699
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.table);
6700
+ if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema"))
6701
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useTopicSchema);
6702
+ if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata"))
6703
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.writeMetadata);
6704
+ if (message.dropUnknownFields != null && Object.hasOwnProperty.call(message, "dropUnknownFields"))
6705
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dropUnknownFields);
6706
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
6707
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state);
6708
+ return writer;
6709
+ };
6710
+
6711
+ /**
6712
+ * Encodes the specified BigQueryConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages.
6713
+ * @function encodeDelimited
6714
+ * @memberof google.pubsub.v1.BigQueryConfig
6715
+ * @static
6716
+ * @param {google.pubsub.v1.IBigQueryConfig} message BigQueryConfig message or plain object to encode
6717
+ * @param {$protobuf.Writer} [writer] Writer to encode to
6718
+ * @returns {$protobuf.Writer} Writer
6719
+ */
6720
+ BigQueryConfig.encodeDelimited = function encodeDelimited(message, writer) {
6721
+ return this.encode(message, writer).ldelim();
6722
+ };
6723
+
6724
+ /**
6725
+ * Decodes a BigQueryConfig message from the specified reader or buffer.
6726
+ * @function decode
6727
+ * @memberof google.pubsub.v1.BigQueryConfig
6728
+ * @static
6729
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6730
+ * @param {number} [length] Message length if known beforehand
6731
+ * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig
6732
+ * @throws {Error} If the payload is not a reader or valid buffer
6733
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6734
+ */
6735
+ BigQueryConfig.decode = function decode(reader, length) {
6736
+ if (!(reader instanceof $Reader))
6737
+ reader = $Reader.create(reader);
6738
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.BigQueryConfig();
6739
+ while (reader.pos < end) {
6740
+ var tag = reader.uint32();
6741
+ switch (tag >>> 3) {
6742
+ case 1:
6743
+ message.table = reader.string();
6744
+ break;
6745
+ case 2:
6746
+ message.useTopicSchema = reader.bool();
6747
+ break;
6748
+ case 3:
6749
+ message.writeMetadata = reader.bool();
6750
+ break;
6751
+ case 4:
6752
+ message.dropUnknownFields = reader.bool();
6753
+ break;
6754
+ case 5:
6755
+ message.state = reader.int32();
6756
+ break;
6757
+ default:
6758
+ reader.skipType(tag & 7);
6759
+ break;
6760
+ }
6761
+ }
6762
+ return message;
6763
+ };
6764
+
6765
+ /**
6766
+ * Decodes a BigQueryConfig message from the specified reader or buffer, length delimited.
6767
+ * @function decodeDelimited
6768
+ * @memberof google.pubsub.v1.BigQueryConfig
6769
+ * @static
6770
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6771
+ * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig
6772
+ * @throws {Error} If the payload is not a reader or valid buffer
6773
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
6774
+ */
6775
+ BigQueryConfig.decodeDelimited = function decodeDelimited(reader) {
6776
+ if (!(reader instanceof $Reader))
6777
+ reader = new $Reader(reader);
6778
+ return this.decode(reader, reader.uint32());
6779
+ };
6780
+
6781
+ /**
6782
+ * Verifies a BigQueryConfig message.
6783
+ * @function verify
6784
+ * @memberof google.pubsub.v1.BigQueryConfig
6785
+ * @static
6786
+ * @param {Object.<string,*>} message Plain object to verify
6787
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
6788
+ */
6789
+ BigQueryConfig.verify = function verify(message) {
6790
+ if (typeof message !== "object" || message === null)
6791
+ return "object expected";
6792
+ if (message.table != null && message.hasOwnProperty("table"))
6793
+ if (!$util.isString(message.table))
6794
+ return "table: string expected";
6795
+ if (message.useTopicSchema != null && message.hasOwnProperty("useTopicSchema"))
6796
+ if (typeof message.useTopicSchema !== "boolean")
6797
+ return "useTopicSchema: boolean expected";
6798
+ if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
6799
+ if (typeof message.writeMetadata !== "boolean")
6800
+ return "writeMetadata: boolean expected";
6801
+ if (message.dropUnknownFields != null && message.hasOwnProperty("dropUnknownFields"))
6802
+ if (typeof message.dropUnknownFields !== "boolean")
6803
+ return "dropUnknownFields: boolean expected";
6804
+ if (message.state != null && message.hasOwnProperty("state"))
6805
+ switch (message.state) {
6806
+ default:
6807
+ return "state: enum value expected";
6808
+ case 0:
6809
+ case 1:
6810
+ case 2:
6811
+ case 3:
6812
+ case 4:
6813
+ break;
6814
+ }
6815
+ return null;
6816
+ };
6817
+
6818
+ /**
6819
+ * Creates a BigQueryConfig message from a plain object. Also converts values to their respective internal types.
6820
+ * @function fromObject
6821
+ * @memberof google.pubsub.v1.BigQueryConfig
6822
+ * @static
6823
+ * @param {Object.<string,*>} object Plain object
6824
+ * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig
6825
+ */
6826
+ BigQueryConfig.fromObject = function fromObject(object) {
6827
+ if (object instanceof $root.google.pubsub.v1.BigQueryConfig)
6828
+ return object;
6829
+ var message = new $root.google.pubsub.v1.BigQueryConfig();
6830
+ if (object.table != null)
6831
+ message.table = String(object.table);
6832
+ if (object.useTopicSchema != null)
6833
+ message.useTopicSchema = Boolean(object.useTopicSchema);
6834
+ if (object.writeMetadata != null)
6835
+ message.writeMetadata = Boolean(object.writeMetadata);
6836
+ if (object.dropUnknownFields != null)
6837
+ message.dropUnknownFields = Boolean(object.dropUnknownFields);
6838
+ switch (object.state) {
6839
+ case "STATE_UNSPECIFIED":
6840
+ case 0:
6841
+ message.state = 0;
6842
+ break;
6843
+ case "ACTIVE":
6844
+ case 1:
6845
+ message.state = 1;
6846
+ break;
6847
+ case "PERMISSION_DENIED":
6848
+ case 2:
6849
+ message.state = 2;
6850
+ break;
6851
+ case "NOT_FOUND":
6852
+ case 3:
6853
+ message.state = 3;
6854
+ break;
6855
+ case "SCHEMA_MISMATCH":
6856
+ case 4:
6857
+ message.state = 4;
6858
+ break;
6859
+ }
6860
+ return message;
6861
+ };
6862
+
6863
+ /**
6864
+ * Creates a plain object from a BigQueryConfig message. Also converts values to other types if specified.
6865
+ * @function toObject
6866
+ * @memberof google.pubsub.v1.BigQueryConfig
6867
+ * @static
6868
+ * @param {google.pubsub.v1.BigQueryConfig} message BigQueryConfig
6869
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
6870
+ * @returns {Object.<string,*>} Plain object
6871
+ */
6872
+ BigQueryConfig.toObject = function toObject(message, options) {
6873
+ if (!options)
6874
+ options = {};
6875
+ var object = {};
6876
+ if (options.defaults) {
6877
+ object.table = "";
6878
+ object.useTopicSchema = false;
6879
+ object.writeMetadata = false;
6880
+ object.dropUnknownFields = false;
6881
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
6882
+ }
6883
+ if (message.table != null && message.hasOwnProperty("table"))
6884
+ object.table = message.table;
6885
+ if (message.useTopicSchema != null && message.hasOwnProperty("useTopicSchema"))
6886
+ object.useTopicSchema = message.useTopicSchema;
6887
+ if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
6888
+ object.writeMetadata = message.writeMetadata;
6889
+ if (message.dropUnknownFields != null && message.hasOwnProperty("dropUnknownFields"))
6890
+ object.dropUnknownFields = message.dropUnknownFields;
6891
+ if (message.state != null && message.hasOwnProperty("state"))
6892
+ object.state = options.enums === String ? $root.google.pubsub.v1.BigQueryConfig.State[message.state] : message.state;
6893
+ return object;
6894
+ };
6895
+
6896
+ /**
6897
+ * Converts this BigQueryConfig to JSON.
6898
+ * @function toJSON
6899
+ * @memberof google.pubsub.v1.BigQueryConfig
6900
+ * @instance
6901
+ * @returns {Object.<string,*>} JSON object
6902
+ */
6903
+ BigQueryConfig.prototype.toJSON = function toJSON() {
6904
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6905
+ };
6906
+
6907
+ /**
6908
+ * State enum.
6909
+ * @name google.pubsub.v1.BigQueryConfig.State
6910
+ * @enum {number}
6911
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
6912
+ * @property {number} ACTIVE=1 ACTIVE value
6913
+ * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value
6914
+ * @property {number} NOT_FOUND=3 NOT_FOUND value
6915
+ * @property {number} SCHEMA_MISMATCH=4 SCHEMA_MISMATCH value
6916
+ */
6917
+ BigQueryConfig.State = (function() {
6918
+ var valuesById = {}, values = Object.create(valuesById);
6919
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
6920
+ values[valuesById[1] = "ACTIVE"] = 1;
6921
+ values[valuesById[2] = "PERMISSION_DENIED"] = 2;
6922
+ values[valuesById[3] = "NOT_FOUND"] = 3;
6923
+ values[valuesById[4] = "SCHEMA_MISMATCH"] = 4;
6924
+ return values;
6925
+ })();
6926
+
6927
+ return BigQueryConfig;
6928
+ })();
6929
+
6523
6930
  v1.ReceivedMessage = (function() {
6524
6931
 
6525
6932
  /**
@@ -21801,6 +22208,7 @@
21801
22208
  * @property {boolean|null} [packed] FieldOptions packed
21802
22209
  * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
21803
22210
  * @property {boolean|null} [lazy] FieldOptions lazy
22211
+ * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
21804
22212
  * @property {boolean|null} [deprecated] FieldOptions deprecated
21805
22213
  * @property {boolean|null} [weak] FieldOptions weak
21806
22214
  * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
@@ -21857,6 +22265,14 @@
21857
22265
  */
21858
22266
  FieldOptions.prototype.lazy = false;
21859
22267
 
22268
+ /**
22269
+ * FieldOptions unverifiedLazy.
22270
+ * @member {boolean} unverifiedLazy
22271
+ * @memberof google.protobuf.FieldOptions
22272
+ * @instance
22273
+ */
22274
+ FieldOptions.prototype.unverifiedLazy = false;
22275
+
21860
22276
  /**
21861
22277
  * FieldOptions deprecated.
21862
22278
  * @member {boolean} deprecated
@@ -21933,6 +22349,8 @@
21933
22349
  writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
21934
22350
  if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
21935
22351
  writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
22352
+ if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
22353
+ writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
21936
22354
  if (message.uninterpretedOption != null && message.uninterpretedOption.length)
21937
22355
  for (var i = 0; i < message.uninterpretedOption.length; ++i)
21938
22356
  $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
@@ -21990,6 +22408,9 @@
21990
22408
  case 5:
21991
22409
  message.lazy = reader.bool();
21992
22410
  break;
22411
+ case 15:
22412
+ message.unverifiedLazy = reader.bool();
22413
+ break;
21993
22414
  case 3:
21994
22415
  message.deprecated = reader.bool();
21995
22416
  break;
@@ -22073,6 +22494,9 @@
22073
22494
  if (message.lazy != null && message.hasOwnProperty("lazy"))
22074
22495
  if (typeof message.lazy !== "boolean")
22075
22496
  return "lazy: boolean expected";
22497
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
22498
+ if (typeof message.unverifiedLazy !== "boolean")
22499
+ return "unverifiedLazy: boolean expected";
22076
22500
  if (message.deprecated != null && message.hasOwnProperty("deprecated"))
22077
22501
  if (typeof message.deprecated !== "boolean")
22078
22502
  return "deprecated: boolean expected";
@@ -22158,6 +22582,8 @@
22158
22582
  }
22159
22583
  if (object.lazy != null)
22160
22584
  message.lazy = Boolean(object.lazy);
22585
+ if (object.unverifiedLazy != null)
22586
+ message.unverifiedLazy = Boolean(object.unverifiedLazy);
22161
22587
  if (object.deprecated != null)
22162
22588
  message.deprecated = Boolean(object.deprecated);
22163
22589
  if (object.weak != null)
@@ -22245,6 +22671,7 @@
22245
22671
  object.lazy = false;
22246
22672
  object.jstype = options.enums === String ? "JS_NORMAL" : 0;
22247
22673
  object.weak = false;
22674
+ object.unverifiedLazy = false;
22248
22675
  object[".google.api.resourceReference"] = null;
22249
22676
  }
22250
22677
  if (message.ctype != null && message.hasOwnProperty("ctype"))
@@ -22259,6 +22686,8 @@
22259
22686
  object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
22260
22687
  if (message.weak != null && message.hasOwnProperty("weak"))
22261
22688
  object.weak = message.weak;
22689
+ if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
22690
+ object.unverifiedLazy = message.unverifiedLazy;
22262
22691
  if (message.uninterpretedOption && message.uninterpretedOption.length) {
22263
22692
  object.uninterpretedOption = [];
22264
22693
  for (var j = 0; j < message.uninterpretedOption.length; ++j)
@@ -780,6 +780,10 @@
780
780
  "type": "PushConfig",
781
781
  "id": 4
782
782
  },
783
+ "bigqueryConfig": {
784
+ "type": "BigQueryConfig",
785
+ "id": 18
786
+ },
783
787
  "ackDeadlineSeconds": {
784
788
  "type": "int32",
785
789
  "id": 5
@@ -831,6 +835,22 @@
831
835
  "options": {
832
836
  "(google.api.field_behavior)": "OUTPUT_ONLY"
833
837
  }
838
+ },
839
+ "state": {
840
+ "type": "State",
841
+ "id": 19,
842
+ "options": {
843
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
844
+ }
845
+ }
846
+ },
847
+ "nested": {
848
+ "State": {
849
+ "values": {
850
+ "STATE_UNSPECIFIED": 0,
851
+ "ACTIVE": 1,
852
+ "RESOURCE_ERROR": 2
853
+ }
834
854
  }
835
855
  }
836
856
  },
@@ -904,6 +924,44 @@
904
924
  }
905
925
  }
906
926
  },
927
+ "BigQueryConfig": {
928
+ "fields": {
929
+ "table": {
930
+ "type": "string",
931
+ "id": 1
932
+ },
933
+ "useTopicSchema": {
934
+ "type": "bool",
935
+ "id": 2
936
+ },
937
+ "writeMetadata": {
938
+ "type": "bool",
939
+ "id": 3
940
+ },
941
+ "dropUnknownFields": {
942
+ "type": "bool",
943
+ "id": 4
944
+ },
945
+ "state": {
946
+ "type": "State",
947
+ "id": 5,
948
+ "options": {
949
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
950
+ }
951
+ }
952
+ },
953
+ "nested": {
954
+ "State": {
955
+ "values": {
956
+ "STATE_UNSPECIFIED": 0,
957
+ "ACTIVE": 1,
958
+ "PERMISSION_DENIED": 2,
959
+ "NOT_FOUND": 3,
960
+ "SCHEMA_MISMATCH": 4
961
+ }
962
+ }
963
+ }
964
+ },
907
965
  "ReceivedMessage": {
908
966
  "fields": {
909
967
  "ackId": {
@@ -2534,6 +2592,13 @@
2534
2592
  "default": false
2535
2593
  }
2536
2594
  },
2595
+ "unverifiedLazy": {
2596
+ "type": "bool",
2597
+ "id": 15,
2598
+ "options": {
2599
+ "default": false
2600
+ }
2601
+ },
2537
2602
  "deprecated": {
2538
2603
  "type": "bool",
2539
2604
  "id": 3,