@google-cloud/pubsub 5.0.0 → 5.1.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/build/protos/google/pubsub/v1/pubsub.proto +144 -29
- package/build/protos/google/pubsub/v1/schema.proto +2 -3
- package/build/protos/protos.d.ts +471 -5
- package/build/protos/protos.js +1374 -126
- package/build/protos/protos.json +164 -10
- package/build/src/telemetry-tracing.js +19 -12
- package/build/src/telemetry-tracing.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +0 -18
- package/build/src/v1/publisher_client.js +16 -8
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/schema_service_client.d.ts +0 -20
- package/build/src/v1/schema_service_client.js +5 -5
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +4 -36
- package/build/src/v1/subscriber_client.js +6 -8
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -1620
package/build/protos/protos.js
CHANGED
|
@@ -4189,6 +4189,7 @@
|
|
|
4189
4189
|
* @property {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null} [awsMskFailure] IngestionFailureEvent awsMskFailure
|
|
4190
4190
|
* @property {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null} [azureEventHubsFailure] IngestionFailureEvent azureEventHubsFailure
|
|
4191
4191
|
* @property {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null} [confluentCloudFailure] IngestionFailureEvent confluentCloudFailure
|
|
4192
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null} [awsKinesisFailure] IngestionFailureEvent awsKinesisFailure
|
|
4192
4193
|
*/
|
|
4193
4194
|
|
|
4194
4195
|
/**
|
|
@@ -4254,17 +4255,25 @@
|
|
|
4254
4255
|
*/
|
|
4255
4256
|
IngestionFailureEvent.prototype.confluentCloudFailure = null;
|
|
4256
4257
|
|
|
4258
|
+
/**
|
|
4259
|
+
* IngestionFailureEvent awsKinesisFailure.
|
|
4260
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null|undefined} awsKinesisFailure
|
|
4261
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
4262
|
+
* @instance
|
|
4263
|
+
*/
|
|
4264
|
+
IngestionFailureEvent.prototype.awsKinesisFailure = null;
|
|
4265
|
+
|
|
4257
4266
|
// OneOf field names bound to virtual getters and setters
|
|
4258
4267
|
var $oneOfFields;
|
|
4259
4268
|
|
|
4260
4269
|
/**
|
|
4261
4270
|
* IngestionFailureEvent failure.
|
|
4262
|
-
* @member {"cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|undefined} failure
|
|
4271
|
+
* @member {"cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|"awsKinesisFailure"|undefined} failure
|
|
4263
4272
|
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
4264
4273
|
* @instance
|
|
4265
4274
|
*/
|
|
4266
4275
|
Object.defineProperty(IngestionFailureEvent.prototype, "failure", {
|
|
4267
|
-
get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure", "awsMskFailure", "azureEventHubsFailure", "confluentCloudFailure"]),
|
|
4276
|
+
get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure", "awsMskFailure", "azureEventHubsFailure", "confluentCloudFailure", "awsKinesisFailure"]),
|
|
4268
4277
|
set: $util.oneOfSetter($oneOfFields)
|
|
4269
4278
|
});
|
|
4270
4279
|
|
|
@@ -4304,6 +4313,8 @@
|
|
|
4304
4313
|
$root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.encode(message.azureEventHubsFailure, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
4305
4314
|
if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure"))
|
|
4306
4315
|
$root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.encode(message.confluentCloudFailure, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
4316
|
+
if (message.awsKinesisFailure != null && Object.hasOwnProperty.call(message, "awsKinesisFailure"))
|
|
4317
|
+
$root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.encode(message.awsKinesisFailure, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
4307
4318
|
return writer;
|
|
4308
4319
|
};
|
|
4309
4320
|
|
|
@@ -4364,6 +4375,10 @@
|
|
|
4364
4375
|
message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.decode(reader, reader.uint32());
|
|
4365
4376
|
break;
|
|
4366
4377
|
}
|
|
4378
|
+
case 7: {
|
|
4379
|
+
message.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.decode(reader, reader.uint32());
|
|
4380
|
+
break;
|
|
4381
|
+
}
|
|
4367
4382
|
default:
|
|
4368
4383
|
reader.skipType(tag & 7);
|
|
4369
4384
|
break;
|
|
@@ -4444,6 +4459,16 @@
|
|
|
4444
4459
|
return "confluentCloudFailure." + error;
|
|
4445
4460
|
}
|
|
4446
4461
|
}
|
|
4462
|
+
if (message.awsKinesisFailure != null && message.hasOwnProperty("awsKinesisFailure")) {
|
|
4463
|
+
if (properties.failure === 1)
|
|
4464
|
+
return "failure: multiple values";
|
|
4465
|
+
properties.failure = 1;
|
|
4466
|
+
{
|
|
4467
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify(message.awsKinesisFailure);
|
|
4468
|
+
if (error)
|
|
4469
|
+
return "awsKinesisFailure." + error;
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4447
4472
|
return null;
|
|
4448
4473
|
};
|
|
4449
4474
|
|
|
@@ -4483,6 +4508,11 @@
|
|
|
4483
4508
|
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.confluentCloudFailure: object expected");
|
|
4484
4509
|
message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.fromObject(object.confluentCloudFailure);
|
|
4485
4510
|
}
|
|
4511
|
+
if (object.awsKinesisFailure != null) {
|
|
4512
|
+
if (typeof object.awsKinesisFailure !== "object")
|
|
4513
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.awsKinesisFailure: object expected");
|
|
4514
|
+
message.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.fromObject(object.awsKinesisFailure);
|
|
4515
|
+
}
|
|
4486
4516
|
return message;
|
|
4487
4517
|
};
|
|
4488
4518
|
|
|
@@ -4527,6 +4557,11 @@
|
|
|
4527
4557
|
if (options.oneofs)
|
|
4528
4558
|
object.failure = "confluentCloudFailure";
|
|
4529
4559
|
}
|
|
4560
|
+
if (message.awsKinesisFailure != null && message.hasOwnProperty("awsKinesisFailure")) {
|
|
4561
|
+
object.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.toObject(message.awsKinesisFailure, options);
|
|
4562
|
+
if (options.oneofs)
|
|
4563
|
+
object.failure = "awsKinesisFailure";
|
|
4564
|
+
}
|
|
4530
4565
|
return object;
|
|
4531
4566
|
};
|
|
4532
4567
|
|
|
@@ -4910,6 +4945,183 @@
|
|
|
4910
4945
|
return AvroFailureReason;
|
|
4911
4946
|
})();
|
|
4912
4947
|
|
|
4948
|
+
IngestionFailureEvent.SchemaViolationReason = (function() {
|
|
4949
|
+
|
|
4950
|
+
/**
|
|
4951
|
+
* Properties of a SchemaViolationReason.
|
|
4952
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
4953
|
+
* @interface ISchemaViolationReason
|
|
4954
|
+
*/
|
|
4955
|
+
|
|
4956
|
+
/**
|
|
4957
|
+
* Constructs a new SchemaViolationReason.
|
|
4958
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
4959
|
+
* @classdesc Represents a SchemaViolationReason.
|
|
4960
|
+
* @implements ISchemaViolationReason
|
|
4961
|
+
* @constructor
|
|
4962
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason=} [properties] Properties to set
|
|
4963
|
+
*/
|
|
4964
|
+
function SchemaViolationReason(properties) {
|
|
4965
|
+
if (properties)
|
|
4966
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
4967
|
+
if (properties[keys[i]] != null)
|
|
4968
|
+
this[keys[i]] = properties[keys[i]];
|
|
4969
|
+
}
|
|
4970
|
+
|
|
4971
|
+
/**
|
|
4972
|
+
* Creates a new SchemaViolationReason instance using the specified properties.
|
|
4973
|
+
* @function create
|
|
4974
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
4975
|
+
* @static
|
|
4976
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason=} [properties] Properties to set
|
|
4977
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason instance
|
|
4978
|
+
*/
|
|
4979
|
+
SchemaViolationReason.create = function create(properties) {
|
|
4980
|
+
return new SchemaViolationReason(properties);
|
|
4981
|
+
};
|
|
4982
|
+
|
|
4983
|
+
/**
|
|
4984
|
+
* Encodes the specified SchemaViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages.
|
|
4985
|
+
* @function encode
|
|
4986
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
4987
|
+
* @static
|
|
4988
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason} message SchemaViolationReason message or plain object to encode
|
|
4989
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
4990
|
+
* @returns {$protobuf.Writer} Writer
|
|
4991
|
+
*/
|
|
4992
|
+
SchemaViolationReason.encode = function encode(message, writer) {
|
|
4993
|
+
if (!writer)
|
|
4994
|
+
writer = $Writer.create();
|
|
4995
|
+
return writer;
|
|
4996
|
+
};
|
|
4997
|
+
|
|
4998
|
+
/**
|
|
4999
|
+
* Encodes the specified SchemaViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages.
|
|
5000
|
+
* @function encodeDelimited
|
|
5001
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5002
|
+
* @static
|
|
5003
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason} message SchemaViolationReason message or plain object to encode
|
|
5004
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
5005
|
+
* @returns {$protobuf.Writer} Writer
|
|
5006
|
+
*/
|
|
5007
|
+
SchemaViolationReason.encodeDelimited = function encodeDelimited(message, writer) {
|
|
5008
|
+
return this.encode(message, writer).ldelim();
|
|
5009
|
+
};
|
|
5010
|
+
|
|
5011
|
+
/**
|
|
5012
|
+
* Decodes a SchemaViolationReason message from the specified reader or buffer.
|
|
5013
|
+
* @function decode
|
|
5014
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5015
|
+
* @static
|
|
5016
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
5017
|
+
* @param {number} [length] Message length if known beforehand
|
|
5018
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason
|
|
5019
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
5020
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
5021
|
+
*/
|
|
5022
|
+
SchemaViolationReason.decode = function decode(reader, length, error) {
|
|
5023
|
+
if (!(reader instanceof $Reader))
|
|
5024
|
+
reader = $Reader.create(reader);
|
|
5025
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason();
|
|
5026
|
+
while (reader.pos < end) {
|
|
5027
|
+
var tag = reader.uint32();
|
|
5028
|
+
if (tag === error)
|
|
5029
|
+
break;
|
|
5030
|
+
switch (tag >>> 3) {
|
|
5031
|
+
default:
|
|
5032
|
+
reader.skipType(tag & 7);
|
|
5033
|
+
break;
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
return message;
|
|
5037
|
+
};
|
|
5038
|
+
|
|
5039
|
+
/**
|
|
5040
|
+
* Decodes a SchemaViolationReason message from the specified reader or buffer, length delimited.
|
|
5041
|
+
* @function decodeDelimited
|
|
5042
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5043
|
+
* @static
|
|
5044
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
5045
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason
|
|
5046
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
5047
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
5048
|
+
*/
|
|
5049
|
+
SchemaViolationReason.decodeDelimited = function decodeDelimited(reader) {
|
|
5050
|
+
if (!(reader instanceof $Reader))
|
|
5051
|
+
reader = new $Reader(reader);
|
|
5052
|
+
return this.decode(reader, reader.uint32());
|
|
5053
|
+
};
|
|
5054
|
+
|
|
5055
|
+
/**
|
|
5056
|
+
* Verifies a SchemaViolationReason message.
|
|
5057
|
+
* @function verify
|
|
5058
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5059
|
+
* @static
|
|
5060
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
5061
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
5062
|
+
*/
|
|
5063
|
+
SchemaViolationReason.verify = function verify(message) {
|
|
5064
|
+
if (typeof message !== "object" || message === null)
|
|
5065
|
+
return "object expected";
|
|
5066
|
+
return null;
|
|
5067
|
+
};
|
|
5068
|
+
|
|
5069
|
+
/**
|
|
5070
|
+
* Creates a SchemaViolationReason message from a plain object. Also converts values to their respective internal types.
|
|
5071
|
+
* @function fromObject
|
|
5072
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5073
|
+
* @static
|
|
5074
|
+
* @param {Object.<string,*>} object Plain object
|
|
5075
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason
|
|
5076
|
+
*/
|
|
5077
|
+
SchemaViolationReason.fromObject = function fromObject(object) {
|
|
5078
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason)
|
|
5079
|
+
return object;
|
|
5080
|
+
return new $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason();
|
|
5081
|
+
};
|
|
5082
|
+
|
|
5083
|
+
/**
|
|
5084
|
+
* Creates a plain object from a SchemaViolationReason message. Also converts values to other types if specified.
|
|
5085
|
+
* @function toObject
|
|
5086
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5087
|
+
* @static
|
|
5088
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} message SchemaViolationReason
|
|
5089
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
5090
|
+
* @returns {Object.<string,*>} Plain object
|
|
5091
|
+
*/
|
|
5092
|
+
SchemaViolationReason.toObject = function toObject() {
|
|
5093
|
+
return {};
|
|
5094
|
+
};
|
|
5095
|
+
|
|
5096
|
+
/**
|
|
5097
|
+
* Converts this SchemaViolationReason to JSON.
|
|
5098
|
+
* @function toJSON
|
|
5099
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5100
|
+
* @instance
|
|
5101
|
+
* @returns {Object.<string,*>} JSON object
|
|
5102
|
+
*/
|
|
5103
|
+
SchemaViolationReason.prototype.toJSON = function toJSON() {
|
|
5104
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
5105
|
+
};
|
|
5106
|
+
|
|
5107
|
+
/**
|
|
5108
|
+
* Gets the default type url for SchemaViolationReason
|
|
5109
|
+
* @function getTypeUrl
|
|
5110
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason
|
|
5111
|
+
* @static
|
|
5112
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
5113
|
+
* @returns {string} The default type url
|
|
5114
|
+
*/
|
|
5115
|
+
SchemaViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
5116
|
+
if (typeUrlPrefix === undefined) {
|
|
5117
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
5118
|
+
}
|
|
5119
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason";
|
|
5120
|
+
};
|
|
5121
|
+
|
|
5122
|
+
return SchemaViolationReason;
|
|
5123
|
+
})();
|
|
5124
|
+
|
|
4913
5125
|
IngestionFailureEvent.CloudStorageFailure = (function() {
|
|
4914
5126
|
|
|
4915
5127
|
/**
|
|
@@ -4921,6 +5133,7 @@
|
|
|
4921
5133
|
* @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration
|
|
4922
5134
|
* @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason
|
|
4923
5135
|
* @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason
|
|
5136
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] CloudStorageFailure schemaViolationReason
|
|
4924
5137
|
*/
|
|
4925
5138
|
|
|
4926
5139
|
/**
|
|
@@ -4978,17 +5191,25 @@
|
|
|
4978
5191
|
*/
|
|
4979
5192
|
CloudStorageFailure.prototype.apiViolationReason = null;
|
|
4980
5193
|
|
|
5194
|
+
/**
|
|
5195
|
+
* CloudStorageFailure schemaViolationReason.
|
|
5196
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason
|
|
5197
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
5198
|
+
* @instance
|
|
5199
|
+
*/
|
|
5200
|
+
CloudStorageFailure.prototype.schemaViolationReason = null;
|
|
5201
|
+
|
|
4981
5202
|
// OneOf field names bound to virtual getters and setters
|
|
4982
5203
|
var $oneOfFields;
|
|
4983
5204
|
|
|
4984
5205
|
/**
|
|
4985
5206
|
* CloudStorageFailure reason.
|
|
4986
|
-
* @member {"avroFailureReason"|"apiViolationReason"|undefined} reason
|
|
5207
|
+
* @member {"avroFailureReason"|"apiViolationReason"|"schemaViolationReason"|undefined} reason
|
|
4987
5208
|
* @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
|
|
4988
5209
|
* @instance
|
|
4989
5210
|
*/
|
|
4990
5211
|
Object.defineProperty(CloudStorageFailure.prototype, "reason", {
|
|
4991
|
-
get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]),
|
|
5212
|
+
get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason", "schemaViolationReason"]),
|
|
4992
5213
|
set: $util.oneOfSetter($oneOfFields)
|
|
4993
5214
|
});
|
|
4994
5215
|
|
|
@@ -5026,6 +5247,8 @@
|
|
|
5026
5247
|
$root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
5027
5248
|
if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
|
|
5028
5249
|
$root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
5250
|
+
if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason"))
|
|
5251
|
+
$root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
5029
5252
|
return writer;
|
|
5030
5253
|
};
|
|
5031
5254
|
|
|
@@ -5082,6 +5305,10 @@
|
|
|
5082
5305
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
|
|
5083
5306
|
break;
|
|
5084
5307
|
}
|
|
5308
|
+
case 7: {
|
|
5309
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32());
|
|
5310
|
+
break;
|
|
5311
|
+
}
|
|
5085
5312
|
default:
|
|
5086
5313
|
reader.skipType(tag & 7);
|
|
5087
5314
|
break;
|
|
@@ -5145,6 +5372,16 @@
|
|
|
5145
5372
|
return "apiViolationReason." + error;
|
|
5146
5373
|
}
|
|
5147
5374
|
}
|
|
5375
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
5376
|
+
if (properties.reason === 1)
|
|
5377
|
+
return "reason: multiple values";
|
|
5378
|
+
properties.reason = 1;
|
|
5379
|
+
{
|
|
5380
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason);
|
|
5381
|
+
if (error)
|
|
5382
|
+
return "schemaViolationReason." + error;
|
|
5383
|
+
}
|
|
5384
|
+
}
|
|
5148
5385
|
return null;
|
|
5149
5386
|
};
|
|
5150
5387
|
|
|
@@ -5183,6 +5420,11 @@
|
|
|
5183
5420
|
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected");
|
|
5184
5421
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
5185
5422
|
}
|
|
5423
|
+
if (object.schemaViolationReason != null) {
|
|
5424
|
+
if (typeof object.schemaViolationReason !== "object")
|
|
5425
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.schemaViolationReason: object expected");
|
|
5426
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason);
|
|
5427
|
+
}
|
|
5186
5428
|
return message;
|
|
5187
5429
|
};
|
|
5188
5430
|
|
|
@@ -5227,6 +5469,11 @@
|
|
|
5227
5469
|
if (options.oneofs)
|
|
5228
5470
|
object.reason = "apiViolationReason";
|
|
5229
5471
|
}
|
|
5472
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
5473
|
+
object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options);
|
|
5474
|
+
if (options.oneofs)
|
|
5475
|
+
object.reason = "schemaViolationReason";
|
|
5476
|
+
}
|
|
5230
5477
|
return object;
|
|
5231
5478
|
};
|
|
5232
5479
|
|
|
@@ -5270,6 +5517,7 @@
|
|
|
5270
5517
|
* @property {number|Long|null} [partitionId] AwsMskFailureReason partitionId
|
|
5271
5518
|
* @property {number|Long|null} [offset] AwsMskFailureReason offset
|
|
5272
5519
|
* @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AwsMskFailureReason apiViolationReason
|
|
5520
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AwsMskFailureReason schemaViolationReason
|
|
5273
5521
|
*/
|
|
5274
5522
|
|
|
5275
5523
|
/**
|
|
@@ -5327,17 +5575,25 @@
|
|
|
5327
5575
|
*/
|
|
5328
5576
|
AwsMskFailureReason.prototype.apiViolationReason = null;
|
|
5329
5577
|
|
|
5578
|
+
/**
|
|
5579
|
+
* AwsMskFailureReason schemaViolationReason.
|
|
5580
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason
|
|
5581
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
|
|
5582
|
+
* @instance
|
|
5583
|
+
*/
|
|
5584
|
+
AwsMskFailureReason.prototype.schemaViolationReason = null;
|
|
5585
|
+
|
|
5330
5586
|
// OneOf field names bound to virtual getters and setters
|
|
5331
5587
|
var $oneOfFields;
|
|
5332
5588
|
|
|
5333
5589
|
/**
|
|
5334
5590
|
* AwsMskFailureReason reason.
|
|
5335
|
-
* @member {"apiViolationReason"|undefined} reason
|
|
5591
|
+
* @member {"apiViolationReason"|"schemaViolationReason"|undefined} reason
|
|
5336
5592
|
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
|
|
5337
5593
|
* @instance
|
|
5338
5594
|
*/
|
|
5339
5595
|
Object.defineProperty(AwsMskFailureReason.prototype, "reason", {
|
|
5340
|
-
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
|
|
5596
|
+
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason"]),
|
|
5341
5597
|
set: $util.oneOfSetter($oneOfFields)
|
|
5342
5598
|
});
|
|
5343
5599
|
|
|
@@ -5375,6 +5631,8 @@
|
|
|
5375
5631
|
writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
|
|
5376
5632
|
if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
|
|
5377
5633
|
$root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
5634
|
+
if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason"))
|
|
5635
|
+
$root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
5378
5636
|
return writer;
|
|
5379
5637
|
};
|
|
5380
5638
|
|
|
@@ -5431,6 +5689,10 @@
|
|
|
5431
5689
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
|
|
5432
5690
|
break;
|
|
5433
5691
|
}
|
|
5692
|
+
case 6: {
|
|
5693
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32());
|
|
5694
|
+
break;
|
|
5695
|
+
}
|
|
5434
5696
|
default:
|
|
5435
5697
|
reader.skipType(tag & 7);
|
|
5436
5698
|
break;
|
|
@@ -5487,6 +5749,16 @@
|
|
|
5487
5749
|
return "apiViolationReason." + error;
|
|
5488
5750
|
}
|
|
5489
5751
|
}
|
|
5752
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
5753
|
+
if (properties.reason === 1)
|
|
5754
|
+
return "reason: multiple values";
|
|
5755
|
+
properties.reason = 1;
|
|
5756
|
+
{
|
|
5757
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason);
|
|
5758
|
+
if (error)
|
|
5759
|
+
return "schemaViolationReason." + error;
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5490
5762
|
return null;
|
|
5491
5763
|
};
|
|
5492
5764
|
|
|
@@ -5529,6 +5801,11 @@
|
|
|
5529
5801
|
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.apiViolationReason: object expected");
|
|
5530
5802
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
5531
5803
|
}
|
|
5804
|
+
if (object.schemaViolationReason != null) {
|
|
5805
|
+
if (typeof object.schemaViolationReason !== "object")
|
|
5806
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.schemaViolationReason: object expected");
|
|
5807
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason);
|
|
5808
|
+
}
|
|
5532
5809
|
return message;
|
|
5533
5810
|
};
|
|
5534
5811
|
|
|
@@ -5578,6 +5855,11 @@
|
|
|
5578
5855
|
if (options.oneofs)
|
|
5579
5856
|
object.reason = "apiViolationReason";
|
|
5580
5857
|
}
|
|
5858
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
5859
|
+
object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options);
|
|
5860
|
+
if (options.oneofs)
|
|
5861
|
+
object.reason = "schemaViolationReason";
|
|
5862
|
+
}
|
|
5581
5863
|
return object;
|
|
5582
5864
|
};
|
|
5583
5865
|
|
|
@@ -5621,6 +5903,7 @@
|
|
|
5621
5903
|
* @property {number|Long|null} [partitionId] AzureEventHubsFailureReason partitionId
|
|
5622
5904
|
* @property {number|Long|null} [offset] AzureEventHubsFailureReason offset
|
|
5623
5905
|
* @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AzureEventHubsFailureReason apiViolationReason
|
|
5906
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AzureEventHubsFailureReason schemaViolationReason
|
|
5624
5907
|
*/
|
|
5625
5908
|
|
|
5626
5909
|
/**
|
|
@@ -5678,17 +5961,25 @@
|
|
|
5678
5961
|
*/
|
|
5679
5962
|
AzureEventHubsFailureReason.prototype.apiViolationReason = null;
|
|
5680
5963
|
|
|
5964
|
+
/**
|
|
5965
|
+
* AzureEventHubsFailureReason schemaViolationReason.
|
|
5966
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason
|
|
5967
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
|
|
5968
|
+
* @instance
|
|
5969
|
+
*/
|
|
5970
|
+
AzureEventHubsFailureReason.prototype.schemaViolationReason = null;
|
|
5971
|
+
|
|
5681
5972
|
// OneOf field names bound to virtual getters and setters
|
|
5682
5973
|
var $oneOfFields;
|
|
5683
5974
|
|
|
5684
5975
|
/**
|
|
5685
5976
|
* AzureEventHubsFailureReason reason.
|
|
5686
|
-
* @member {"apiViolationReason"|undefined} reason
|
|
5977
|
+
* @member {"apiViolationReason"|"schemaViolationReason"|undefined} reason
|
|
5687
5978
|
* @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
|
|
5688
5979
|
* @instance
|
|
5689
5980
|
*/
|
|
5690
5981
|
Object.defineProperty(AzureEventHubsFailureReason.prototype, "reason", {
|
|
5691
|
-
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
|
|
5982
|
+
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason"]),
|
|
5692
5983
|
set: $util.oneOfSetter($oneOfFields)
|
|
5693
5984
|
});
|
|
5694
5985
|
|
|
@@ -5726,6 +6017,8 @@
|
|
|
5726
6017
|
writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
|
|
5727
6018
|
if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
|
|
5728
6019
|
$root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
6020
|
+
if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason"))
|
|
6021
|
+
$root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
5729
6022
|
return writer;
|
|
5730
6023
|
};
|
|
5731
6024
|
|
|
@@ -5782,6 +6075,10 @@
|
|
|
5782
6075
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
|
|
5783
6076
|
break;
|
|
5784
6077
|
}
|
|
6078
|
+
case 6: {
|
|
6079
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32());
|
|
6080
|
+
break;
|
|
6081
|
+
}
|
|
5785
6082
|
default:
|
|
5786
6083
|
reader.skipType(tag & 7);
|
|
5787
6084
|
break;
|
|
@@ -5838,6 +6135,16 @@
|
|
|
5838
6135
|
return "apiViolationReason." + error;
|
|
5839
6136
|
}
|
|
5840
6137
|
}
|
|
6138
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6139
|
+
if (properties.reason === 1)
|
|
6140
|
+
return "reason: multiple values";
|
|
6141
|
+
properties.reason = 1;
|
|
6142
|
+
{
|
|
6143
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason);
|
|
6144
|
+
if (error)
|
|
6145
|
+
return "schemaViolationReason." + error;
|
|
6146
|
+
}
|
|
6147
|
+
}
|
|
5841
6148
|
return null;
|
|
5842
6149
|
};
|
|
5843
6150
|
|
|
@@ -5880,6 +6187,11 @@
|
|
|
5880
6187
|
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.apiViolationReason: object expected");
|
|
5881
6188
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
5882
6189
|
}
|
|
6190
|
+
if (object.schemaViolationReason != null) {
|
|
6191
|
+
if (typeof object.schemaViolationReason !== "object")
|
|
6192
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.schemaViolationReason: object expected");
|
|
6193
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason);
|
|
6194
|
+
}
|
|
5883
6195
|
return message;
|
|
5884
6196
|
};
|
|
5885
6197
|
|
|
@@ -5929,6 +6241,11 @@
|
|
|
5929
6241
|
if (options.oneofs)
|
|
5930
6242
|
object.reason = "apiViolationReason";
|
|
5931
6243
|
}
|
|
6244
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6245
|
+
object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options);
|
|
6246
|
+
if (options.oneofs)
|
|
6247
|
+
object.reason = "schemaViolationReason";
|
|
6248
|
+
}
|
|
5932
6249
|
return object;
|
|
5933
6250
|
};
|
|
5934
6251
|
|
|
@@ -5972,6 +6289,7 @@
|
|
|
5972
6289
|
* @property {number|Long|null} [partitionId] ConfluentCloudFailureReason partitionId
|
|
5973
6290
|
* @property {number|Long|null} [offset] ConfluentCloudFailureReason offset
|
|
5974
6291
|
* @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] ConfluentCloudFailureReason apiViolationReason
|
|
6292
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] ConfluentCloudFailureReason schemaViolationReason
|
|
5975
6293
|
*/
|
|
5976
6294
|
|
|
5977
6295
|
/**
|
|
@@ -6029,17 +6347,25 @@
|
|
|
6029
6347
|
*/
|
|
6030
6348
|
ConfluentCloudFailureReason.prototype.apiViolationReason = null;
|
|
6031
6349
|
|
|
6350
|
+
/**
|
|
6351
|
+
* ConfluentCloudFailureReason schemaViolationReason.
|
|
6352
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason
|
|
6353
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6354
|
+
* @instance
|
|
6355
|
+
*/
|
|
6356
|
+
ConfluentCloudFailureReason.prototype.schemaViolationReason = null;
|
|
6357
|
+
|
|
6032
6358
|
// OneOf field names bound to virtual getters and setters
|
|
6033
6359
|
var $oneOfFields;
|
|
6034
6360
|
|
|
6035
6361
|
/**
|
|
6036
6362
|
* ConfluentCloudFailureReason reason.
|
|
6037
|
-
* @member {"apiViolationReason"|undefined} reason
|
|
6363
|
+
* @member {"apiViolationReason"|"schemaViolationReason"|undefined} reason
|
|
6038
6364
|
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6039
6365
|
* @instance
|
|
6040
6366
|
*/
|
|
6041
6367
|
Object.defineProperty(ConfluentCloudFailureReason.prototype, "reason", {
|
|
6042
|
-
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
|
|
6368
|
+
get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason"]),
|
|
6043
6369
|
set: $util.oneOfSetter($oneOfFields)
|
|
6044
6370
|
});
|
|
6045
6371
|
|
|
@@ -6077,6 +6403,8 @@
|
|
|
6077
6403
|
writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
|
|
6078
6404
|
if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
|
|
6079
6405
|
$root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
6406
|
+
if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason"))
|
|
6407
|
+
$root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
6080
6408
|
return writer;
|
|
6081
6409
|
};
|
|
6082
6410
|
|
|
@@ -6133,6 +6461,10 @@
|
|
|
6133
6461
|
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
|
|
6134
6462
|
break;
|
|
6135
6463
|
}
|
|
6464
|
+
case 6: {
|
|
6465
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32());
|
|
6466
|
+
break;
|
|
6467
|
+
}
|
|
6136
6468
|
default:
|
|
6137
6469
|
reader.skipType(tag & 7);
|
|
6138
6470
|
break;
|
|
@@ -6189,130 +6521,956 @@
|
|
|
6189
6521
|
return "apiViolationReason." + error;
|
|
6190
6522
|
}
|
|
6191
6523
|
}
|
|
6192
|
-
|
|
6193
|
-
|
|
6524
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6525
|
+
if (properties.reason === 1)
|
|
6526
|
+
return "reason: multiple values";
|
|
6527
|
+
properties.reason = 1;
|
|
6528
|
+
{
|
|
6529
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason);
|
|
6530
|
+
if (error)
|
|
6531
|
+
return "schemaViolationReason." + error;
|
|
6532
|
+
}
|
|
6533
|
+
}
|
|
6534
|
+
return null;
|
|
6535
|
+
};
|
|
6536
|
+
|
|
6537
|
+
/**
|
|
6538
|
+
* Creates a ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types.
|
|
6539
|
+
* @function fromObject
|
|
6540
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6541
|
+
* @static
|
|
6542
|
+
* @param {Object.<string,*>} object Plain object
|
|
6543
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason
|
|
6544
|
+
*/
|
|
6545
|
+
ConfluentCloudFailureReason.fromObject = function fromObject(object) {
|
|
6546
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason)
|
|
6547
|
+
return object;
|
|
6548
|
+
var message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason();
|
|
6549
|
+
if (object.clusterId != null)
|
|
6550
|
+
message.clusterId = String(object.clusterId);
|
|
6551
|
+
if (object.kafkaTopic != null)
|
|
6552
|
+
message.kafkaTopic = String(object.kafkaTopic);
|
|
6553
|
+
if (object.partitionId != null)
|
|
6554
|
+
if ($util.Long)
|
|
6555
|
+
(message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false;
|
|
6556
|
+
else if (typeof object.partitionId === "string")
|
|
6557
|
+
message.partitionId = parseInt(object.partitionId, 10);
|
|
6558
|
+
else if (typeof object.partitionId === "number")
|
|
6559
|
+
message.partitionId = object.partitionId;
|
|
6560
|
+
else if (typeof object.partitionId === "object")
|
|
6561
|
+
message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber();
|
|
6562
|
+
if (object.offset != null)
|
|
6563
|
+
if ($util.Long)
|
|
6564
|
+
(message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
|
|
6565
|
+
else if (typeof object.offset === "string")
|
|
6566
|
+
message.offset = parseInt(object.offset, 10);
|
|
6567
|
+
else if (typeof object.offset === "number")
|
|
6568
|
+
message.offset = object.offset;
|
|
6569
|
+
else if (typeof object.offset === "object")
|
|
6570
|
+
message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
|
|
6571
|
+
if (object.apiViolationReason != null) {
|
|
6572
|
+
if (typeof object.apiViolationReason !== "object")
|
|
6573
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.apiViolationReason: object expected");
|
|
6574
|
+
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
6575
|
+
}
|
|
6576
|
+
if (object.schemaViolationReason != null) {
|
|
6577
|
+
if (typeof object.schemaViolationReason !== "object")
|
|
6578
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.schemaViolationReason: object expected");
|
|
6579
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason);
|
|
6580
|
+
}
|
|
6581
|
+
return message;
|
|
6582
|
+
};
|
|
6583
|
+
|
|
6584
|
+
/**
|
|
6585
|
+
* Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified.
|
|
6586
|
+
* @function toObject
|
|
6587
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6588
|
+
* @static
|
|
6589
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} message ConfluentCloudFailureReason
|
|
6590
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
6591
|
+
* @returns {Object.<string,*>} Plain object
|
|
6592
|
+
*/
|
|
6593
|
+
ConfluentCloudFailureReason.toObject = function toObject(message, options) {
|
|
6594
|
+
if (!options)
|
|
6595
|
+
options = {};
|
|
6596
|
+
var object = {};
|
|
6597
|
+
if (options.defaults) {
|
|
6598
|
+
object.clusterId = "";
|
|
6599
|
+
object.kafkaTopic = "";
|
|
6600
|
+
if ($util.Long) {
|
|
6601
|
+
var long = new $util.Long(0, 0, false);
|
|
6602
|
+
object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
6603
|
+
} else
|
|
6604
|
+
object.partitionId = options.longs === String ? "0" : 0;
|
|
6605
|
+
if ($util.Long) {
|
|
6606
|
+
var long = new $util.Long(0, 0, false);
|
|
6607
|
+
object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
6608
|
+
} else
|
|
6609
|
+
object.offset = options.longs === String ? "0" : 0;
|
|
6610
|
+
}
|
|
6611
|
+
if (message.clusterId != null && message.hasOwnProperty("clusterId"))
|
|
6612
|
+
object.clusterId = message.clusterId;
|
|
6613
|
+
if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
|
|
6614
|
+
object.kafkaTopic = message.kafkaTopic;
|
|
6615
|
+
if (message.partitionId != null && message.hasOwnProperty("partitionId"))
|
|
6616
|
+
if (typeof message.partitionId === "number")
|
|
6617
|
+
object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId;
|
|
6618
|
+
else
|
|
6619
|
+
object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId;
|
|
6620
|
+
if (message.offset != null && message.hasOwnProperty("offset"))
|
|
6621
|
+
if (typeof message.offset === "number")
|
|
6622
|
+
object.offset = options.longs === String ? String(message.offset) : message.offset;
|
|
6623
|
+
else
|
|
6624
|
+
object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset;
|
|
6625
|
+
if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
|
|
6626
|
+
object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
|
|
6627
|
+
if (options.oneofs)
|
|
6628
|
+
object.reason = "apiViolationReason";
|
|
6629
|
+
}
|
|
6630
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6631
|
+
object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options);
|
|
6632
|
+
if (options.oneofs)
|
|
6633
|
+
object.reason = "schemaViolationReason";
|
|
6634
|
+
}
|
|
6635
|
+
return object;
|
|
6636
|
+
};
|
|
6637
|
+
|
|
6638
|
+
/**
|
|
6639
|
+
* Converts this ConfluentCloudFailureReason to JSON.
|
|
6640
|
+
* @function toJSON
|
|
6641
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6642
|
+
* @instance
|
|
6643
|
+
* @returns {Object.<string,*>} JSON object
|
|
6644
|
+
*/
|
|
6645
|
+
ConfluentCloudFailureReason.prototype.toJSON = function toJSON() {
|
|
6646
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6647
|
+
};
|
|
6648
|
+
|
|
6649
|
+
/**
|
|
6650
|
+
* Gets the default type url for ConfluentCloudFailureReason
|
|
6651
|
+
* @function getTypeUrl
|
|
6652
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
|
|
6653
|
+
* @static
|
|
6654
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6655
|
+
* @returns {string} The default type url
|
|
6656
|
+
*/
|
|
6657
|
+
ConfluentCloudFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6658
|
+
if (typeUrlPrefix === undefined) {
|
|
6659
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6660
|
+
}
|
|
6661
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason";
|
|
6662
|
+
};
|
|
6663
|
+
|
|
6664
|
+
return ConfluentCloudFailureReason;
|
|
6665
|
+
})();
|
|
6666
|
+
|
|
6667
|
+
IngestionFailureEvent.AwsKinesisFailureReason = (function() {
|
|
6668
|
+
|
|
6669
|
+
/**
|
|
6670
|
+
* Properties of an AwsKinesisFailureReason.
|
|
6671
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
6672
|
+
* @interface IAwsKinesisFailureReason
|
|
6673
|
+
* @property {string|null} [streamArn] AwsKinesisFailureReason streamArn
|
|
6674
|
+
* @property {string|null} [partitionKey] AwsKinesisFailureReason partitionKey
|
|
6675
|
+
* @property {string|null} [sequenceNumber] AwsKinesisFailureReason sequenceNumber
|
|
6676
|
+
* @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AwsKinesisFailureReason schemaViolationReason
|
|
6677
|
+
*/
|
|
6678
|
+
|
|
6679
|
+
/**
|
|
6680
|
+
* Constructs a new AwsKinesisFailureReason.
|
|
6681
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent
|
|
6682
|
+
* @classdesc Represents an AwsKinesisFailureReason.
|
|
6683
|
+
* @implements IAwsKinesisFailureReason
|
|
6684
|
+
* @constructor
|
|
6685
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason=} [properties] Properties to set
|
|
6686
|
+
*/
|
|
6687
|
+
function AwsKinesisFailureReason(properties) {
|
|
6688
|
+
if (properties)
|
|
6689
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6690
|
+
if (properties[keys[i]] != null)
|
|
6691
|
+
this[keys[i]] = properties[keys[i]];
|
|
6692
|
+
}
|
|
6693
|
+
|
|
6694
|
+
/**
|
|
6695
|
+
* AwsKinesisFailureReason streamArn.
|
|
6696
|
+
* @member {string} streamArn
|
|
6697
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6698
|
+
* @instance
|
|
6699
|
+
*/
|
|
6700
|
+
AwsKinesisFailureReason.prototype.streamArn = "";
|
|
6701
|
+
|
|
6702
|
+
/**
|
|
6703
|
+
* AwsKinesisFailureReason partitionKey.
|
|
6704
|
+
* @member {string} partitionKey
|
|
6705
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6706
|
+
* @instance
|
|
6707
|
+
*/
|
|
6708
|
+
AwsKinesisFailureReason.prototype.partitionKey = "";
|
|
6709
|
+
|
|
6710
|
+
/**
|
|
6711
|
+
* AwsKinesisFailureReason sequenceNumber.
|
|
6712
|
+
* @member {string} sequenceNumber
|
|
6713
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6714
|
+
* @instance
|
|
6715
|
+
*/
|
|
6716
|
+
AwsKinesisFailureReason.prototype.sequenceNumber = "";
|
|
6717
|
+
|
|
6718
|
+
/**
|
|
6719
|
+
* AwsKinesisFailureReason schemaViolationReason.
|
|
6720
|
+
* @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason
|
|
6721
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6722
|
+
* @instance
|
|
6723
|
+
*/
|
|
6724
|
+
AwsKinesisFailureReason.prototype.schemaViolationReason = null;
|
|
6725
|
+
|
|
6726
|
+
// OneOf field names bound to virtual getters and setters
|
|
6727
|
+
var $oneOfFields;
|
|
6728
|
+
|
|
6729
|
+
/**
|
|
6730
|
+
* AwsKinesisFailureReason reason.
|
|
6731
|
+
* @member {"schemaViolationReason"|undefined} reason
|
|
6732
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6733
|
+
* @instance
|
|
6734
|
+
*/
|
|
6735
|
+
Object.defineProperty(AwsKinesisFailureReason.prototype, "reason", {
|
|
6736
|
+
get: $util.oneOfGetter($oneOfFields = ["schemaViolationReason"]),
|
|
6737
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
6738
|
+
});
|
|
6739
|
+
|
|
6740
|
+
/**
|
|
6741
|
+
* Creates a new AwsKinesisFailureReason instance using the specified properties.
|
|
6742
|
+
* @function create
|
|
6743
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6744
|
+
* @static
|
|
6745
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason=} [properties] Properties to set
|
|
6746
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason instance
|
|
6747
|
+
*/
|
|
6748
|
+
AwsKinesisFailureReason.create = function create(properties) {
|
|
6749
|
+
return new AwsKinesisFailureReason(properties);
|
|
6750
|
+
};
|
|
6751
|
+
|
|
6752
|
+
/**
|
|
6753
|
+
* Encodes the specified AwsKinesisFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages.
|
|
6754
|
+
* @function encode
|
|
6755
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6756
|
+
* @static
|
|
6757
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason} message AwsKinesisFailureReason message or plain object to encode
|
|
6758
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6759
|
+
* @returns {$protobuf.Writer} Writer
|
|
6760
|
+
*/
|
|
6761
|
+
AwsKinesisFailureReason.encode = function encode(message, writer) {
|
|
6762
|
+
if (!writer)
|
|
6763
|
+
writer = $Writer.create();
|
|
6764
|
+
if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn"))
|
|
6765
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.streamArn);
|
|
6766
|
+
if (message.partitionKey != null && Object.hasOwnProperty.call(message, "partitionKey"))
|
|
6767
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.partitionKey);
|
|
6768
|
+
if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber"))
|
|
6769
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.sequenceNumber);
|
|
6770
|
+
if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason"))
|
|
6771
|
+
$root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
6772
|
+
return writer;
|
|
6773
|
+
};
|
|
6774
|
+
|
|
6775
|
+
/**
|
|
6776
|
+
* Encodes the specified AwsKinesisFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages.
|
|
6777
|
+
* @function encodeDelimited
|
|
6778
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6779
|
+
* @static
|
|
6780
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason} message AwsKinesisFailureReason message or plain object to encode
|
|
6781
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6782
|
+
* @returns {$protobuf.Writer} Writer
|
|
6783
|
+
*/
|
|
6784
|
+
AwsKinesisFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6785
|
+
return this.encode(message, writer).ldelim();
|
|
6786
|
+
};
|
|
6787
|
+
|
|
6788
|
+
/**
|
|
6789
|
+
* Decodes an AwsKinesisFailureReason message from the specified reader or buffer.
|
|
6790
|
+
* @function decode
|
|
6791
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6792
|
+
* @static
|
|
6793
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6794
|
+
* @param {number} [length] Message length if known beforehand
|
|
6795
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason
|
|
6796
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6797
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6798
|
+
*/
|
|
6799
|
+
AwsKinesisFailureReason.decode = function decode(reader, length, error) {
|
|
6800
|
+
if (!(reader instanceof $Reader))
|
|
6801
|
+
reader = $Reader.create(reader);
|
|
6802
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason();
|
|
6803
|
+
while (reader.pos < end) {
|
|
6804
|
+
var tag = reader.uint32();
|
|
6805
|
+
if (tag === error)
|
|
6806
|
+
break;
|
|
6807
|
+
switch (tag >>> 3) {
|
|
6808
|
+
case 1: {
|
|
6809
|
+
message.streamArn = reader.string();
|
|
6810
|
+
break;
|
|
6811
|
+
}
|
|
6812
|
+
case 2: {
|
|
6813
|
+
message.partitionKey = reader.string();
|
|
6814
|
+
break;
|
|
6815
|
+
}
|
|
6816
|
+
case 3: {
|
|
6817
|
+
message.sequenceNumber = reader.string();
|
|
6818
|
+
break;
|
|
6819
|
+
}
|
|
6820
|
+
case 4: {
|
|
6821
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32());
|
|
6822
|
+
break;
|
|
6823
|
+
}
|
|
6824
|
+
default:
|
|
6825
|
+
reader.skipType(tag & 7);
|
|
6826
|
+
break;
|
|
6827
|
+
}
|
|
6828
|
+
}
|
|
6829
|
+
return message;
|
|
6830
|
+
};
|
|
6831
|
+
|
|
6832
|
+
/**
|
|
6833
|
+
* Decodes an AwsKinesisFailureReason message from the specified reader or buffer, length delimited.
|
|
6834
|
+
* @function decodeDelimited
|
|
6835
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6836
|
+
* @static
|
|
6837
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6838
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason
|
|
6839
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6840
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6841
|
+
*/
|
|
6842
|
+
AwsKinesisFailureReason.decodeDelimited = function decodeDelimited(reader) {
|
|
6843
|
+
if (!(reader instanceof $Reader))
|
|
6844
|
+
reader = new $Reader(reader);
|
|
6845
|
+
return this.decode(reader, reader.uint32());
|
|
6846
|
+
};
|
|
6847
|
+
|
|
6848
|
+
/**
|
|
6849
|
+
* Verifies an AwsKinesisFailureReason message.
|
|
6850
|
+
* @function verify
|
|
6851
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6852
|
+
* @static
|
|
6853
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
6854
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
6855
|
+
*/
|
|
6856
|
+
AwsKinesisFailureReason.verify = function verify(message) {
|
|
6857
|
+
if (typeof message !== "object" || message === null)
|
|
6858
|
+
return "object expected";
|
|
6859
|
+
var properties = {};
|
|
6860
|
+
if (message.streamArn != null && message.hasOwnProperty("streamArn"))
|
|
6861
|
+
if (!$util.isString(message.streamArn))
|
|
6862
|
+
return "streamArn: string expected";
|
|
6863
|
+
if (message.partitionKey != null && message.hasOwnProperty("partitionKey"))
|
|
6864
|
+
if (!$util.isString(message.partitionKey))
|
|
6865
|
+
return "partitionKey: string expected";
|
|
6866
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
|
6867
|
+
if (!$util.isString(message.sequenceNumber))
|
|
6868
|
+
return "sequenceNumber: string expected";
|
|
6869
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6870
|
+
properties.reason = 1;
|
|
6871
|
+
{
|
|
6872
|
+
var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason);
|
|
6873
|
+
if (error)
|
|
6874
|
+
return "schemaViolationReason." + error;
|
|
6875
|
+
}
|
|
6876
|
+
}
|
|
6877
|
+
return null;
|
|
6878
|
+
};
|
|
6879
|
+
|
|
6880
|
+
/**
|
|
6881
|
+
* Creates an AwsKinesisFailureReason message from a plain object. Also converts values to their respective internal types.
|
|
6882
|
+
* @function fromObject
|
|
6883
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6884
|
+
* @static
|
|
6885
|
+
* @param {Object.<string,*>} object Plain object
|
|
6886
|
+
* @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason
|
|
6887
|
+
*/
|
|
6888
|
+
AwsKinesisFailureReason.fromObject = function fromObject(object) {
|
|
6889
|
+
if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason)
|
|
6890
|
+
return object;
|
|
6891
|
+
var message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason();
|
|
6892
|
+
if (object.streamArn != null)
|
|
6893
|
+
message.streamArn = String(object.streamArn);
|
|
6894
|
+
if (object.partitionKey != null)
|
|
6895
|
+
message.partitionKey = String(object.partitionKey);
|
|
6896
|
+
if (object.sequenceNumber != null)
|
|
6897
|
+
message.sequenceNumber = String(object.sequenceNumber);
|
|
6898
|
+
if (object.schemaViolationReason != null) {
|
|
6899
|
+
if (typeof object.schemaViolationReason !== "object")
|
|
6900
|
+
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.schemaViolationReason: object expected");
|
|
6901
|
+
message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason);
|
|
6902
|
+
}
|
|
6903
|
+
return message;
|
|
6904
|
+
};
|
|
6905
|
+
|
|
6906
|
+
/**
|
|
6907
|
+
* Creates a plain object from an AwsKinesisFailureReason message. Also converts values to other types if specified.
|
|
6908
|
+
* @function toObject
|
|
6909
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6910
|
+
* @static
|
|
6911
|
+
* @param {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} message AwsKinesisFailureReason
|
|
6912
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
6913
|
+
* @returns {Object.<string,*>} Plain object
|
|
6914
|
+
*/
|
|
6915
|
+
AwsKinesisFailureReason.toObject = function toObject(message, options) {
|
|
6916
|
+
if (!options)
|
|
6917
|
+
options = {};
|
|
6918
|
+
var object = {};
|
|
6919
|
+
if (options.defaults) {
|
|
6920
|
+
object.streamArn = "";
|
|
6921
|
+
object.partitionKey = "";
|
|
6922
|
+
object.sequenceNumber = "";
|
|
6923
|
+
}
|
|
6924
|
+
if (message.streamArn != null && message.hasOwnProperty("streamArn"))
|
|
6925
|
+
object.streamArn = message.streamArn;
|
|
6926
|
+
if (message.partitionKey != null && message.hasOwnProperty("partitionKey"))
|
|
6927
|
+
object.partitionKey = message.partitionKey;
|
|
6928
|
+
if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber"))
|
|
6929
|
+
object.sequenceNumber = message.sequenceNumber;
|
|
6930
|
+
if (message.schemaViolationReason != null && message.hasOwnProperty("schemaViolationReason")) {
|
|
6931
|
+
object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options);
|
|
6932
|
+
if (options.oneofs)
|
|
6933
|
+
object.reason = "schemaViolationReason";
|
|
6934
|
+
}
|
|
6935
|
+
return object;
|
|
6936
|
+
};
|
|
6937
|
+
|
|
6938
|
+
/**
|
|
6939
|
+
* Converts this AwsKinesisFailureReason to JSON.
|
|
6940
|
+
* @function toJSON
|
|
6941
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6942
|
+
* @instance
|
|
6943
|
+
* @returns {Object.<string,*>} JSON object
|
|
6944
|
+
*/
|
|
6945
|
+
AwsKinesisFailureReason.prototype.toJSON = function toJSON() {
|
|
6946
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6947
|
+
};
|
|
6948
|
+
|
|
6949
|
+
/**
|
|
6950
|
+
* Gets the default type url for AwsKinesisFailureReason
|
|
6951
|
+
* @function getTypeUrl
|
|
6952
|
+
* @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason
|
|
6953
|
+
* @static
|
|
6954
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6955
|
+
* @returns {string} The default type url
|
|
6956
|
+
*/
|
|
6957
|
+
AwsKinesisFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6958
|
+
if (typeUrlPrefix === undefined) {
|
|
6959
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6960
|
+
}
|
|
6961
|
+
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason";
|
|
6962
|
+
};
|
|
6963
|
+
|
|
6964
|
+
return AwsKinesisFailureReason;
|
|
6965
|
+
})();
|
|
6966
|
+
|
|
6967
|
+
return IngestionFailureEvent;
|
|
6968
|
+
})();
|
|
6969
|
+
|
|
6970
|
+
v1.JavaScriptUDF = (function() {
|
|
6971
|
+
|
|
6972
|
+
/**
|
|
6973
|
+
* Properties of a JavaScriptUDF.
|
|
6974
|
+
* @memberof google.pubsub.v1
|
|
6975
|
+
* @interface IJavaScriptUDF
|
|
6976
|
+
* @property {string|null} [functionName] JavaScriptUDF functionName
|
|
6977
|
+
* @property {string|null} [code] JavaScriptUDF code
|
|
6978
|
+
*/
|
|
6979
|
+
|
|
6980
|
+
/**
|
|
6981
|
+
* Constructs a new JavaScriptUDF.
|
|
6982
|
+
* @memberof google.pubsub.v1
|
|
6983
|
+
* @classdesc Represents a JavaScriptUDF.
|
|
6984
|
+
* @implements IJavaScriptUDF
|
|
6985
|
+
* @constructor
|
|
6986
|
+
* @param {google.pubsub.v1.IJavaScriptUDF=} [properties] Properties to set
|
|
6987
|
+
*/
|
|
6988
|
+
function JavaScriptUDF(properties) {
|
|
6989
|
+
if (properties)
|
|
6990
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6991
|
+
if (properties[keys[i]] != null)
|
|
6992
|
+
this[keys[i]] = properties[keys[i]];
|
|
6993
|
+
}
|
|
6994
|
+
|
|
6995
|
+
/**
|
|
6996
|
+
* JavaScriptUDF functionName.
|
|
6997
|
+
* @member {string} functionName
|
|
6998
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
6999
|
+
* @instance
|
|
7000
|
+
*/
|
|
7001
|
+
JavaScriptUDF.prototype.functionName = "";
|
|
7002
|
+
|
|
7003
|
+
/**
|
|
7004
|
+
* JavaScriptUDF code.
|
|
7005
|
+
* @member {string} code
|
|
7006
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7007
|
+
* @instance
|
|
7008
|
+
*/
|
|
7009
|
+
JavaScriptUDF.prototype.code = "";
|
|
7010
|
+
|
|
7011
|
+
/**
|
|
7012
|
+
* Creates a new JavaScriptUDF instance using the specified properties.
|
|
7013
|
+
* @function create
|
|
7014
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7015
|
+
* @static
|
|
7016
|
+
* @param {google.pubsub.v1.IJavaScriptUDF=} [properties] Properties to set
|
|
7017
|
+
* @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF instance
|
|
7018
|
+
*/
|
|
7019
|
+
JavaScriptUDF.create = function create(properties) {
|
|
7020
|
+
return new JavaScriptUDF(properties);
|
|
7021
|
+
};
|
|
7022
|
+
|
|
7023
|
+
/**
|
|
7024
|
+
* Encodes the specified JavaScriptUDF message. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages.
|
|
7025
|
+
* @function encode
|
|
7026
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7027
|
+
* @static
|
|
7028
|
+
* @param {google.pubsub.v1.IJavaScriptUDF} message JavaScriptUDF message or plain object to encode
|
|
7029
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7030
|
+
* @returns {$protobuf.Writer} Writer
|
|
7031
|
+
*/
|
|
7032
|
+
JavaScriptUDF.encode = function encode(message, writer) {
|
|
7033
|
+
if (!writer)
|
|
7034
|
+
writer = $Writer.create();
|
|
7035
|
+
if (message.functionName != null && Object.hasOwnProperty.call(message, "functionName"))
|
|
7036
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.functionName);
|
|
7037
|
+
if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
|
7038
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.code);
|
|
7039
|
+
return writer;
|
|
7040
|
+
};
|
|
7041
|
+
|
|
7042
|
+
/**
|
|
7043
|
+
* Encodes the specified JavaScriptUDF message, length delimited. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages.
|
|
7044
|
+
* @function encodeDelimited
|
|
7045
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7046
|
+
* @static
|
|
7047
|
+
* @param {google.pubsub.v1.IJavaScriptUDF} message JavaScriptUDF message or plain object to encode
|
|
7048
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7049
|
+
* @returns {$protobuf.Writer} Writer
|
|
7050
|
+
*/
|
|
7051
|
+
JavaScriptUDF.encodeDelimited = function encodeDelimited(message, writer) {
|
|
7052
|
+
return this.encode(message, writer).ldelim();
|
|
7053
|
+
};
|
|
7054
|
+
|
|
7055
|
+
/**
|
|
7056
|
+
* Decodes a JavaScriptUDF message from the specified reader or buffer.
|
|
7057
|
+
* @function decode
|
|
7058
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7059
|
+
* @static
|
|
7060
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7061
|
+
* @param {number} [length] Message length if known beforehand
|
|
7062
|
+
* @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF
|
|
7063
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7064
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7065
|
+
*/
|
|
7066
|
+
JavaScriptUDF.decode = function decode(reader, length, error) {
|
|
7067
|
+
if (!(reader instanceof $Reader))
|
|
7068
|
+
reader = $Reader.create(reader);
|
|
7069
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.JavaScriptUDF();
|
|
7070
|
+
while (reader.pos < end) {
|
|
7071
|
+
var tag = reader.uint32();
|
|
7072
|
+
if (tag === error)
|
|
7073
|
+
break;
|
|
7074
|
+
switch (tag >>> 3) {
|
|
7075
|
+
case 1: {
|
|
7076
|
+
message.functionName = reader.string();
|
|
7077
|
+
break;
|
|
7078
|
+
}
|
|
7079
|
+
case 2: {
|
|
7080
|
+
message.code = reader.string();
|
|
7081
|
+
break;
|
|
7082
|
+
}
|
|
7083
|
+
default:
|
|
7084
|
+
reader.skipType(tag & 7);
|
|
7085
|
+
break;
|
|
7086
|
+
}
|
|
7087
|
+
}
|
|
7088
|
+
return message;
|
|
7089
|
+
};
|
|
7090
|
+
|
|
7091
|
+
/**
|
|
7092
|
+
* Decodes a JavaScriptUDF message from the specified reader or buffer, length delimited.
|
|
7093
|
+
* @function decodeDelimited
|
|
7094
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7095
|
+
* @static
|
|
7096
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7097
|
+
* @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF
|
|
7098
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7099
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7100
|
+
*/
|
|
7101
|
+
JavaScriptUDF.decodeDelimited = function decodeDelimited(reader) {
|
|
7102
|
+
if (!(reader instanceof $Reader))
|
|
7103
|
+
reader = new $Reader(reader);
|
|
7104
|
+
return this.decode(reader, reader.uint32());
|
|
7105
|
+
};
|
|
7106
|
+
|
|
7107
|
+
/**
|
|
7108
|
+
* Verifies a JavaScriptUDF message.
|
|
7109
|
+
* @function verify
|
|
7110
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7111
|
+
* @static
|
|
7112
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
7113
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
7114
|
+
*/
|
|
7115
|
+
JavaScriptUDF.verify = function verify(message) {
|
|
7116
|
+
if (typeof message !== "object" || message === null)
|
|
7117
|
+
return "object expected";
|
|
7118
|
+
if (message.functionName != null && message.hasOwnProperty("functionName"))
|
|
7119
|
+
if (!$util.isString(message.functionName))
|
|
7120
|
+
return "functionName: string expected";
|
|
7121
|
+
if (message.code != null && message.hasOwnProperty("code"))
|
|
7122
|
+
if (!$util.isString(message.code))
|
|
7123
|
+
return "code: string expected";
|
|
7124
|
+
return null;
|
|
7125
|
+
};
|
|
7126
|
+
|
|
7127
|
+
/**
|
|
7128
|
+
* Creates a JavaScriptUDF message from a plain object. Also converts values to their respective internal types.
|
|
7129
|
+
* @function fromObject
|
|
7130
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7131
|
+
* @static
|
|
7132
|
+
* @param {Object.<string,*>} object Plain object
|
|
7133
|
+
* @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF
|
|
7134
|
+
*/
|
|
7135
|
+
JavaScriptUDF.fromObject = function fromObject(object) {
|
|
7136
|
+
if (object instanceof $root.google.pubsub.v1.JavaScriptUDF)
|
|
7137
|
+
return object;
|
|
7138
|
+
var message = new $root.google.pubsub.v1.JavaScriptUDF();
|
|
7139
|
+
if (object.functionName != null)
|
|
7140
|
+
message.functionName = String(object.functionName);
|
|
7141
|
+
if (object.code != null)
|
|
7142
|
+
message.code = String(object.code);
|
|
7143
|
+
return message;
|
|
7144
|
+
};
|
|
7145
|
+
|
|
7146
|
+
/**
|
|
7147
|
+
* Creates a plain object from a JavaScriptUDF message. Also converts values to other types if specified.
|
|
7148
|
+
* @function toObject
|
|
7149
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7150
|
+
* @static
|
|
7151
|
+
* @param {google.pubsub.v1.JavaScriptUDF} message JavaScriptUDF
|
|
7152
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
7153
|
+
* @returns {Object.<string,*>} Plain object
|
|
7154
|
+
*/
|
|
7155
|
+
JavaScriptUDF.toObject = function toObject(message, options) {
|
|
7156
|
+
if (!options)
|
|
7157
|
+
options = {};
|
|
7158
|
+
var object = {};
|
|
7159
|
+
if (options.defaults) {
|
|
7160
|
+
object.functionName = "";
|
|
7161
|
+
object.code = "";
|
|
7162
|
+
}
|
|
7163
|
+
if (message.functionName != null && message.hasOwnProperty("functionName"))
|
|
7164
|
+
object.functionName = message.functionName;
|
|
7165
|
+
if (message.code != null && message.hasOwnProperty("code"))
|
|
7166
|
+
object.code = message.code;
|
|
7167
|
+
return object;
|
|
7168
|
+
};
|
|
7169
|
+
|
|
7170
|
+
/**
|
|
7171
|
+
* Converts this JavaScriptUDF to JSON.
|
|
7172
|
+
* @function toJSON
|
|
7173
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7174
|
+
* @instance
|
|
7175
|
+
* @returns {Object.<string,*>} JSON object
|
|
7176
|
+
*/
|
|
7177
|
+
JavaScriptUDF.prototype.toJSON = function toJSON() {
|
|
7178
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
7179
|
+
};
|
|
7180
|
+
|
|
7181
|
+
/**
|
|
7182
|
+
* Gets the default type url for JavaScriptUDF
|
|
7183
|
+
* @function getTypeUrl
|
|
7184
|
+
* @memberof google.pubsub.v1.JavaScriptUDF
|
|
7185
|
+
* @static
|
|
7186
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
7187
|
+
* @returns {string} The default type url
|
|
7188
|
+
*/
|
|
7189
|
+
JavaScriptUDF.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
7190
|
+
if (typeUrlPrefix === undefined) {
|
|
7191
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
7192
|
+
}
|
|
7193
|
+
return typeUrlPrefix + "/google.pubsub.v1.JavaScriptUDF";
|
|
7194
|
+
};
|
|
7195
|
+
|
|
7196
|
+
return JavaScriptUDF;
|
|
7197
|
+
})();
|
|
7198
|
+
|
|
7199
|
+
v1.MessageTransform = (function() {
|
|
7200
|
+
|
|
7201
|
+
/**
|
|
7202
|
+
* Properties of a MessageTransform.
|
|
7203
|
+
* @memberof google.pubsub.v1
|
|
7204
|
+
* @interface IMessageTransform
|
|
7205
|
+
* @property {google.pubsub.v1.IJavaScriptUDF|null} [javascriptUdf] MessageTransform javascriptUdf
|
|
7206
|
+
* @property {boolean|null} [enabled] MessageTransform enabled
|
|
7207
|
+
* @property {boolean|null} [disabled] MessageTransform disabled
|
|
7208
|
+
*/
|
|
7209
|
+
|
|
7210
|
+
/**
|
|
7211
|
+
* Constructs a new MessageTransform.
|
|
7212
|
+
* @memberof google.pubsub.v1
|
|
7213
|
+
* @classdesc Represents a MessageTransform.
|
|
7214
|
+
* @implements IMessageTransform
|
|
7215
|
+
* @constructor
|
|
7216
|
+
* @param {google.pubsub.v1.IMessageTransform=} [properties] Properties to set
|
|
7217
|
+
*/
|
|
7218
|
+
function MessageTransform(properties) {
|
|
7219
|
+
if (properties)
|
|
7220
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
7221
|
+
if (properties[keys[i]] != null)
|
|
7222
|
+
this[keys[i]] = properties[keys[i]];
|
|
7223
|
+
}
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* MessageTransform javascriptUdf.
|
|
7227
|
+
* @member {google.pubsub.v1.IJavaScriptUDF|null|undefined} javascriptUdf
|
|
7228
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7229
|
+
* @instance
|
|
7230
|
+
*/
|
|
7231
|
+
MessageTransform.prototype.javascriptUdf = null;
|
|
7232
|
+
|
|
7233
|
+
/**
|
|
7234
|
+
* MessageTransform enabled.
|
|
7235
|
+
* @member {boolean} enabled
|
|
7236
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7237
|
+
* @instance
|
|
7238
|
+
*/
|
|
7239
|
+
MessageTransform.prototype.enabled = false;
|
|
7240
|
+
|
|
7241
|
+
/**
|
|
7242
|
+
* MessageTransform disabled.
|
|
7243
|
+
* @member {boolean} disabled
|
|
7244
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7245
|
+
* @instance
|
|
7246
|
+
*/
|
|
7247
|
+
MessageTransform.prototype.disabled = false;
|
|
7248
|
+
|
|
7249
|
+
// OneOf field names bound to virtual getters and setters
|
|
7250
|
+
var $oneOfFields;
|
|
7251
|
+
|
|
7252
|
+
/**
|
|
7253
|
+
* MessageTransform transform.
|
|
7254
|
+
* @member {"javascriptUdf"|undefined} transform
|
|
7255
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7256
|
+
* @instance
|
|
7257
|
+
*/
|
|
7258
|
+
Object.defineProperty(MessageTransform.prototype, "transform", {
|
|
7259
|
+
get: $util.oneOfGetter($oneOfFields = ["javascriptUdf"]),
|
|
7260
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
7261
|
+
});
|
|
7262
|
+
|
|
7263
|
+
/**
|
|
7264
|
+
* Creates a new MessageTransform instance using the specified properties.
|
|
7265
|
+
* @function create
|
|
7266
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7267
|
+
* @static
|
|
7268
|
+
* @param {google.pubsub.v1.IMessageTransform=} [properties] Properties to set
|
|
7269
|
+
* @returns {google.pubsub.v1.MessageTransform} MessageTransform instance
|
|
7270
|
+
*/
|
|
7271
|
+
MessageTransform.create = function create(properties) {
|
|
7272
|
+
return new MessageTransform(properties);
|
|
7273
|
+
};
|
|
7274
|
+
|
|
7275
|
+
/**
|
|
7276
|
+
* Encodes the specified MessageTransform message. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages.
|
|
7277
|
+
* @function encode
|
|
7278
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7279
|
+
* @static
|
|
7280
|
+
* @param {google.pubsub.v1.IMessageTransform} message MessageTransform message or plain object to encode
|
|
7281
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7282
|
+
* @returns {$protobuf.Writer} Writer
|
|
7283
|
+
*/
|
|
7284
|
+
MessageTransform.encode = function encode(message, writer) {
|
|
7285
|
+
if (!writer)
|
|
7286
|
+
writer = $Writer.create();
|
|
7287
|
+
if (message.javascriptUdf != null && Object.hasOwnProperty.call(message, "javascriptUdf"))
|
|
7288
|
+
$root.google.pubsub.v1.JavaScriptUDF.encode(message.javascriptUdf, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
7289
|
+
if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled"))
|
|
7290
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enabled);
|
|
7291
|
+
if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled"))
|
|
7292
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled);
|
|
7293
|
+
return writer;
|
|
7294
|
+
};
|
|
7295
|
+
|
|
7296
|
+
/**
|
|
7297
|
+
* Encodes the specified MessageTransform message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages.
|
|
7298
|
+
* @function encodeDelimited
|
|
7299
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7300
|
+
* @static
|
|
7301
|
+
* @param {google.pubsub.v1.IMessageTransform} message MessageTransform message or plain object to encode
|
|
7302
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
7303
|
+
* @returns {$protobuf.Writer} Writer
|
|
7304
|
+
*/
|
|
7305
|
+
MessageTransform.encodeDelimited = function encodeDelimited(message, writer) {
|
|
7306
|
+
return this.encode(message, writer).ldelim();
|
|
7307
|
+
};
|
|
7308
|
+
|
|
7309
|
+
/**
|
|
7310
|
+
* Decodes a MessageTransform message from the specified reader or buffer.
|
|
7311
|
+
* @function decode
|
|
7312
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7313
|
+
* @static
|
|
7314
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7315
|
+
* @param {number} [length] Message length if known beforehand
|
|
7316
|
+
* @returns {google.pubsub.v1.MessageTransform} MessageTransform
|
|
7317
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7318
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7319
|
+
*/
|
|
7320
|
+
MessageTransform.decode = function decode(reader, length, error) {
|
|
7321
|
+
if (!(reader instanceof $Reader))
|
|
7322
|
+
reader = $Reader.create(reader);
|
|
7323
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.MessageTransform();
|
|
7324
|
+
while (reader.pos < end) {
|
|
7325
|
+
var tag = reader.uint32();
|
|
7326
|
+
if (tag === error)
|
|
7327
|
+
break;
|
|
7328
|
+
switch (tag >>> 3) {
|
|
7329
|
+
case 2: {
|
|
7330
|
+
message.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.decode(reader, reader.uint32());
|
|
7331
|
+
break;
|
|
7332
|
+
}
|
|
7333
|
+
case 3: {
|
|
7334
|
+
message.enabled = reader.bool();
|
|
7335
|
+
break;
|
|
7336
|
+
}
|
|
7337
|
+
case 4: {
|
|
7338
|
+
message.disabled = reader.bool();
|
|
7339
|
+
break;
|
|
7340
|
+
}
|
|
7341
|
+
default:
|
|
7342
|
+
reader.skipType(tag & 7);
|
|
7343
|
+
break;
|
|
7344
|
+
}
|
|
7345
|
+
}
|
|
7346
|
+
return message;
|
|
7347
|
+
};
|
|
6194
7348
|
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
message.kafkaTopic = String(object.kafkaTopic);
|
|
6211
|
-
if (object.partitionId != null)
|
|
6212
|
-
if ($util.Long)
|
|
6213
|
-
(message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false;
|
|
6214
|
-
else if (typeof object.partitionId === "string")
|
|
6215
|
-
message.partitionId = parseInt(object.partitionId, 10);
|
|
6216
|
-
else if (typeof object.partitionId === "number")
|
|
6217
|
-
message.partitionId = object.partitionId;
|
|
6218
|
-
else if (typeof object.partitionId === "object")
|
|
6219
|
-
message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber();
|
|
6220
|
-
if (object.offset != null)
|
|
6221
|
-
if ($util.Long)
|
|
6222
|
-
(message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
|
|
6223
|
-
else if (typeof object.offset === "string")
|
|
6224
|
-
message.offset = parseInt(object.offset, 10);
|
|
6225
|
-
else if (typeof object.offset === "number")
|
|
6226
|
-
message.offset = object.offset;
|
|
6227
|
-
else if (typeof object.offset === "object")
|
|
6228
|
-
message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
|
|
6229
|
-
if (object.apiViolationReason != null) {
|
|
6230
|
-
if (typeof object.apiViolationReason !== "object")
|
|
6231
|
-
throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.apiViolationReason: object expected");
|
|
6232
|
-
message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
|
|
6233
|
-
}
|
|
6234
|
-
return message;
|
|
6235
|
-
};
|
|
7349
|
+
/**
|
|
7350
|
+
* Decodes a MessageTransform message from the specified reader or buffer, length delimited.
|
|
7351
|
+
* @function decodeDelimited
|
|
7352
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7353
|
+
* @static
|
|
7354
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
7355
|
+
* @returns {google.pubsub.v1.MessageTransform} MessageTransform
|
|
7356
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
7357
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
7358
|
+
*/
|
|
7359
|
+
MessageTransform.decodeDelimited = function decodeDelimited(reader) {
|
|
7360
|
+
if (!(reader instanceof $Reader))
|
|
7361
|
+
reader = new $Reader(reader);
|
|
7362
|
+
return this.decode(reader, reader.uint32());
|
|
7363
|
+
};
|
|
6236
7364
|
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
if (
|
|
6254
|
-
|
|
6255
|
-
object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
6256
|
-
} else
|
|
6257
|
-
object.partitionId = options.longs === String ? "0" : 0;
|
|
6258
|
-
if ($util.Long) {
|
|
6259
|
-
var long = new $util.Long(0, 0, false);
|
|
6260
|
-
object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
6261
|
-
} else
|
|
6262
|
-
object.offset = options.longs === String ? "0" : 0;
|
|
6263
|
-
}
|
|
6264
|
-
if (message.clusterId != null && message.hasOwnProperty("clusterId"))
|
|
6265
|
-
object.clusterId = message.clusterId;
|
|
6266
|
-
if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
|
|
6267
|
-
object.kafkaTopic = message.kafkaTopic;
|
|
6268
|
-
if (message.partitionId != null && message.hasOwnProperty("partitionId"))
|
|
6269
|
-
if (typeof message.partitionId === "number")
|
|
6270
|
-
object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId;
|
|
6271
|
-
else
|
|
6272
|
-
object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId;
|
|
6273
|
-
if (message.offset != null && message.hasOwnProperty("offset"))
|
|
6274
|
-
if (typeof message.offset === "number")
|
|
6275
|
-
object.offset = options.longs === String ? String(message.offset) : message.offset;
|
|
6276
|
-
else
|
|
6277
|
-
object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset;
|
|
6278
|
-
if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
|
|
6279
|
-
object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
|
|
6280
|
-
if (options.oneofs)
|
|
6281
|
-
object.reason = "apiViolationReason";
|
|
7365
|
+
/**
|
|
7366
|
+
* Verifies a MessageTransform message.
|
|
7367
|
+
* @function verify
|
|
7368
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7369
|
+
* @static
|
|
7370
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
7371
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
7372
|
+
*/
|
|
7373
|
+
MessageTransform.verify = function verify(message) {
|
|
7374
|
+
if (typeof message !== "object" || message === null)
|
|
7375
|
+
return "object expected";
|
|
7376
|
+
var properties = {};
|
|
7377
|
+
if (message.javascriptUdf != null && message.hasOwnProperty("javascriptUdf")) {
|
|
7378
|
+
properties.transform = 1;
|
|
7379
|
+
{
|
|
7380
|
+
var error = $root.google.pubsub.v1.JavaScriptUDF.verify(message.javascriptUdf);
|
|
7381
|
+
if (error)
|
|
7382
|
+
return "javascriptUdf." + error;
|
|
6282
7383
|
}
|
|
7384
|
+
}
|
|
7385
|
+
if (message.enabled != null && message.hasOwnProperty("enabled"))
|
|
7386
|
+
if (typeof message.enabled !== "boolean")
|
|
7387
|
+
return "enabled: boolean expected";
|
|
7388
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
7389
|
+
if (typeof message.disabled !== "boolean")
|
|
7390
|
+
return "disabled: boolean expected";
|
|
7391
|
+
return null;
|
|
7392
|
+
};
|
|
7393
|
+
|
|
7394
|
+
/**
|
|
7395
|
+
* Creates a MessageTransform message from a plain object. Also converts values to their respective internal types.
|
|
7396
|
+
* @function fromObject
|
|
7397
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7398
|
+
* @static
|
|
7399
|
+
* @param {Object.<string,*>} object Plain object
|
|
7400
|
+
* @returns {google.pubsub.v1.MessageTransform} MessageTransform
|
|
7401
|
+
*/
|
|
7402
|
+
MessageTransform.fromObject = function fromObject(object) {
|
|
7403
|
+
if (object instanceof $root.google.pubsub.v1.MessageTransform)
|
|
6283
7404
|
return object;
|
|
6284
|
-
|
|
7405
|
+
var message = new $root.google.pubsub.v1.MessageTransform();
|
|
7406
|
+
if (object.javascriptUdf != null) {
|
|
7407
|
+
if (typeof object.javascriptUdf !== "object")
|
|
7408
|
+
throw TypeError(".google.pubsub.v1.MessageTransform.javascriptUdf: object expected");
|
|
7409
|
+
message.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.fromObject(object.javascriptUdf);
|
|
7410
|
+
}
|
|
7411
|
+
if (object.enabled != null)
|
|
7412
|
+
message.enabled = Boolean(object.enabled);
|
|
7413
|
+
if (object.disabled != null)
|
|
7414
|
+
message.disabled = Boolean(object.disabled);
|
|
7415
|
+
return message;
|
|
7416
|
+
};
|
|
6285
7417
|
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
7418
|
+
/**
|
|
7419
|
+
* Creates a plain object from a MessageTransform message. Also converts values to other types if specified.
|
|
7420
|
+
* @function toObject
|
|
7421
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7422
|
+
* @static
|
|
7423
|
+
* @param {google.pubsub.v1.MessageTransform} message MessageTransform
|
|
7424
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
7425
|
+
* @returns {Object.<string,*>} Plain object
|
|
7426
|
+
*/
|
|
7427
|
+
MessageTransform.toObject = function toObject(message, options) {
|
|
7428
|
+
if (!options)
|
|
7429
|
+
options = {};
|
|
7430
|
+
var object = {};
|
|
7431
|
+
if (options.defaults) {
|
|
7432
|
+
object.enabled = false;
|
|
7433
|
+
object.disabled = false;
|
|
7434
|
+
}
|
|
7435
|
+
if (message.javascriptUdf != null && message.hasOwnProperty("javascriptUdf")) {
|
|
7436
|
+
object.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.toObject(message.javascriptUdf, options);
|
|
7437
|
+
if (options.oneofs)
|
|
7438
|
+
object.transform = "javascriptUdf";
|
|
7439
|
+
}
|
|
7440
|
+
if (message.enabled != null && message.hasOwnProperty("enabled"))
|
|
7441
|
+
object.enabled = message.enabled;
|
|
7442
|
+
if (message.disabled != null && message.hasOwnProperty("disabled"))
|
|
7443
|
+
object.disabled = message.disabled;
|
|
7444
|
+
return object;
|
|
7445
|
+
};
|
|
6296
7446
|
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
typeUrlPrefix = "type.googleapis.com";
|
|
6308
|
-
}
|
|
6309
|
-
return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason";
|
|
6310
|
-
};
|
|
7447
|
+
/**
|
|
7448
|
+
* Converts this MessageTransform to JSON.
|
|
7449
|
+
* @function toJSON
|
|
7450
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7451
|
+
* @instance
|
|
7452
|
+
* @returns {Object.<string,*>} JSON object
|
|
7453
|
+
*/
|
|
7454
|
+
MessageTransform.prototype.toJSON = function toJSON() {
|
|
7455
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
7456
|
+
};
|
|
6311
7457
|
|
|
6312
|
-
|
|
6313
|
-
|
|
7458
|
+
/**
|
|
7459
|
+
* Gets the default type url for MessageTransform
|
|
7460
|
+
* @function getTypeUrl
|
|
7461
|
+
* @memberof google.pubsub.v1.MessageTransform
|
|
7462
|
+
* @static
|
|
7463
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
7464
|
+
* @returns {string} The default type url
|
|
7465
|
+
*/
|
|
7466
|
+
MessageTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
7467
|
+
if (typeUrlPrefix === undefined) {
|
|
7468
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
7469
|
+
}
|
|
7470
|
+
return typeUrlPrefix + "/google.pubsub.v1.MessageTransform";
|
|
7471
|
+
};
|
|
6314
7472
|
|
|
6315
|
-
return
|
|
7473
|
+
return MessageTransform;
|
|
6316
7474
|
})();
|
|
6317
7475
|
|
|
6318
7476
|
v1.Topic = (function() {
|
|
@@ -6330,6 +7488,7 @@
|
|
|
6330
7488
|
* @property {google.protobuf.IDuration|null} [messageRetentionDuration] Topic messageRetentionDuration
|
|
6331
7489
|
* @property {google.pubsub.v1.Topic.State|null} [state] Topic state
|
|
6332
7490
|
* @property {google.pubsub.v1.IIngestionDataSourceSettings|null} [ingestionDataSourceSettings] Topic ingestionDataSourceSettings
|
|
7491
|
+
* @property {Array.<google.pubsub.v1.IMessageTransform>|null} [messageTransforms] Topic messageTransforms
|
|
6333
7492
|
*/
|
|
6334
7493
|
|
|
6335
7494
|
/**
|
|
@@ -6342,6 +7501,7 @@
|
|
|
6342
7501
|
*/
|
|
6343
7502
|
function Topic(properties) {
|
|
6344
7503
|
this.labels = {};
|
|
7504
|
+
this.messageTransforms = [];
|
|
6345
7505
|
if (properties)
|
|
6346
7506
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6347
7507
|
if (properties[keys[i]] != null)
|
|
@@ -6420,6 +7580,14 @@
|
|
|
6420
7580
|
*/
|
|
6421
7581
|
Topic.prototype.ingestionDataSourceSettings = null;
|
|
6422
7582
|
|
|
7583
|
+
/**
|
|
7584
|
+
* Topic messageTransforms.
|
|
7585
|
+
* @member {Array.<google.pubsub.v1.IMessageTransform>} messageTransforms
|
|
7586
|
+
* @memberof google.pubsub.v1.Topic
|
|
7587
|
+
* @instance
|
|
7588
|
+
*/
|
|
7589
|
+
Topic.prototype.messageTransforms = $util.emptyArray;
|
|
7590
|
+
|
|
6423
7591
|
/**
|
|
6424
7592
|
* Creates a new Topic instance using the specified properties.
|
|
6425
7593
|
* @function create
|
|
@@ -6463,6 +7631,9 @@
|
|
|
6463
7631
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state);
|
|
6464
7632
|
if (message.ingestionDataSourceSettings != null && Object.hasOwnProperty.call(message, "ingestionDataSourceSettings"))
|
|
6465
7633
|
$root.google.pubsub.v1.IngestionDataSourceSettings.encode(message.ingestionDataSourceSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
7634
|
+
if (message.messageTransforms != null && message.messageTransforms.length)
|
|
7635
|
+
for (var i = 0; i < message.messageTransforms.length; ++i)
|
|
7636
|
+
$root.google.pubsub.v1.MessageTransform.encode(message.messageTransforms[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
6466
7637
|
return writer;
|
|
6467
7638
|
};
|
|
6468
7639
|
|
|
@@ -6554,6 +7725,12 @@
|
|
|
6554
7725
|
message.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.decode(reader, reader.uint32());
|
|
6555
7726
|
break;
|
|
6556
7727
|
}
|
|
7728
|
+
case 13: {
|
|
7729
|
+
if (!(message.messageTransforms && message.messageTransforms.length))
|
|
7730
|
+
message.messageTransforms = [];
|
|
7731
|
+
message.messageTransforms.push($root.google.pubsub.v1.MessageTransform.decode(reader, reader.uint32()));
|
|
7732
|
+
break;
|
|
7733
|
+
}
|
|
6557
7734
|
default:
|
|
6558
7735
|
reader.skipType(tag & 7);
|
|
6559
7736
|
break;
|
|
@@ -6635,6 +7812,15 @@
|
|
|
6635
7812
|
if (error)
|
|
6636
7813
|
return "ingestionDataSourceSettings." + error;
|
|
6637
7814
|
}
|
|
7815
|
+
if (message.messageTransforms != null && message.hasOwnProperty("messageTransforms")) {
|
|
7816
|
+
if (!Array.isArray(message.messageTransforms))
|
|
7817
|
+
return "messageTransforms: array expected";
|
|
7818
|
+
for (var i = 0; i < message.messageTransforms.length; ++i) {
|
|
7819
|
+
var error = $root.google.pubsub.v1.MessageTransform.verify(message.messageTransforms[i]);
|
|
7820
|
+
if (error)
|
|
7821
|
+
return "messageTransforms." + error;
|
|
7822
|
+
}
|
|
7823
|
+
}
|
|
6638
7824
|
return null;
|
|
6639
7825
|
};
|
|
6640
7826
|
|
|
@@ -6703,6 +7889,16 @@
|
|
|
6703
7889
|
throw TypeError(".google.pubsub.v1.Topic.ingestionDataSourceSettings: object expected");
|
|
6704
7890
|
message.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.fromObject(object.ingestionDataSourceSettings);
|
|
6705
7891
|
}
|
|
7892
|
+
if (object.messageTransforms) {
|
|
7893
|
+
if (!Array.isArray(object.messageTransforms))
|
|
7894
|
+
throw TypeError(".google.pubsub.v1.Topic.messageTransforms: array expected");
|
|
7895
|
+
message.messageTransforms = [];
|
|
7896
|
+
for (var i = 0; i < object.messageTransforms.length; ++i) {
|
|
7897
|
+
if (typeof object.messageTransforms[i] !== "object")
|
|
7898
|
+
throw TypeError(".google.pubsub.v1.Topic.messageTransforms: object expected");
|
|
7899
|
+
message.messageTransforms[i] = $root.google.pubsub.v1.MessageTransform.fromObject(object.messageTransforms[i]);
|
|
7900
|
+
}
|
|
7901
|
+
}
|
|
6706
7902
|
return message;
|
|
6707
7903
|
};
|
|
6708
7904
|
|
|
@@ -6719,6 +7915,8 @@
|
|
|
6719
7915
|
if (!options)
|
|
6720
7916
|
options = {};
|
|
6721
7917
|
var object = {};
|
|
7918
|
+
if (options.arrays || options.defaults)
|
|
7919
|
+
object.messageTransforms = [];
|
|
6722
7920
|
if (options.objects || options.defaults)
|
|
6723
7921
|
object.labels = {};
|
|
6724
7922
|
if (options.defaults) {
|
|
@@ -6753,6 +7951,11 @@
|
|
|
6753
7951
|
object.state = options.enums === String ? $root.google.pubsub.v1.Topic.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.Topic.State[message.state] : message.state;
|
|
6754
7952
|
if (message.ingestionDataSourceSettings != null && message.hasOwnProperty("ingestionDataSourceSettings"))
|
|
6755
7953
|
object.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.toObject(message.ingestionDataSourceSettings, options);
|
|
7954
|
+
if (message.messageTransforms && message.messageTransforms.length) {
|
|
7955
|
+
object.messageTransforms = [];
|
|
7956
|
+
for (var j = 0; j < message.messageTransforms.length; ++j)
|
|
7957
|
+
object.messageTransforms[j] = $root.google.pubsub.v1.MessageTransform.toObject(message.messageTransforms[j], options);
|
|
7958
|
+
}
|
|
6756
7959
|
return object;
|
|
6757
7960
|
};
|
|
6758
7961
|
|
|
@@ -10735,6 +11938,7 @@
|
|
|
10735
11938
|
* @property {google.protobuf.IDuration|null} [topicMessageRetentionDuration] Subscription topicMessageRetentionDuration
|
|
10736
11939
|
* @property {google.pubsub.v1.Subscription.State|null} [state] Subscription state
|
|
10737
11940
|
* @property {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null} [analyticsHubSubscriptionInfo] Subscription analyticsHubSubscriptionInfo
|
|
11941
|
+
* @property {Array.<google.pubsub.v1.IMessageTransform>|null} [messageTransforms] Subscription messageTransforms
|
|
10738
11942
|
*/
|
|
10739
11943
|
|
|
10740
11944
|
/**
|
|
@@ -10747,6 +11951,7 @@
|
|
|
10747
11951
|
*/
|
|
10748
11952
|
function Subscription(properties) {
|
|
10749
11953
|
this.labels = {};
|
|
11954
|
+
this.messageTransforms = [];
|
|
10750
11955
|
if (properties)
|
|
10751
11956
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
10752
11957
|
if (properties[keys[i]] != null)
|
|
@@ -10905,6 +12110,14 @@
|
|
|
10905
12110
|
*/
|
|
10906
12111
|
Subscription.prototype.analyticsHubSubscriptionInfo = null;
|
|
10907
12112
|
|
|
12113
|
+
/**
|
|
12114
|
+
* Subscription messageTransforms.
|
|
12115
|
+
* @member {Array.<google.pubsub.v1.IMessageTransform>} messageTransforms
|
|
12116
|
+
* @memberof google.pubsub.v1.Subscription
|
|
12117
|
+
* @instance
|
|
12118
|
+
*/
|
|
12119
|
+
Subscription.prototype.messageTransforms = $util.emptyArray;
|
|
12120
|
+
|
|
10908
12121
|
/**
|
|
10909
12122
|
* Creates a new Subscription instance using the specified properties.
|
|
10910
12123
|
* @function create
|
|
@@ -10968,6 +12181,9 @@
|
|
|
10968
12181
|
$root.google.pubsub.v1.CloudStorageConfig.encode(message.cloudStorageConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
|
|
10969
12182
|
if (message.analyticsHubSubscriptionInfo != null && Object.hasOwnProperty.call(message, "analyticsHubSubscriptionInfo"))
|
|
10970
12183
|
$root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.encode(message.analyticsHubSubscriptionInfo, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
|
|
12184
|
+
if (message.messageTransforms != null && message.messageTransforms.length)
|
|
12185
|
+
for (var i = 0; i < message.messageTransforms.length; ++i)
|
|
12186
|
+
$root.google.pubsub.v1.MessageTransform.encode(message.messageTransforms[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
|
|
10971
12187
|
return writer;
|
|
10972
12188
|
};
|
|
10973
12189
|
|
|
@@ -11099,6 +12315,12 @@
|
|
|
11099
12315
|
message.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.decode(reader, reader.uint32());
|
|
11100
12316
|
break;
|
|
11101
12317
|
}
|
|
12318
|
+
case 25: {
|
|
12319
|
+
if (!(message.messageTransforms && message.messageTransforms.length))
|
|
12320
|
+
message.messageTransforms = [];
|
|
12321
|
+
message.messageTransforms.push($root.google.pubsub.v1.MessageTransform.decode(reader, reader.uint32()));
|
|
12322
|
+
break;
|
|
12323
|
+
}
|
|
11102
12324
|
default:
|
|
11103
12325
|
reader.skipType(tag & 7);
|
|
11104
12326
|
break;
|
|
@@ -11220,6 +12442,15 @@
|
|
|
11220
12442
|
if (error)
|
|
11221
12443
|
return "analyticsHubSubscriptionInfo." + error;
|
|
11222
12444
|
}
|
|
12445
|
+
if (message.messageTransforms != null && message.hasOwnProperty("messageTransforms")) {
|
|
12446
|
+
if (!Array.isArray(message.messageTransforms))
|
|
12447
|
+
return "messageTransforms: array expected";
|
|
12448
|
+
for (var i = 0; i < message.messageTransforms.length; ++i) {
|
|
12449
|
+
var error = $root.google.pubsub.v1.MessageTransform.verify(message.messageTransforms[i]);
|
|
12450
|
+
if (error)
|
|
12451
|
+
return "messageTransforms." + error;
|
|
12452
|
+
}
|
|
12453
|
+
}
|
|
11223
12454
|
return null;
|
|
11224
12455
|
};
|
|
11225
12456
|
|
|
@@ -11323,6 +12554,16 @@
|
|
|
11323
12554
|
throw TypeError(".google.pubsub.v1.Subscription.analyticsHubSubscriptionInfo: object expected");
|
|
11324
12555
|
message.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.fromObject(object.analyticsHubSubscriptionInfo);
|
|
11325
12556
|
}
|
|
12557
|
+
if (object.messageTransforms) {
|
|
12558
|
+
if (!Array.isArray(object.messageTransforms))
|
|
12559
|
+
throw TypeError(".google.pubsub.v1.Subscription.messageTransforms: array expected");
|
|
12560
|
+
message.messageTransforms = [];
|
|
12561
|
+
for (var i = 0; i < object.messageTransforms.length; ++i) {
|
|
12562
|
+
if (typeof object.messageTransforms[i] !== "object")
|
|
12563
|
+
throw TypeError(".google.pubsub.v1.Subscription.messageTransforms: object expected");
|
|
12564
|
+
message.messageTransforms[i] = $root.google.pubsub.v1.MessageTransform.fromObject(object.messageTransforms[i]);
|
|
12565
|
+
}
|
|
12566
|
+
}
|
|
11326
12567
|
return message;
|
|
11327
12568
|
};
|
|
11328
12569
|
|
|
@@ -11339,6 +12580,8 @@
|
|
|
11339
12580
|
if (!options)
|
|
11340
12581
|
options = {};
|
|
11341
12582
|
var object = {};
|
|
12583
|
+
if (options.arrays || options.defaults)
|
|
12584
|
+
object.messageTransforms = [];
|
|
11342
12585
|
if (options.objects || options.defaults)
|
|
11343
12586
|
object.labels = {};
|
|
11344
12587
|
if (options.defaults) {
|
|
@@ -11403,6 +12646,11 @@
|
|
|
11403
12646
|
object.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.toObject(message.cloudStorageConfig, options);
|
|
11404
12647
|
if (message.analyticsHubSubscriptionInfo != null && message.hasOwnProperty("analyticsHubSubscriptionInfo"))
|
|
11405
12648
|
object.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.toObject(message.analyticsHubSubscriptionInfo, options);
|
|
12649
|
+
if (message.messageTransforms && message.messageTransforms.length) {
|
|
12650
|
+
object.messageTransforms = [];
|
|
12651
|
+
for (var j = 0; j < message.messageTransforms.length; ++j)
|
|
12652
|
+
object.messageTransforms[j] = $root.google.pubsub.v1.MessageTransform.toObject(message.messageTransforms[j], options);
|
|
12653
|
+
}
|
|
11406
12654
|
return object;
|
|
11407
12655
|
};
|
|
11408
12656
|
|