@google-cloud/pubsub 3.5.2 → 3.6.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.
- package/CHANGELOG.md +7 -0
- package/build/protos/google/pubsub/v1/pubsub.proto +80 -7
- package/build/protos/google/pubsub/v1/schema.proto +1 -1
- package/build/protos/protos.d.ts +347 -0
- package/build/protos/protos.js +874 -0
- package/build/protos/protos.json +75 -0
- package/build/src/publisher/index.js +2 -3
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-queues.d.ts +8 -12
- package/build/src/publisher/message-queues.js +79 -62
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/v1/schema_service_client_config.json +23 -10
- package/build/src/v1/subscriber_client.d.ts +3 -0
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -5189,6 +5189,7 @@
|
|
|
5189
5189
|
* @property {string|null} [topic] Subscription topic
|
|
5190
5190
|
* @property {google.pubsub.v1.IPushConfig|null} [pushConfig] Subscription pushConfig
|
|
5191
5191
|
* @property {google.pubsub.v1.IBigQueryConfig|null} [bigqueryConfig] Subscription bigqueryConfig
|
|
5192
|
+
* @property {google.pubsub.v1.ICloudStorageConfig|null} [cloudStorageConfig] Subscription cloudStorageConfig
|
|
5192
5193
|
* @property {number|null} [ackDeadlineSeconds] Subscription ackDeadlineSeconds
|
|
5193
5194
|
* @property {boolean|null} [retainAckedMessages] Subscription retainAckedMessages
|
|
5194
5195
|
* @property {google.protobuf.IDuration|null} [messageRetentionDuration] Subscription messageRetentionDuration
|
|
@@ -5252,6 +5253,14 @@
|
|
|
5252
5253
|
*/
|
|
5253
5254
|
Subscription.prototype.bigqueryConfig = null;
|
|
5254
5255
|
|
|
5256
|
+
/**
|
|
5257
|
+
* Subscription cloudStorageConfig.
|
|
5258
|
+
* @member {google.pubsub.v1.ICloudStorageConfig|null|undefined} cloudStorageConfig
|
|
5259
|
+
* @memberof google.pubsub.v1.Subscription
|
|
5260
|
+
* @instance
|
|
5261
|
+
*/
|
|
5262
|
+
Subscription.prototype.cloudStorageConfig = null;
|
|
5263
|
+
|
|
5255
5264
|
/**
|
|
5256
5265
|
* Subscription ackDeadlineSeconds.
|
|
5257
5266
|
* @member {number} ackDeadlineSeconds
|
|
@@ -5415,6 +5424,8 @@
|
|
|
5415
5424
|
$root.google.pubsub.v1.BigQueryConfig.encode(message.bigqueryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
|
|
5416
5425
|
if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
|
5417
5426
|
writer.uint32(/* id 19, wireType 0 =*/152).int32(message.state);
|
|
5427
|
+
if (message.cloudStorageConfig != null && Object.hasOwnProperty.call(message, "cloudStorageConfig"))
|
|
5428
|
+
$root.google.pubsub.v1.CloudStorageConfig.encode(message.cloudStorageConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
|
|
5418
5429
|
return writer;
|
|
5419
5430
|
};
|
|
5420
5431
|
|
|
@@ -5465,6 +5476,10 @@
|
|
|
5465
5476
|
message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.decode(reader, reader.uint32());
|
|
5466
5477
|
break;
|
|
5467
5478
|
}
|
|
5479
|
+
case 22: {
|
|
5480
|
+
message.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.decode(reader, reader.uint32());
|
|
5481
|
+
break;
|
|
5482
|
+
}
|
|
5468
5483
|
case 5: {
|
|
5469
5484
|
message.ackDeadlineSeconds = reader.int32();
|
|
5470
5485
|
break;
|
|
@@ -5587,6 +5602,11 @@
|
|
|
5587
5602
|
if (error)
|
|
5588
5603
|
return "bigqueryConfig." + error;
|
|
5589
5604
|
}
|
|
5605
|
+
if (message.cloudStorageConfig != null && message.hasOwnProperty("cloudStorageConfig")) {
|
|
5606
|
+
var error = $root.google.pubsub.v1.CloudStorageConfig.verify(message.cloudStorageConfig);
|
|
5607
|
+
if (error)
|
|
5608
|
+
return "cloudStorageConfig." + error;
|
|
5609
|
+
}
|
|
5590
5610
|
if (message.ackDeadlineSeconds != null && message.hasOwnProperty("ackDeadlineSeconds"))
|
|
5591
5611
|
if (!$util.isInteger(message.ackDeadlineSeconds))
|
|
5592
5612
|
return "ackDeadlineSeconds: integer expected";
|
|
@@ -5676,6 +5696,11 @@
|
|
|
5676
5696
|
throw TypeError(".google.pubsub.v1.Subscription.bigqueryConfig: object expected");
|
|
5677
5697
|
message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.fromObject(object.bigqueryConfig);
|
|
5678
5698
|
}
|
|
5699
|
+
if (object.cloudStorageConfig != null) {
|
|
5700
|
+
if (typeof object.cloudStorageConfig !== "object")
|
|
5701
|
+
throw TypeError(".google.pubsub.v1.Subscription.cloudStorageConfig: object expected");
|
|
5702
|
+
message.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.fromObject(object.cloudStorageConfig);
|
|
5703
|
+
}
|
|
5679
5704
|
if (object.ackDeadlineSeconds != null)
|
|
5680
5705
|
message.ackDeadlineSeconds = object.ackDeadlineSeconds | 0;
|
|
5681
5706
|
if (object.retainAckedMessages != null)
|
|
@@ -5775,6 +5800,7 @@
|
|
|
5775
5800
|
object.topicMessageRetentionDuration = null;
|
|
5776
5801
|
object.bigqueryConfig = null;
|
|
5777
5802
|
object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
|
|
5803
|
+
object.cloudStorageConfig = null;
|
|
5778
5804
|
}
|
|
5779
5805
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
5780
5806
|
object.name = message.name;
|
|
@@ -5814,6 +5840,8 @@
|
|
|
5814
5840
|
object.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.toObject(message.bigqueryConfig, options);
|
|
5815
5841
|
if (message.state != null && message.hasOwnProperty("state"))
|
|
5816
5842
|
object.state = options.enums === String ? $root.google.pubsub.v1.Subscription.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.Subscription.State[message.state] : message.state;
|
|
5843
|
+
if (message.cloudStorageConfig != null && message.hasOwnProperty("cloudStorageConfig"))
|
|
5844
|
+
object.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.toObject(message.cloudStorageConfig, options);
|
|
5817
5845
|
return object;
|
|
5818
5846
|
};
|
|
5819
5847
|
|
|
@@ -7421,6 +7449,852 @@
|
|
|
7421
7449
|
return BigQueryConfig;
|
|
7422
7450
|
})();
|
|
7423
7451
|
|
|
7452
|
+
v1.CloudStorageConfig = (function() {
|
|
7453
|
+
|
|
7454
|
+
/**
|
|
7455
|
+
* Properties of a CloudStorageConfig.
|
|
7456
|
+
* @memberof google.pubsub.v1
|
|
7457
|
+
* @interface ICloudStorageConfig
|
|
7458
|
+
* @property {string|null} [bucket] CloudStorageConfig bucket
|
|
7459
|
+
* @property {string|null} [filenamePrefix] CloudStorageConfig filenamePrefix
|
|
7460
|
+
* @property {string|null} [filenameSuffix] CloudStorageConfig filenameSuffix
|
|
7461
|
+
* @property {google.pubsub.v1.CloudStorageConfig.ITextConfig|null} [textConfig] CloudStorageConfig textConfig
|
|
7462
|
+
* @property {google.pubsub.v1.CloudStorageConfig.IAvroConfig|null} [avroConfig] CloudStorageConfig avroConfig
|
|
7463
|
+
* @property {google.protobuf.IDuration|null} [maxDuration] CloudStorageConfig maxDuration
|
|
7464
|
+
* @property {number|Long|null} [maxBytes] CloudStorageConfig maxBytes
|
|
7465
|
+
* @property {google.pubsub.v1.CloudStorageConfig.State|null} [state] CloudStorageConfig state
|
|
7466
|
+
*/
|
|
7467
|
+
|
|
7468
|
+
/**
|
|
7469
|
+
* Constructs a new CloudStorageConfig.
|
|
7470
|
+
* @memberof google.pubsub.v1
|
|
7471
|
+
* @classdesc Represents a CloudStorageConfig.
|
|
7472
|
+
* @implements ICloudStorageConfig
|
|
7473
|
+
* @constructor
|
|
7474
|
+
* @param {google.pubsub.v1.ICloudStorageConfig=} [properties] Properties to set
|
|
7475
|
+
*/
|
|
7476
|
+
function CloudStorageConfig(properties) {
|
|
7477
|
+
if (properties)
|
|
7478
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
7479
|
+
if (properties[keys[i]] != null)
|
|
7480
|
+
this[keys[i]] = properties[keys[i]];
|
|
7481
|
+
}
|
|
7482
|
+
|
|
7483
|
+
/**
|
|
7484
|
+
* CloudStorageConfig bucket.
|
|
7485
|
+
* @member {string} bucket
|
|
7486
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7487
|
+
* @instance
|
|
7488
|
+
*/
|
|
7489
|
+
CloudStorageConfig.prototype.bucket = "";
|
|
7490
|
+
|
|
7491
|
+
/**
|
|
7492
|
+
* CloudStorageConfig filenamePrefix.
|
|
7493
|
+
* @member {string} filenamePrefix
|
|
7494
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7495
|
+
* @instance
|
|
7496
|
+
*/
|
|
7497
|
+
CloudStorageConfig.prototype.filenamePrefix = "";
|
|
7498
|
+
|
|
7499
|
+
/**
|
|
7500
|
+
* CloudStorageConfig filenameSuffix.
|
|
7501
|
+
* @member {string} filenameSuffix
|
|
7502
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7503
|
+
* @instance
|
|
7504
|
+
*/
|
|
7505
|
+
CloudStorageConfig.prototype.filenameSuffix = "";
|
|
7506
|
+
|
|
7507
|
+
/**
|
|
7508
|
+
* CloudStorageConfig textConfig.
|
|
7509
|
+
* @member {google.pubsub.v1.CloudStorageConfig.ITextConfig|null|undefined} textConfig
|
|
7510
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7511
|
+
* @instance
|
|
7512
|
+
*/
|
|
7513
|
+
CloudStorageConfig.prototype.textConfig = null;
|
|
7514
|
+
|
|
7515
|
+
/**
|
|
7516
|
+
* CloudStorageConfig avroConfig.
|
|
7517
|
+
* @member {google.pubsub.v1.CloudStorageConfig.IAvroConfig|null|undefined} avroConfig
|
|
7518
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7519
|
+
* @instance
|
|
7520
|
+
*/
|
|
7521
|
+
CloudStorageConfig.prototype.avroConfig = null;
|
|
7522
|
+
|
|
7523
|
+
/**
|
|
7524
|
+
* CloudStorageConfig maxDuration.
|
|
7525
|
+
* @member {google.protobuf.IDuration|null|undefined} maxDuration
|
|
7526
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7527
|
+
* @instance
|
|
7528
|
+
*/
|
|
7529
|
+
CloudStorageConfig.prototype.maxDuration = null;
|
|
7530
|
+
|
|
7531
|
+
/**
|
|
7532
|
+
* CloudStorageConfig maxBytes.
|
|
7533
|
+
* @member {number|Long} maxBytes
|
|
7534
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7535
|
+
* @instance
|
|
7536
|
+
*/
|
|
7537
|
+
CloudStorageConfig.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
7538
|
+
|
|
7539
|
+
/**
|
|
7540
|
+
* CloudStorageConfig state.
|
|
7541
|
+
* @member {google.pubsub.v1.CloudStorageConfig.State} state
|
|
7542
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7543
|
+
* @instance
|
|
7544
|
+
*/
|
|
7545
|
+
CloudStorageConfig.prototype.state = 0;
|
|
7546
|
+
|
|
7547
|
+
// OneOf field names bound to virtual getters and setters
|
|
7548
|
+
var $oneOfFields;
|
|
7549
|
+
|
|
7550
|
+
/**
|
|
7551
|
+
* CloudStorageConfig outputFormat.
|
|
7552
|
+
* @member {"textConfig"|"avroConfig"|undefined} outputFormat
|
|
7553
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7554
|
+
* @instance
|
|
7555
|
+
*/
|
|
7556
|
+
Object.defineProperty(CloudStorageConfig.prototype, "outputFormat", {
|
|
7557
|
+
get: $util.oneOfGetter($oneOfFields = ["textConfig", "avroConfig"]),
|
|
7558
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
7559
|
+
});
|
|
7560
|
+
|
|
7561
|
+
/**
|
|
7562
|
+
* Creates a new CloudStorageConfig instance using the specified properties.
|
|
7563
|
+
* @function create
|
|
7564
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7565
|
+
* @static
|
|
7566
|
+
* @param {google.pubsub.v1.ICloudStorageConfig=} [properties] Properties to set
|
|
7567
|
+
* @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig instance
|
|
7568
|
+
*/
|
|
7569
|
+
CloudStorageConfig.create = function create(properties) {
|
|
7570
|
+
return new CloudStorageConfig(properties);
|
|
7571
|
+
};
|
|
7572
|
+
|
|
7573
|
+
/**
|
|
7574
|
+
* Encodes the specified CloudStorageConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages.
|
|
7575
|
+
* @function encode
|
|
7576
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7577
|
+
* @static
|
|
7578
|
+
* @param {google.pubsub.v1.ICloudStorageConfig} message CloudStorageConfig message or plain object to encode
|
|
7579
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7580
|
+
* @returns {$protobuf.Writer} Writer
|
|
7581
|
+
*/
|
|
7582
|
+
CloudStorageConfig.encode = function encode(message, writer) {
|
|
7583
|
+
if (!writer)
|
|
7584
|
+
writer = $Writer.create();
|
|
7585
|
+
if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket"))
|
|
7586
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket);
|
|
7587
|
+
if (message.filenamePrefix != null && Object.hasOwnProperty.call(message, "filenamePrefix"))
|
|
7588
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.filenamePrefix);
|
|
7589
|
+
if (message.filenameSuffix != null && Object.hasOwnProperty.call(message, "filenameSuffix"))
|
|
7590
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.filenameSuffix);
|
|
7591
|
+
if (message.textConfig != null && Object.hasOwnProperty.call(message, "textConfig"))
|
|
7592
|
+
$root.google.pubsub.v1.CloudStorageConfig.TextConfig.encode(message.textConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
7593
|
+
if (message.avroConfig != null && Object.hasOwnProperty.call(message, "avroConfig"))
|
|
7594
|
+
$root.google.pubsub.v1.CloudStorageConfig.AvroConfig.encode(message.avroConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
7595
|
+
if (message.maxDuration != null && Object.hasOwnProperty.call(message, "maxDuration"))
|
|
7596
|
+
$root.google.protobuf.Duration.encode(message.maxDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
7597
|
+
if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes"))
|
|
7598
|
+
writer.uint32(/* id 7, wireType 0 =*/56).int64(message.maxBytes);
|
|
7599
|
+
if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
|
7600
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state);
|
|
7601
|
+
return writer;
|
|
7602
|
+
};
|
|
7603
|
+
|
|
7604
|
+
/**
|
|
7605
|
+
* Encodes the specified CloudStorageConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages.
|
|
7606
|
+
* @function encodeDelimited
|
|
7607
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7608
|
+
* @static
|
|
7609
|
+
* @param {google.pubsub.v1.ICloudStorageConfig} message CloudStorageConfig message or plain object to encode
|
|
7610
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7611
|
+
* @returns {$protobuf.Writer} Writer
|
|
7612
|
+
*/
|
|
7613
|
+
CloudStorageConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
7614
|
+
return this.encode(message, writer).ldelim();
|
|
7615
|
+
};
|
|
7616
|
+
|
|
7617
|
+
/**
|
|
7618
|
+
* Decodes a CloudStorageConfig message from the specified reader or buffer.
|
|
7619
|
+
* @function decode
|
|
7620
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7621
|
+
* @static
|
|
7622
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7623
|
+
* @param {number} [length] Message length if known beforehand
|
|
7624
|
+
* @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig
|
|
7625
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7626
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7627
|
+
*/
|
|
7628
|
+
CloudStorageConfig.decode = function decode(reader, length) {
|
|
7629
|
+
if (!(reader instanceof $Reader))
|
|
7630
|
+
reader = $Reader.create(reader);
|
|
7631
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig();
|
|
7632
|
+
while (reader.pos < end) {
|
|
7633
|
+
var tag = reader.uint32();
|
|
7634
|
+
switch (tag >>> 3) {
|
|
7635
|
+
case 1: {
|
|
7636
|
+
message.bucket = reader.string();
|
|
7637
|
+
break;
|
|
7638
|
+
}
|
|
7639
|
+
case 2: {
|
|
7640
|
+
message.filenamePrefix = reader.string();
|
|
7641
|
+
break;
|
|
7642
|
+
}
|
|
7643
|
+
case 3: {
|
|
7644
|
+
message.filenameSuffix = reader.string();
|
|
7645
|
+
break;
|
|
7646
|
+
}
|
|
7647
|
+
case 4: {
|
|
7648
|
+
message.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.decode(reader, reader.uint32());
|
|
7649
|
+
break;
|
|
7650
|
+
}
|
|
7651
|
+
case 5: {
|
|
7652
|
+
message.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.decode(reader, reader.uint32());
|
|
7653
|
+
break;
|
|
7654
|
+
}
|
|
7655
|
+
case 6: {
|
|
7656
|
+
message.maxDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
|
7657
|
+
break;
|
|
7658
|
+
}
|
|
7659
|
+
case 7: {
|
|
7660
|
+
message.maxBytes = reader.int64();
|
|
7661
|
+
break;
|
|
7662
|
+
}
|
|
7663
|
+
case 9: {
|
|
7664
|
+
message.state = reader.int32();
|
|
7665
|
+
break;
|
|
7666
|
+
}
|
|
7667
|
+
default:
|
|
7668
|
+
reader.skipType(tag & 7);
|
|
7669
|
+
break;
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
return message;
|
|
7673
|
+
};
|
|
7674
|
+
|
|
7675
|
+
/**
|
|
7676
|
+
* Decodes a CloudStorageConfig message from the specified reader or buffer, length delimited.
|
|
7677
|
+
* @function decodeDelimited
|
|
7678
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7679
|
+
* @static
|
|
7680
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7681
|
+
* @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig
|
|
7682
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7683
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7684
|
+
*/
|
|
7685
|
+
CloudStorageConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
7686
|
+
if (!(reader instanceof $Reader))
|
|
7687
|
+
reader = new $Reader(reader);
|
|
7688
|
+
return this.decode(reader, reader.uint32());
|
|
7689
|
+
};
|
|
7690
|
+
|
|
7691
|
+
/**
|
|
7692
|
+
* Verifies a CloudStorageConfig message.
|
|
7693
|
+
* @function verify
|
|
7694
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7695
|
+
* @static
|
|
7696
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
7697
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
7698
|
+
*/
|
|
7699
|
+
CloudStorageConfig.verify = function verify(message) {
|
|
7700
|
+
if (typeof message !== "object" || message === null)
|
|
7701
|
+
return "object expected";
|
|
7702
|
+
var properties = {};
|
|
7703
|
+
if (message.bucket != null && message.hasOwnProperty("bucket"))
|
|
7704
|
+
if (!$util.isString(message.bucket))
|
|
7705
|
+
return "bucket: string expected";
|
|
7706
|
+
if (message.filenamePrefix != null && message.hasOwnProperty("filenamePrefix"))
|
|
7707
|
+
if (!$util.isString(message.filenamePrefix))
|
|
7708
|
+
return "filenamePrefix: string expected";
|
|
7709
|
+
if (message.filenameSuffix != null && message.hasOwnProperty("filenameSuffix"))
|
|
7710
|
+
if (!$util.isString(message.filenameSuffix))
|
|
7711
|
+
return "filenameSuffix: string expected";
|
|
7712
|
+
if (message.textConfig != null && message.hasOwnProperty("textConfig")) {
|
|
7713
|
+
properties.outputFormat = 1;
|
|
7714
|
+
{
|
|
7715
|
+
var error = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.verify(message.textConfig);
|
|
7716
|
+
if (error)
|
|
7717
|
+
return "textConfig." + error;
|
|
7718
|
+
}
|
|
7719
|
+
}
|
|
7720
|
+
if (message.avroConfig != null && message.hasOwnProperty("avroConfig")) {
|
|
7721
|
+
if (properties.outputFormat === 1)
|
|
7722
|
+
return "outputFormat: multiple values";
|
|
7723
|
+
properties.outputFormat = 1;
|
|
7724
|
+
{
|
|
7725
|
+
var error = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.verify(message.avroConfig);
|
|
7726
|
+
if (error)
|
|
7727
|
+
return "avroConfig." + error;
|
|
7728
|
+
}
|
|
7729
|
+
}
|
|
7730
|
+
if (message.maxDuration != null && message.hasOwnProperty("maxDuration")) {
|
|
7731
|
+
var error = $root.google.protobuf.Duration.verify(message.maxDuration);
|
|
7732
|
+
if (error)
|
|
7733
|
+
return "maxDuration." + error;
|
|
7734
|
+
}
|
|
7735
|
+
if (message.maxBytes != null && message.hasOwnProperty("maxBytes"))
|
|
7736
|
+
if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high)))
|
|
7737
|
+
return "maxBytes: integer|Long expected";
|
|
7738
|
+
if (message.state != null && message.hasOwnProperty("state"))
|
|
7739
|
+
switch (message.state) {
|
|
7740
|
+
default:
|
|
7741
|
+
return "state: enum value expected";
|
|
7742
|
+
case 0:
|
|
7743
|
+
case 1:
|
|
7744
|
+
case 2:
|
|
7745
|
+
case 3:
|
|
7746
|
+
break;
|
|
7747
|
+
}
|
|
7748
|
+
return null;
|
|
7749
|
+
};
|
|
7750
|
+
|
|
7751
|
+
/**
|
|
7752
|
+
* Creates a CloudStorageConfig message from a plain object. Also converts values to their respective internal types.
|
|
7753
|
+
* @function fromObject
|
|
7754
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7755
|
+
* @static
|
|
7756
|
+
* @param {Object.<string,*>} object Plain object
|
|
7757
|
+
* @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig
|
|
7758
|
+
*/
|
|
7759
|
+
CloudStorageConfig.fromObject = function fromObject(object) {
|
|
7760
|
+
if (object instanceof $root.google.pubsub.v1.CloudStorageConfig)
|
|
7761
|
+
return object;
|
|
7762
|
+
var message = new $root.google.pubsub.v1.CloudStorageConfig();
|
|
7763
|
+
if (object.bucket != null)
|
|
7764
|
+
message.bucket = String(object.bucket);
|
|
7765
|
+
if (object.filenamePrefix != null)
|
|
7766
|
+
message.filenamePrefix = String(object.filenamePrefix);
|
|
7767
|
+
if (object.filenameSuffix != null)
|
|
7768
|
+
message.filenameSuffix = String(object.filenameSuffix);
|
|
7769
|
+
if (object.textConfig != null) {
|
|
7770
|
+
if (typeof object.textConfig !== "object")
|
|
7771
|
+
throw TypeError(".google.pubsub.v1.CloudStorageConfig.textConfig: object expected");
|
|
7772
|
+
message.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.fromObject(object.textConfig);
|
|
7773
|
+
}
|
|
7774
|
+
if (object.avroConfig != null) {
|
|
7775
|
+
if (typeof object.avroConfig !== "object")
|
|
7776
|
+
throw TypeError(".google.pubsub.v1.CloudStorageConfig.avroConfig: object expected");
|
|
7777
|
+
message.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.fromObject(object.avroConfig);
|
|
7778
|
+
}
|
|
7779
|
+
if (object.maxDuration != null) {
|
|
7780
|
+
if (typeof object.maxDuration !== "object")
|
|
7781
|
+
throw TypeError(".google.pubsub.v1.CloudStorageConfig.maxDuration: object expected");
|
|
7782
|
+
message.maxDuration = $root.google.protobuf.Duration.fromObject(object.maxDuration);
|
|
7783
|
+
}
|
|
7784
|
+
if (object.maxBytes != null)
|
|
7785
|
+
if ($util.Long)
|
|
7786
|
+
(message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false;
|
|
7787
|
+
else if (typeof object.maxBytes === "string")
|
|
7788
|
+
message.maxBytes = parseInt(object.maxBytes, 10);
|
|
7789
|
+
else if (typeof object.maxBytes === "number")
|
|
7790
|
+
message.maxBytes = object.maxBytes;
|
|
7791
|
+
else if (typeof object.maxBytes === "object")
|
|
7792
|
+
message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber();
|
|
7793
|
+
switch (object.state) {
|
|
7794
|
+
default:
|
|
7795
|
+
if (typeof object.state === "number") {
|
|
7796
|
+
message.state = object.state;
|
|
7797
|
+
break;
|
|
7798
|
+
}
|
|
7799
|
+
break;
|
|
7800
|
+
case "STATE_UNSPECIFIED":
|
|
7801
|
+
case 0:
|
|
7802
|
+
message.state = 0;
|
|
7803
|
+
break;
|
|
7804
|
+
case "ACTIVE":
|
|
7805
|
+
case 1:
|
|
7806
|
+
message.state = 1;
|
|
7807
|
+
break;
|
|
7808
|
+
case "PERMISSION_DENIED":
|
|
7809
|
+
case 2:
|
|
7810
|
+
message.state = 2;
|
|
7811
|
+
break;
|
|
7812
|
+
case "NOT_FOUND":
|
|
7813
|
+
case 3:
|
|
7814
|
+
message.state = 3;
|
|
7815
|
+
break;
|
|
7816
|
+
}
|
|
7817
|
+
return message;
|
|
7818
|
+
};
|
|
7819
|
+
|
|
7820
|
+
/**
|
|
7821
|
+
* Creates a plain object from a CloudStorageConfig message. Also converts values to other types if specified.
|
|
7822
|
+
* @function toObject
|
|
7823
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7824
|
+
* @static
|
|
7825
|
+
* @param {google.pubsub.v1.CloudStorageConfig} message CloudStorageConfig
|
|
7826
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
7827
|
+
* @returns {Object.<string,*>} Plain object
|
|
7828
|
+
*/
|
|
7829
|
+
CloudStorageConfig.toObject = function toObject(message, options) {
|
|
7830
|
+
if (!options)
|
|
7831
|
+
options = {};
|
|
7832
|
+
var object = {};
|
|
7833
|
+
if (options.defaults) {
|
|
7834
|
+
object.bucket = "";
|
|
7835
|
+
object.filenamePrefix = "";
|
|
7836
|
+
object.filenameSuffix = "";
|
|
7837
|
+
object.maxDuration = null;
|
|
7838
|
+
if ($util.Long) {
|
|
7839
|
+
var long = new $util.Long(0, 0, false);
|
|
7840
|
+
object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
7841
|
+
} else
|
|
7842
|
+
object.maxBytes = options.longs === String ? "0" : 0;
|
|
7843
|
+
object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
|
|
7844
|
+
}
|
|
7845
|
+
if (message.bucket != null && message.hasOwnProperty("bucket"))
|
|
7846
|
+
object.bucket = message.bucket;
|
|
7847
|
+
if (message.filenamePrefix != null && message.hasOwnProperty("filenamePrefix"))
|
|
7848
|
+
object.filenamePrefix = message.filenamePrefix;
|
|
7849
|
+
if (message.filenameSuffix != null && message.hasOwnProperty("filenameSuffix"))
|
|
7850
|
+
object.filenameSuffix = message.filenameSuffix;
|
|
7851
|
+
if (message.textConfig != null && message.hasOwnProperty("textConfig")) {
|
|
7852
|
+
object.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.toObject(message.textConfig, options);
|
|
7853
|
+
if (options.oneofs)
|
|
7854
|
+
object.outputFormat = "textConfig";
|
|
7855
|
+
}
|
|
7856
|
+
if (message.avroConfig != null && message.hasOwnProperty("avroConfig")) {
|
|
7857
|
+
object.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.toObject(message.avroConfig, options);
|
|
7858
|
+
if (options.oneofs)
|
|
7859
|
+
object.outputFormat = "avroConfig";
|
|
7860
|
+
}
|
|
7861
|
+
if (message.maxDuration != null && message.hasOwnProperty("maxDuration"))
|
|
7862
|
+
object.maxDuration = $root.google.protobuf.Duration.toObject(message.maxDuration, options);
|
|
7863
|
+
if (message.maxBytes != null && message.hasOwnProperty("maxBytes"))
|
|
7864
|
+
if (typeof message.maxBytes === "number")
|
|
7865
|
+
object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes;
|
|
7866
|
+
else
|
|
7867
|
+
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;
|
|
7868
|
+
if (message.state != null && message.hasOwnProperty("state"))
|
|
7869
|
+
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;
|
|
7870
|
+
return object;
|
|
7871
|
+
};
|
|
7872
|
+
|
|
7873
|
+
/**
|
|
7874
|
+
* Converts this CloudStorageConfig to JSON.
|
|
7875
|
+
* @function toJSON
|
|
7876
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7877
|
+
* @instance
|
|
7878
|
+
* @returns {Object.<string,*>} JSON object
|
|
7879
|
+
*/
|
|
7880
|
+
CloudStorageConfig.prototype.toJSON = function toJSON() {
|
|
7881
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
7882
|
+
};
|
|
7883
|
+
|
|
7884
|
+
/**
|
|
7885
|
+
* Gets the default type url for CloudStorageConfig
|
|
7886
|
+
* @function getTypeUrl
|
|
7887
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7888
|
+
* @static
|
|
7889
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
7890
|
+
* @returns {string} The default type url
|
|
7891
|
+
*/
|
|
7892
|
+
CloudStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
7893
|
+
if (typeUrlPrefix === undefined) {
|
|
7894
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
7895
|
+
}
|
|
7896
|
+
return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig";
|
|
7897
|
+
};
|
|
7898
|
+
|
|
7899
|
+
CloudStorageConfig.TextConfig = (function() {
|
|
7900
|
+
|
|
7901
|
+
/**
|
|
7902
|
+
* Properties of a TextConfig.
|
|
7903
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7904
|
+
* @interface ITextConfig
|
|
7905
|
+
*/
|
|
7906
|
+
|
|
7907
|
+
/**
|
|
7908
|
+
* Constructs a new TextConfig.
|
|
7909
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
7910
|
+
* @classdesc Represents a TextConfig.
|
|
7911
|
+
* @implements ITextConfig
|
|
7912
|
+
* @constructor
|
|
7913
|
+
* @param {google.pubsub.v1.CloudStorageConfig.ITextConfig=} [properties] Properties to set
|
|
7914
|
+
*/
|
|
7915
|
+
function TextConfig(properties) {
|
|
7916
|
+
if (properties)
|
|
7917
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
7918
|
+
if (properties[keys[i]] != null)
|
|
7919
|
+
this[keys[i]] = properties[keys[i]];
|
|
7920
|
+
}
|
|
7921
|
+
|
|
7922
|
+
/**
|
|
7923
|
+
* Creates a new TextConfig instance using the specified properties.
|
|
7924
|
+
* @function create
|
|
7925
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
7926
|
+
* @static
|
|
7927
|
+
* @param {google.pubsub.v1.CloudStorageConfig.ITextConfig=} [properties] Properties to set
|
|
7928
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig instance
|
|
7929
|
+
*/
|
|
7930
|
+
TextConfig.create = function create(properties) {
|
|
7931
|
+
return new TextConfig(properties);
|
|
7932
|
+
};
|
|
7933
|
+
|
|
7934
|
+
/**
|
|
7935
|
+
* Encodes the specified TextConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages.
|
|
7936
|
+
* @function encode
|
|
7937
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
7938
|
+
* @static
|
|
7939
|
+
* @param {google.pubsub.v1.CloudStorageConfig.ITextConfig} message TextConfig message or plain object to encode
|
|
7940
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7941
|
+
* @returns {$protobuf.Writer} Writer
|
|
7942
|
+
*/
|
|
7943
|
+
TextConfig.encode = function encode(message, writer) {
|
|
7944
|
+
if (!writer)
|
|
7945
|
+
writer = $Writer.create();
|
|
7946
|
+
return writer;
|
|
7947
|
+
};
|
|
7948
|
+
|
|
7949
|
+
/**
|
|
7950
|
+
* Encodes the specified TextConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages.
|
|
7951
|
+
* @function encodeDelimited
|
|
7952
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
7953
|
+
* @static
|
|
7954
|
+
* @param {google.pubsub.v1.CloudStorageConfig.ITextConfig} message TextConfig message or plain object to encode
|
|
7955
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7956
|
+
* @returns {$protobuf.Writer} Writer
|
|
7957
|
+
*/
|
|
7958
|
+
TextConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
7959
|
+
return this.encode(message, writer).ldelim();
|
|
7960
|
+
};
|
|
7961
|
+
|
|
7962
|
+
/**
|
|
7963
|
+
* Decodes a TextConfig message from the specified reader or buffer.
|
|
7964
|
+
* @function decode
|
|
7965
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
7966
|
+
* @static
|
|
7967
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7968
|
+
* @param {number} [length] Message length if known beforehand
|
|
7969
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig
|
|
7970
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7971
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7972
|
+
*/
|
|
7973
|
+
TextConfig.decode = function decode(reader, length) {
|
|
7974
|
+
if (!(reader instanceof $Reader))
|
|
7975
|
+
reader = $Reader.create(reader);
|
|
7976
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig.TextConfig();
|
|
7977
|
+
while (reader.pos < end) {
|
|
7978
|
+
var tag = reader.uint32();
|
|
7979
|
+
switch (tag >>> 3) {
|
|
7980
|
+
default:
|
|
7981
|
+
reader.skipType(tag & 7);
|
|
7982
|
+
break;
|
|
7983
|
+
}
|
|
7984
|
+
}
|
|
7985
|
+
return message;
|
|
7986
|
+
};
|
|
7987
|
+
|
|
7988
|
+
/**
|
|
7989
|
+
* Decodes a TextConfig message from the specified reader or buffer, length delimited.
|
|
7990
|
+
* @function decodeDelimited
|
|
7991
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
7992
|
+
* @static
|
|
7993
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7994
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig
|
|
7995
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7996
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7997
|
+
*/
|
|
7998
|
+
TextConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
7999
|
+
if (!(reader instanceof $Reader))
|
|
8000
|
+
reader = new $Reader(reader);
|
|
8001
|
+
return this.decode(reader, reader.uint32());
|
|
8002
|
+
};
|
|
8003
|
+
|
|
8004
|
+
/**
|
|
8005
|
+
* Verifies a TextConfig message.
|
|
8006
|
+
* @function verify
|
|
8007
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
8008
|
+
* @static
|
|
8009
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
8010
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
8011
|
+
*/
|
|
8012
|
+
TextConfig.verify = function verify(message) {
|
|
8013
|
+
if (typeof message !== "object" || message === null)
|
|
8014
|
+
return "object expected";
|
|
8015
|
+
return null;
|
|
8016
|
+
};
|
|
8017
|
+
|
|
8018
|
+
/**
|
|
8019
|
+
* Creates a TextConfig message from a plain object. Also converts values to their respective internal types.
|
|
8020
|
+
* @function fromObject
|
|
8021
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
8022
|
+
* @static
|
|
8023
|
+
* @param {Object.<string,*>} object Plain object
|
|
8024
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig
|
|
8025
|
+
*/
|
|
8026
|
+
TextConfig.fromObject = function fromObject(object) {
|
|
8027
|
+
if (object instanceof $root.google.pubsub.v1.CloudStorageConfig.TextConfig)
|
|
8028
|
+
return object;
|
|
8029
|
+
return new $root.google.pubsub.v1.CloudStorageConfig.TextConfig();
|
|
8030
|
+
};
|
|
8031
|
+
|
|
8032
|
+
/**
|
|
8033
|
+
* Creates a plain object from a TextConfig message. Also converts values to other types if specified.
|
|
8034
|
+
* @function toObject
|
|
8035
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
8036
|
+
* @static
|
|
8037
|
+
* @param {google.pubsub.v1.CloudStorageConfig.TextConfig} message TextConfig
|
|
8038
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
8039
|
+
* @returns {Object.<string,*>} Plain object
|
|
8040
|
+
*/
|
|
8041
|
+
TextConfig.toObject = function toObject() {
|
|
8042
|
+
return {};
|
|
8043
|
+
};
|
|
8044
|
+
|
|
8045
|
+
/**
|
|
8046
|
+
* Converts this TextConfig to JSON.
|
|
8047
|
+
* @function toJSON
|
|
8048
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
8049
|
+
* @instance
|
|
8050
|
+
* @returns {Object.<string,*>} JSON object
|
|
8051
|
+
*/
|
|
8052
|
+
TextConfig.prototype.toJSON = function toJSON() {
|
|
8053
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
8054
|
+
};
|
|
8055
|
+
|
|
8056
|
+
/**
|
|
8057
|
+
* Gets the default type url for TextConfig
|
|
8058
|
+
* @function getTypeUrl
|
|
8059
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.TextConfig
|
|
8060
|
+
* @static
|
|
8061
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
8062
|
+
* @returns {string} The default type url
|
|
8063
|
+
*/
|
|
8064
|
+
TextConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
8065
|
+
if (typeUrlPrefix === undefined) {
|
|
8066
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
8067
|
+
}
|
|
8068
|
+
return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig.TextConfig";
|
|
8069
|
+
};
|
|
8070
|
+
|
|
8071
|
+
return TextConfig;
|
|
8072
|
+
})();
|
|
8073
|
+
|
|
8074
|
+
CloudStorageConfig.AvroConfig = (function() {
|
|
8075
|
+
|
|
8076
|
+
/**
|
|
8077
|
+
* Properties of an AvroConfig.
|
|
8078
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
8079
|
+
* @interface IAvroConfig
|
|
8080
|
+
* @property {boolean|null} [writeMetadata] AvroConfig writeMetadata
|
|
8081
|
+
*/
|
|
8082
|
+
|
|
8083
|
+
/**
|
|
8084
|
+
* Constructs a new AvroConfig.
|
|
8085
|
+
* @memberof google.pubsub.v1.CloudStorageConfig
|
|
8086
|
+
* @classdesc Represents an AvroConfig.
|
|
8087
|
+
* @implements IAvroConfig
|
|
8088
|
+
* @constructor
|
|
8089
|
+
* @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig=} [properties] Properties to set
|
|
8090
|
+
*/
|
|
8091
|
+
function AvroConfig(properties) {
|
|
8092
|
+
if (properties)
|
|
8093
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
8094
|
+
if (properties[keys[i]] != null)
|
|
8095
|
+
this[keys[i]] = properties[keys[i]];
|
|
8096
|
+
}
|
|
8097
|
+
|
|
8098
|
+
/**
|
|
8099
|
+
* AvroConfig writeMetadata.
|
|
8100
|
+
* @member {boolean} writeMetadata
|
|
8101
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8102
|
+
* @instance
|
|
8103
|
+
*/
|
|
8104
|
+
AvroConfig.prototype.writeMetadata = false;
|
|
8105
|
+
|
|
8106
|
+
/**
|
|
8107
|
+
* Creates a new AvroConfig instance using the specified properties.
|
|
8108
|
+
* @function create
|
|
8109
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8110
|
+
* @static
|
|
8111
|
+
* @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig=} [properties] Properties to set
|
|
8112
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig instance
|
|
8113
|
+
*/
|
|
8114
|
+
AvroConfig.create = function create(properties) {
|
|
8115
|
+
return new AvroConfig(properties);
|
|
8116
|
+
};
|
|
8117
|
+
|
|
8118
|
+
/**
|
|
8119
|
+
* Encodes the specified AvroConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages.
|
|
8120
|
+
* @function encode
|
|
8121
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8122
|
+
* @static
|
|
8123
|
+
* @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig} message AvroConfig message or plain object to encode
|
|
8124
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8125
|
+
* @returns {$protobuf.Writer} Writer
|
|
8126
|
+
*/
|
|
8127
|
+
AvroConfig.encode = function encode(message, writer) {
|
|
8128
|
+
if (!writer)
|
|
8129
|
+
writer = $Writer.create();
|
|
8130
|
+
if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata"))
|
|
8131
|
+
writer.uint32(/* id 1, wireType 0 =*/8).bool(message.writeMetadata);
|
|
8132
|
+
return writer;
|
|
8133
|
+
};
|
|
8134
|
+
|
|
8135
|
+
/**
|
|
8136
|
+
* Encodes the specified AvroConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages.
|
|
8137
|
+
* @function encodeDelimited
|
|
8138
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8139
|
+
* @static
|
|
8140
|
+
* @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig} message AvroConfig message or plain object to encode
|
|
8141
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
8142
|
+
* @returns {$protobuf.Writer} Writer
|
|
8143
|
+
*/
|
|
8144
|
+
AvroConfig.encodeDelimited = function encodeDelimited(message, writer) {
|
|
8145
|
+
return this.encode(message, writer).ldelim();
|
|
8146
|
+
};
|
|
8147
|
+
|
|
8148
|
+
/**
|
|
8149
|
+
* Decodes an AvroConfig message from the specified reader or buffer.
|
|
8150
|
+
* @function decode
|
|
8151
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8152
|
+
* @static
|
|
8153
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8154
|
+
* @param {number} [length] Message length if known beforehand
|
|
8155
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig
|
|
8156
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8157
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8158
|
+
*/
|
|
8159
|
+
AvroConfig.decode = function decode(reader, length) {
|
|
8160
|
+
if (!(reader instanceof $Reader))
|
|
8161
|
+
reader = $Reader.create(reader);
|
|
8162
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig.AvroConfig();
|
|
8163
|
+
while (reader.pos < end) {
|
|
8164
|
+
var tag = reader.uint32();
|
|
8165
|
+
switch (tag >>> 3) {
|
|
8166
|
+
case 1: {
|
|
8167
|
+
message.writeMetadata = reader.bool();
|
|
8168
|
+
break;
|
|
8169
|
+
}
|
|
8170
|
+
default:
|
|
8171
|
+
reader.skipType(tag & 7);
|
|
8172
|
+
break;
|
|
8173
|
+
}
|
|
8174
|
+
}
|
|
8175
|
+
return message;
|
|
8176
|
+
};
|
|
8177
|
+
|
|
8178
|
+
/**
|
|
8179
|
+
* Decodes an AvroConfig message from the specified reader or buffer, length delimited.
|
|
8180
|
+
* @function decodeDelimited
|
|
8181
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8182
|
+
* @static
|
|
8183
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
8184
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig
|
|
8185
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8186
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8187
|
+
*/
|
|
8188
|
+
AvroConfig.decodeDelimited = function decodeDelimited(reader) {
|
|
8189
|
+
if (!(reader instanceof $Reader))
|
|
8190
|
+
reader = new $Reader(reader);
|
|
8191
|
+
return this.decode(reader, reader.uint32());
|
|
8192
|
+
};
|
|
8193
|
+
|
|
8194
|
+
/**
|
|
8195
|
+
* Verifies an AvroConfig message.
|
|
8196
|
+
* @function verify
|
|
8197
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8198
|
+
* @static
|
|
8199
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
8200
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
8201
|
+
*/
|
|
8202
|
+
AvroConfig.verify = function verify(message) {
|
|
8203
|
+
if (typeof message !== "object" || message === null)
|
|
8204
|
+
return "object expected";
|
|
8205
|
+
if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
|
|
8206
|
+
if (typeof message.writeMetadata !== "boolean")
|
|
8207
|
+
return "writeMetadata: boolean expected";
|
|
8208
|
+
return null;
|
|
8209
|
+
};
|
|
8210
|
+
|
|
8211
|
+
/**
|
|
8212
|
+
* Creates an AvroConfig message from a plain object. Also converts values to their respective internal types.
|
|
8213
|
+
* @function fromObject
|
|
8214
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8215
|
+
* @static
|
|
8216
|
+
* @param {Object.<string,*>} object Plain object
|
|
8217
|
+
* @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig
|
|
8218
|
+
*/
|
|
8219
|
+
AvroConfig.fromObject = function fromObject(object) {
|
|
8220
|
+
if (object instanceof $root.google.pubsub.v1.CloudStorageConfig.AvroConfig)
|
|
8221
|
+
return object;
|
|
8222
|
+
var message = new $root.google.pubsub.v1.CloudStorageConfig.AvroConfig();
|
|
8223
|
+
if (object.writeMetadata != null)
|
|
8224
|
+
message.writeMetadata = Boolean(object.writeMetadata);
|
|
8225
|
+
return message;
|
|
8226
|
+
};
|
|
8227
|
+
|
|
8228
|
+
/**
|
|
8229
|
+
* Creates a plain object from an AvroConfig message. Also converts values to other types if specified.
|
|
8230
|
+
* @function toObject
|
|
8231
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8232
|
+
* @static
|
|
8233
|
+
* @param {google.pubsub.v1.CloudStorageConfig.AvroConfig} message AvroConfig
|
|
8234
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
8235
|
+
* @returns {Object.<string,*>} Plain object
|
|
8236
|
+
*/
|
|
8237
|
+
AvroConfig.toObject = function toObject(message, options) {
|
|
8238
|
+
if (!options)
|
|
8239
|
+
options = {};
|
|
8240
|
+
var object = {};
|
|
8241
|
+
if (options.defaults)
|
|
8242
|
+
object.writeMetadata = false;
|
|
8243
|
+
if (message.writeMetadata != null && message.hasOwnProperty("writeMetadata"))
|
|
8244
|
+
object.writeMetadata = message.writeMetadata;
|
|
8245
|
+
return object;
|
|
8246
|
+
};
|
|
8247
|
+
|
|
8248
|
+
/**
|
|
8249
|
+
* Converts this AvroConfig to JSON.
|
|
8250
|
+
* @function toJSON
|
|
8251
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8252
|
+
* @instance
|
|
8253
|
+
* @returns {Object.<string,*>} JSON object
|
|
8254
|
+
*/
|
|
8255
|
+
AvroConfig.prototype.toJSON = function toJSON() {
|
|
8256
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
8257
|
+
};
|
|
8258
|
+
|
|
8259
|
+
/**
|
|
8260
|
+
* Gets the default type url for AvroConfig
|
|
8261
|
+
* @function getTypeUrl
|
|
8262
|
+
* @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig
|
|
8263
|
+
* @static
|
|
8264
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
8265
|
+
* @returns {string} The default type url
|
|
8266
|
+
*/
|
|
8267
|
+
AvroConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
8268
|
+
if (typeUrlPrefix === undefined) {
|
|
8269
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
8270
|
+
}
|
|
8271
|
+
return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig.AvroConfig";
|
|
8272
|
+
};
|
|
8273
|
+
|
|
8274
|
+
return AvroConfig;
|
|
8275
|
+
})();
|
|
8276
|
+
|
|
8277
|
+
/**
|
|
8278
|
+
* State enum.
|
|
8279
|
+
* @name google.pubsub.v1.CloudStorageConfig.State
|
|
8280
|
+
* @enum {number}
|
|
8281
|
+
* @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
|
|
8282
|
+
* @property {number} ACTIVE=1 ACTIVE value
|
|
8283
|
+
* @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value
|
|
8284
|
+
* @property {number} NOT_FOUND=3 NOT_FOUND value
|
|
8285
|
+
*/
|
|
8286
|
+
CloudStorageConfig.State = (function() {
|
|
8287
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
8288
|
+
values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
|
|
8289
|
+
values[valuesById[1] = "ACTIVE"] = 1;
|
|
8290
|
+
values[valuesById[2] = "PERMISSION_DENIED"] = 2;
|
|
8291
|
+
values[valuesById[3] = "NOT_FOUND"] = 3;
|
|
8292
|
+
return values;
|
|
8293
|
+
})();
|
|
8294
|
+
|
|
8295
|
+
return CloudStorageConfig;
|
|
8296
|
+
})();
|
|
8297
|
+
|
|
7424
8298
|
v1.ReceivedMessage = (function() {
|
|
7425
8299
|
|
|
7426
8300
|
/**
|