@google-cloud/pubsub 4.9.0 → 4.10.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.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2025 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -937,6 +937,9 @@
937
937
  * @interface IIngestionDataSourceSettings
938
938
  * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null} [awsKinesis] IngestionDataSourceSettings awsKinesis
939
939
  * @property {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null} [cloudStorage] IngestionDataSourceSettings cloudStorage
940
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null} [azureEventHubs] IngestionDataSourceSettings azureEventHubs
941
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null} [awsMsk] IngestionDataSourceSettings awsMsk
942
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null} [confluentCloud] IngestionDataSourceSettings confluentCloud
940
943
  * @property {google.pubsub.v1.IPlatformLogsSettings|null} [platformLogsSettings] IngestionDataSourceSettings platformLogsSettings
941
944
  */
942
945
 
@@ -971,6 +974,30 @@
971
974
  */
972
975
  IngestionDataSourceSettings.prototype.cloudStorage = null;
973
976
 
977
+ /**
978
+ * IngestionDataSourceSettings azureEventHubs.
979
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null|undefined} azureEventHubs
980
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
981
+ * @instance
982
+ */
983
+ IngestionDataSourceSettings.prototype.azureEventHubs = null;
984
+
985
+ /**
986
+ * IngestionDataSourceSettings awsMsk.
987
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null|undefined} awsMsk
988
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
989
+ * @instance
990
+ */
991
+ IngestionDataSourceSettings.prototype.awsMsk = null;
992
+
993
+ /**
994
+ * IngestionDataSourceSettings confluentCloud.
995
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null|undefined} confluentCloud
996
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
997
+ * @instance
998
+ */
999
+ IngestionDataSourceSettings.prototype.confluentCloud = null;
1000
+
974
1001
  /**
975
1002
  * IngestionDataSourceSettings platformLogsSettings.
976
1003
  * @member {google.pubsub.v1.IPlatformLogsSettings|null|undefined} platformLogsSettings
@@ -984,12 +1011,12 @@
984
1011
 
985
1012
  /**
986
1013
  * IngestionDataSourceSettings source.
987
- * @member {"awsKinesis"|"cloudStorage"|undefined} source
1014
+ * @member {"awsKinesis"|"cloudStorage"|"azureEventHubs"|"awsMsk"|"confluentCloud"|undefined} source
988
1015
  * @memberof google.pubsub.v1.IngestionDataSourceSettings
989
1016
  * @instance
990
1017
  */
991
1018
  Object.defineProperty(IngestionDataSourceSettings.prototype, "source", {
992
- get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage"]),
1019
+ get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage", "azureEventHubs", "awsMsk", "confluentCloud"]),
993
1020
  set: $util.oneOfSetter($oneOfFields)
994
1021
  });
995
1022
 
@@ -1021,8 +1048,14 @@
1021
1048
  $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.encode(message.awsKinesis, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
1022
1049
  if (message.cloudStorage != null && Object.hasOwnProperty.call(message, "cloudStorage"))
1023
1050
  $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.encode(message.cloudStorage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1051
+ if (message.azureEventHubs != null && Object.hasOwnProperty.call(message, "azureEventHubs"))
1052
+ $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.encode(message.azureEventHubs, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
1024
1053
  if (message.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings"))
1025
1054
  $root.google.pubsub.v1.PlatformLogsSettings.encode(message.platformLogsSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
1055
+ if (message.awsMsk != null && Object.hasOwnProperty.call(message, "awsMsk"))
1056
+ $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.encode(message.awsMsk, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
1057
+ if (message.confluentCloud != null && Object.hasOwnProperty.call(message, "confluentCloud"))
1058
+ $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.encode(message.confluentCloud, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
1026
1059
  return writer;
1027
1060
  };
1028
1061
 
@@ -1065,6 +1098,18 @@
1065
1098
  message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.decode(reader, reader.uint32());
1066
1099
  break;
1067
1100
  }
1101
+ case 3: {
1102
+ message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.decode(reader, reader.uint32());
1103
+ break;
1104
+ }
1105
+ case 5: {
1106
+ message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.decode(reader, reader.uint32());
1107
+ break;
1108
+ }
1109
+ case 6: {
1110
+ message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.decode(reader, reader.uint32());
1111
+ break;
1112
+ }
1068
1113
  case 4: {
1069
1114
  message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.decode(reader, reader.uint32());
1070
1115
  break;
@@ -1123,6 +1168,36 @@
1123
1168
  return "cloudStorage." + error;
1124
1169
  }
1125
1170
  }
1171
+ if (message.azureEventHubs != null && message.hasOwnProperty("azureEventHubs")) {
1172
+ if (properties.source === 1)
1173
+ return "source: multiple values";
1174
+ properties.source = 1;
1175
+ {
1176
+ var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify(message.azureEventHubs);
1177
+ if (error)
1178
+ return "azureEventHubs." + error;
1179
+ }
1180
+ }
1181
+ if (message.awsMsk != null && message.hasOwnProperty("awsMsk")) {
1182
+ if (properties.source === 1)
1183
+ return "source: multiple values";
1184
+ properties.source = 1;
1185
+ {
1186
+ var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify(message.awsMsk);
1187
+ if (error)
1188
+ return "awsMsk." + error;
1189
+ }
1190
+ }
1191
+ if (message.confluentCloud != null && message.hasOwnProperty("confluentCloud")) {
1192
+ if (properties.source === 1)
1193
+ return "source: multiple values";
1194
+ properties.source = 1;
1195
+ {
1196
+ var error = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify(message.confluentCloud);
1197
+ if (error)
1198
+ return "confluentCloud." + error;
1199
+ }
1200
+ }
1126
1201
  if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings")) {
1127
1202
  var error = $root.google.pubsub.v1.PlatformLogsSettings.verify(message.platformLogsSettings);
1128
1203
  if (error)
@@ -1153,6 +1228,21 @@
1153
1228
  throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.cloudStorage: object expected");
1154
1229
  message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.fromObject(object.cloudStorage);
1155
1230
  }
1231
+ if (object.azureEventHubs != null) {
1232
+ if (typeof object.azureEventHubs !== "object")
1233
+ throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.azureEventHubs: object expected");
1234
+ message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.fromObject(object.azureEventHubs);
1235
+ }
1236
+ if (object.awsMsk != null) {
1237
+ if (typeof object.awsMsk !== "object")
1238
+ throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.awsMsk: object expected");
1239
+ message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.fromObject(object.awsMsk);
1240
+ }
1241
+ if (object.confluentCloud != null) {
1242
+ if (typeof object.confluentCloud !== "object")
1243
+ throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.confluentCloud: object expected");
1244
+ message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.fromObject(object.confluentCloud);
1245
+ }
1156
1246
  if (object.platformLogsSettings != null) {
1157
1247
  if (typeof object.platformLogsSettings !== "object")
1158
1248
  throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.platformLogsSettings: object expected");
@@ -1186,8 +1276,23 @@
1186
1276
  if (options.oneofs)
1187
1277
  object.source = "cloudStorage";
1188
1278
  }
1279
+ if (message.azureEventHubs != null && message.hasOwnProperty("azureEventHubs")) {
1280
+ object.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.toObject(message.azureEventHubs, options);
1281
+ if (options.oneofs)
1282
+ object.source = "azureEventHubs";
1283
+ }
1189
1284
  if (message.platformLogsSettings != null && message.hasOwnProperty("platformLogsSettings"))
1190
1285
  object.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.toObject(message.platformLogsSettings, options);
1286
+ if (message.awsMsk != null && message.hasOwnProperty("awsMsk")) {
1287
+ object.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.toObject(message.awsMsk, options);
1288
+ if (options.oneofs)
1289
+ object.source = "awsMsk";
1290
+ }
1291
+ if (message.confluentCloud != null && message.hasOwnProperty("confluentCloud")) {
1292
+ object.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.toObject(message.confluentCloud, options);
1293
+ if (options.oneofs)
1294
+ object.source = "confluentCloud";
1295
+ }
1191
1296
  return object;
1192
1297
  };
1193
1298
 
@@ -2597,182 +2702,1366 @@
2597
2702
  return CloudStorage;
2598
2703
  })();
2599
2704
 
2600
- return IngestionDataSourceSettings;
2601
- })();
2705
+ IngestionDataSourceSettings.AzureEventHubs = (function() {
2602
2706
 
2603
- v1.PlatformLogsSettings = (function() {
2707
+ /**
2708
+ * Properties of an AzureEventHubs.
2709
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
2710
+ * @interface IAzureEventHubs
2711
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|null} [state] AzureEventHubs state
2712
+ * @property {string|null} [resourceGroup] AzureEventHubs resourceGroup
2713
+ * @property {string|null} [namespace] AzureEventHubs namespace
2714
+ * @property {string|null} [eventHub] AzureEventHubs eventHub
2715
+ * @property {string|null} [clientId] AzureEventHubs clientId
2716
+ * @property {string|null} [tenantId] AzureEventHubs tenantId
2717
+ * @property {string|null} [subscriptionId] AzureEventHubs subscriptionId
2718
+ * @property {string|null} [gcpServiceAccount] AzureEventHubs gcpServiceAccount
2719
+ */
2604
2720
 
2605
- /**
2606
- * Properties of a PlatformLogsSettings.
2607
- * @memberof google.pubsub.v1
2608
- * @interface IPlatformLogsSettings
2609
- * @property {google.pubsub.v1.PlatformLogsSettings.Severity|null} [severity] PlatformLogsSettings severity
2610
- */
2721
+ /**
2722
+ * Constructs a new AzureEventHubs.
2723
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
2724
+ * @classdesc Represents an AzureEventHubs.
2725
+ * @implements IAzureEventHubs
2726
+ * @constructor
2727
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set
2728
+ */
2729
+ function AzureEventHubs(properties) {
2730
+ if (properties)
2731
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2732
+ if (properties[keys[i]] != null)
2733
+ this[keys[i]] = properties[keys[i]];
2734
+ }
2611
2735
 
2612
- /**
2613
- * Constructs a new PlatformLogsSettings.
2614
- * @memberof google.pubsub.v1
2615
- * @classdesc Represents a PlatformLogsSettings.
2616
- * @implements IPlatformLogsSettings
2617
- * @constructor
2618
- * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set
2619
- */
2620
- function PlatformLogsSettings(properties) {
2621
- if (properties)
2622
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2623
- if (properties[keys[i]] != null)
2624
- this[keys[i]] = properties[keys[i]];
2625
- }
2736
+ /**
2737
+ * AzureEventHubs state.
2738
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State} state
2739
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2740
+ * @instance
2741
+ */
2742
+ AzureEventHubs.prototype.state = 0;
2626
2743
 
2627
- /**
2628
- * PlatformLogsSettings severity.
2629
- * @member {google.pubsub.v1.PlatformLogsSettings.Severity} severity
2630
- * @memberof google.pubsub.v1.PlatformLogsSettings
2631
- * @instance
2632
- */
2633
- PlatformLogsSettings.prototype.severity = 0;
2744
+ /**
2745
+ * AzureEventHubs resourceGroup.
2746
+ * @member {string} resourceGroup
2747
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2748
+ * @instance
2749
+ */
2750
+ AzureEventHubs.prototype.resourceGroup = "";
2634
2751
 
2635
- /**
2636
- * Creates a new PlatformLogsSettings instance using the specified properties.
2637
- * @function create
2638
- * @memberof google.pubsub.v1.PlatformLogsSettings
2639
- * @static
2640
- * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set
2641
- * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings instance
2642
- */
2643
- PlatformLogsSettings.create = function create(properties) {
2644
- return new PlatformLogsSettings(properties);
2645
- };
2752
+ /**
2753
+ * AzureEventHubs namespace.
2754
+ * @member {string} namespace
2755
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2756
+ * @instance
2757
+ */
2758
+ AzureEventHubs.prototype.namespace = "";
2646
2759
 
2647
- /**
2648
- * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages.
2649
- * @function encode
2650
- * @memberof google.pubsub.v1.PlatformLogsSettings
2651
- * @static
2652
- * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode
2653
- * @param {$protobuf.Writer} [writer] Writer to encode to
2654
- * @returns {$protobuf.Writer} Writer
2655
- */
2656
- PlatformLogsSettings.encode = function encode(message, writer) {
2657
- if (!writer)
2658
- writer = $Writer.create();
2659
- if (message.severity != null && Object.hasOwnProperty.call(message, "severity"))
2660
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity);
2661
- return writer;
2662
- };
2760
+ /**
2761
+ * AzureEventHubs eventHub.
2762
+ * @member {string} eventHub
2763
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2764
+ * @instance
2765
+ */
2766
+ AzureEventHubs.prototype.eventHub = "";
2663
2767
 
2664
- /**
2665
- * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages.
2666
- * @function encodeDelimited
2667
- * @memberof google.pubsub.v1.PlatformLogsSettings
2668
- * @static
2669
- * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode
2670
- * @param {$protobuf.Writer} [writer] Writer to encode to
2671
- * @returns {$protobuf.Writer} Writer
2672
- */
2673
- PlatformLogsSettings.encodeDelimited = function encodeDelimited(message, writer) {
2674
- return this.encode(message, writer).ldelim();
2675
- };
2768
+ /**
2769
+ * AzureEventHubs clientId.
2770
+ * @member {string} clientId
2771
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2772
+ * @instance
2773
+ */
2774
+ AzureEventHubs.prototype.clientId = "";
2676
2775
 
2677
- /**
2678
- * Decodes a PlatformLogsSettings message from the specified reader or buffer.
2679
- * @function decode
2680
- * @memberof google.pubsub.v1.PlatformLogsSettings
2681
- * @static
2682
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2683
- * @param {number} [length] Message length if known beforehand
2684
- * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
2685
- * @throws {Error} If the payload is not a reader or valid buffer
2686
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
2687
- */
2688
- PlatformLogsSettings.decode = function decode(reader, length) {
2689
- if (!(reader instanceof $Reader))
2690
- reader = $Reader.create(reader);
2691
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PlatformLogsSettings();
2692
- while (reader.pos < end) {
2693
- var tag = reader.uint32();
2694
- switch (tag >>> 3) {
2695
- case 1: {
2696
- message.severity = reader.int32();
2697
- break;
2698
- }
2699
- default:
2700
- reader.skipType(tag & 7);
2701
- break;
2702
- }
2703
- }
2704
- return message;
2705
- };
2776
+ /**
2777
+ * AzureEventHubs tenantId.
2778
+ * @member {string} tenantId
2779
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2780
+ * @instance
2781
+ */
2782
+ AzureEventHubs.prototype.tenantId = "";
2706
2783
 
2707
- /**
2708
- * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited.
2709
- * @function decodeDelimited
2710
- * @memberof google.pubsub.v1.PlatformLogsSettings
2711
- * @static
2712
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2713
- * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
2714
- * @throws {Error} If the payload is not a reader or valid buffer
2715
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
2716
- */
2717
- PlatformLogsSettings.decodeDelimited = function decodeDelimited(reader) {
2718
- if (!(reader instanceof $Reader))
2719
- reader = new $Reader(reader);
2720
- return this.decode(reader, reader.uint32());
2721
- };
2784
+ /**
2785
+ * AzureEventHubs subscriptionId.
2786
+ * @member {string} subscriptionId
2787
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2788
+ * @instance
2789
+ */
2790
+ AzureEventHubs.prototype.subscriptionId = "";
2722
2791
 
2723
- /**
2724
- * Verifies a PlatformLogsSettings message.
2725
- * @function verify
2726
- * @memberof google.pubsub.v1.PlatformLogsSettings
2727
- * @static
2728
- * @param {Object.<string,*>} message Plain object to verify
2729
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
2730
- */
2731
- PlatformLogsSettings.verify = function verify(message) {
2732
- if (typeof message !== "object" || message === null)
2733
- return "object expected";
2734
- if (message.severity != null && message.hasOwnProperty("severity"))
2735
- switch (message.severity) {
2736
- default:
2737
- return "severity: enum value expected";
2738
- case 0:
2739
- case 1:
2740
- case 2:
2741
- case 3:
2742
- case 4:
2743
- case 5:
2744
- break;
2745
- }
2746
- return null;
2747
- };
2792
+ /**
2793
+ * AzureEventHubs gcpServiceAccount.
2794
+ * @member {string} gcpServiceAccount
2795
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2796
+ * @instance
2797
+ */
2798
+ AzureEventHubs.prototype.gcpServiceAccount = "";
2748
2799
 
2749
- /**
2750
- * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types.
2751
- * @function fromObject
2752
- * @memberof google.pubsub.v1.PlatformLogsSettings
2753
- * @static
2754
- * @param {Object.<string,*>} object Plain object
2755
- * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
2756
- */
2757
- PlatformLogsSettings.fromObject = function fromObject(object) {
2758
- if (object instanceof $root.google.pubsub.v1.PlatformLogsSettings)
2759
- return object;
2760
- var message = new $root.google.pubsub.v1.PlatformLogsSettings();
2761
- switch (object.severity) {
2762
- default:
2763
- if (typeof object.severity === "number") {
2764
- message.severity = object.severity;
2765
- break;
2766
- }
2767
- break;
2768
- case "SEVERITY_UNSPECIFIED":
2769
- case 0:
2770
- message.severity = 0;
2771
- break;
2772
- case "DISABLED":
2773
- case 1:
2774
- message.severity = 1;
2775
- break;
2800
+ /**
2801
+ * Creates a new AzureEventHubs instance using the specified properties.
2802
+ * @function create
2803
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2804
+ * @static
2805
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set
2806
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs instance
2807
+ */
2808
+ AzureEventHubs.create = function create(properties) {
2809
+ return new AzureEventHubs(properties);
2810
+ };
2811
+
2812
+ /**
2813
+ * Encodes the specified AzureEventHubs message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages.
2814
+ * @function encode
2815
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2816
+ * @static
2817
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode
2818
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2819
+ * @returns {$protobuf.Writer} Writer
2820
+ */
2821
+ AzureEventHubs.encode = function encode(message, writer) {
2822
+ if (!writer)
2823
+ writer = $Writer.create();
2824
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
2825
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
2826
+ if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup"))
2827
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceGroup);
2828
+ if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace"))
2829
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.namespace);
2830
+ if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub"))
2831
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.eventHub);
2832
+ if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId"))
2833
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.clientId);
2834
+ if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId"))
2835
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.tenantId);
2836
+ if (message.subscriptionId != null && Object.hasOwnProperty.call(message, "subscriptionId"))
2837
+ writer.uint32(/* id 7, wireType 2 =*/58).string(message.subscriptionId);
2838
+ if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount"))
2839
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.gcpServiceAccount);
2840
+ return writer;
2841
+ };
2842
+
2843
+ /**
2844
+ * Encodes the specified AzureEventHubs message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages.
2845
+ * @function encodeDelimited
2846
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2847
+ * @static
2848
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode
2849
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2850
+ * @returns {$protobuf.Writer} Writer
2851
+ */
2852
+ AzureEventHubs.encodeDelimited = function encodeDelimited(message, writer) {
2853
+ return this.encode(message, writer).ldelim();
2854
+ };
2855
+
2856
+ /**
2857
+ * Decodes an AzureEventHubs message from the specified reader or buffer.
2858
+ * @function decode
2859
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2860
+ * @static
2861
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2862
+ * @param {number} [length] Message length if known beforehand
2863
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs
2864
+ * @throws {Error} If the payload is not a reader or valid buffer
2865
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2866
+ */
2867
+ AzureEventHubs.decode = function decode(reader, length) {
2868
+ if (!(reader instanceof $Reader))
2869
+ reader = $Reader.create(reader);
2870
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs();
2871
+ while (reader.pos < end) {
2872
+ var tag = reader.uint32();
2873
+ switch (tag >>> 3) {
2874
+ case 1: {
2875
+ message.state = reader.int32();
2876
+ break;
2877
+ }
2878
+ case 2: {
2879
+ message.resourceGroup = reader.string();
2880
+ break;
2881
+ }
2882
+ case 3: {
2883
+ message.namespace = reader.string();
2884
+ break;
2885
+ }
2886
+ case 4: {
2887
+ message.eventHub = reader.string();
2888
+ break;
2889
+ }
2890
+ case 5: {
2891
+ message.clientId = reader.string();
2892
+ break;
2893
+ }
2894
+ case 6: {
2895
+ message.tenantId = reader.string();
2896
+ break;
2897
+ }
2898
+ case 7: {
2899
+ message.subscriptionId = reader.string();
2900
+ break;
2901
+ }
2902
+ case 8: {
2903
+ message.gcpServiceAccount = reader.string();
2904
+ break;
2905
+ }
2906
+ default:
2907
+ reader.skipType(tag & 7);
2908
+ break;
2909
+ }
2910
+ }
2911
+ return message;
2912
+ };
2913
+
2914
+ /**
2915
+ * Decodes an AzureEventHubs message from the specified reader or buffer, length delimited.
2916
+ * @function decodeDelimited
2917
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2918
+ * @static
2919
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2920
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs
2921
+ * @throws {Error} If the payload is not a reader or valid buffer
2922
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2923
+ */
2924
+ AzureEventHubs.decodeDelimited = function decodeDelimited(reader) {
2925
+ if (!(reader instanceof $Reader))
2926
+ reader = new $Reader(reader);
2927
+ return this.decode(reader, reader.uint32());
2928
+ };
2929
+
2930
+ /**
2931
+ * Verifies an AzureEventHubs message.
2932
+ * @function verify
2933
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2934
+ * @static
2935
+ * @param {Object.<string,*>} message Plain object to verify
2936
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2937
+ */
2938
+ AzureEventHubs.verify = function verify(message) {
2939
+ if (typeof message !== "object" || message === null)
2940
+ return "object expected";
2941
+ if (message.state != null && message.hasOwnProperty("state"))
2942
+ switch (message.state) {
2943
+ default:
2944
+ return "state: enum value expected";
2945
+ case 0:
2946
+ case 1:
2947
+ case 2:
2948
+ case 3:
2949
+ case 4:
2950
+ case 5:
2951
+ case 6:
2952
+ case 7:
2953
+ break;
2954
+ }
2955
+ if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup"))
2956
+ if (!$util.isString(message.resourceGroup))
2957
+ return "resourceGroup: string expected";
2958
+ if (message.namespace != null && message.hasOwnProperty("namespace"))
2959
+ if (!$util.isString(message.namespace))
2960
+ return "namespace: string expected";
2961
+ if (message.eventHub != null && message.hasOwnProperty("eventHub"))
2962
+ if (!$util.isString(message.eventHub))
2963
+ return "eventHub: string expected";
2964
+ if (message.clientId != null && message.hasOwnProperty("clientId"))
2965
+ if (!$util.isString(message.clientId))
2966
+ return "clientId: string expected";
2967
+ if (message.tenantId != null && message.hasOwnProperty("tenantId"))
2968
+ if (!$util.isString(message.tenantId))
2969
+ return "tenantId: string expected";
2970
+ if (message.subscriptionId != null && message.hasOwnProperty("subscriptionId"))
2971
+ if (!$util.isString(message.subscriptionId))
2972
+ return "subscriptionId: string expected";
2973
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
2974
+ if (!$util.isString(message.gcpServiceAccount))
2975
+ return "gcpServiceAccount: string expected";
2976
+ return null;
2977
+ };
2978
+
2979
+ /**
2980
+ * Creates an AzureEventHubs message from a plain object. Also converts values to their respective internal types.
2981
+ * @function fromObject
2982
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
2983
+ * @static
2984
+ * @param {Object.<string,*>} object Plain object
2985
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs
2986
+ */
2987
+ AzureEventHubs.fromObject = function fromObject(object) {
2988
+ if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs)
2989
+ return object;
2990
+ var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs();
2991
+ switch (object.state) {
2992
+ default:
2993
+ if (typeof object.state === "number") {
2994
+ message.state = object.state;
2995
+ break;
2996
+ }
2997
+ break;
2998
+ case "STATE_UNSPECIFIED":
2999
+ case 0:
3000
+ message.state = 0;
3001
+ break;
3002
+ case "ACTIVE":
3003
+ case 1:
3004
+ message.state = 1;
3005
+ break;
3006
+ case "EVENT_HUBS_PERMISSION_DENIED":
3007
+ case 2:
3008
+ message.state = 2;
3009
+ break;
3010
+ case "PUBLISH_PERMISSION_DENIED":
3011
+ case 3:
3012
+ message.state = 3;
3013
+ break;
3014
+ case "NAMESPACE_NOT_FOUND":
3015
+ case 4:
3016
+ message.state = 4;
3017
+ break;
3018
+ case "EVENT_HUB_NOT_FOUND":
3019
+ case 5:
3020
+ message.state = 5;
3021
+ break;
3022
+ case "SUBSCRIPTION_NOT_FOUND":
3023
+ case 6:
3024
+ message.state = 6;
3025
+ break;
3026
+ case "RESOURCE_GROUP_NOT_FOUND":
3027
+ case 7:
3028
+ message.state = 7;
3029
+ break;
3030
+ }
3031
+ if (object.resourceGroup != null)
3032
+ message.resourceGroup = String(object.resourceGroup);
3033
+ if (object.namespace != null)
3034
+ message.namespace = String(object.namespace);
3035
+ if (object.eventHub != null)
3036
+ message.eventHub = String(object.eventHub);
3037
+ if (object.clientId != null)
3038
+ message.clientId = String(object.clientId);
3039
+ if (object.tenantId != null)
3040
+ message.tenantId = String(object.tenantId);
3041
+ if (object.subscriptionId != null)
3042
+ message.subscriptionId = String(object.subscriptionId);
3043
+ if (object.gcpServiceAccount != null)
3044
+ message.gcpServiceAccount = String(object.gcpServiceAccount);
3045
+ return message;
3046
+ };
3047
+
3048
+ /**
3049
+ * Creates a plain object from an AzureEventHubs message. Also converts values to other types if specified.
3050
+ * @function toObject
3051
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
3052
+ * @static
3053
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} message AzureEventHubs
3054
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3055
+ * @returns {Object.<string,*>} Plain object
3056
+ */
3057
+ AzureEventHubs.toObject = function toObject(message, options) {
3058
+ if (!options)
3059
+ options = {};
3060
+ var object = {};
3061
+ if (options.defaults) {
3062
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
3063
+ object.resourceGroup = "";
3064
+ object.namespace = "";
3065
+ object.eventHub = "";
3066
+ object.clientId = "";
3067
+ object.tenantId = "";
3068
+ object.subscriptionId = "";
3069
+ object.gcpServiceAccount = "";
3070
+ }
3071
+ if (message.state != null && message.hasOwnProperty("state"))
3072
+ object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] : message.state;
3073
+ if (message.resourceGroup != null && message.hasOwnProperty("resourceGroup"))
3074
+ object.resourceGroup = message.resourceGroup;
3075
+ if (message.namespace != null && message.hasOwnProperty("namespace"))
3076
+ object.namespace = message.namespace;
3077
+ if (message.eventHub != null && message.hasOwnProperty("eventHub"))
3078
+ object.eventHub = message.eventHub;
3079
+ if (message.clientId != null && message.hasOwnProperty("clientId"))
3080
+ object.clientId = message.clientId;
3081
+ if (message.tenantId != null && message.hasOwnProperty("tenantId"))
3082
+ object.tenantId = message.tenantId;
3083
+ if (message.subscriptionId != null && message.hasOwnProperty("subscriptionId"))
3084
+ object.subscriptionId = message.subscriptionId;
3085
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
3086
+ object.gcpServiceAccount = message.gcpServiceAccount;
3087
+ return object;
3088
+ };
3089
+
3090
+ /**
3091
+ * Converts this AzureEventHubs to JSON.
3092
+ * @function toJSON
3093
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
3094
+ * @instance
3095
+ * @returns {Object.<string,*>} JSON object
3096
+ */
3097
+ AzureEventHubs.prototype.toJSON = function toJSON() {
3098
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3099
+ };
3100
+
3101
+ /**
3102
+ * Gets the default type url for AzureEventHubs
3103
+ * @function getTypeUrl
3104
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs
3105
+ * @static
3106
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3107
+ * @returns {string} The default type url
3108
+ */
3109
+ AzureEventHubs.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3110
+ if (typeUrlPrefix === undefined) {
3111
+ typeUrlPrefix = "type.googleapis.com";
3112
+ }
3113
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs";
3114
+ };
3115
+
3116
+ /**
3117
+ * State enum.
3118
+ * @name google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State
3119
+ * @enum {number}
3120
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
3121
+ * @property {number} ACTIVE=1 ACTIVE value
3122
+ * @property {number} EVENT_HUBS_PERMISSION_DENIED=2 EVENT_HUBS_PERMISSION_DENIED value
3123
+ * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value
3124
+ * @property {number} NAMESPACE_NOT_FOUND=4 NAMESPACE_NOT_FOUND value
3125
+ * @property {number} EVENT_HUB_NOT_FOUND=5 EVENT_HUB_NOT_FOUND value
3126
+ * @property {number} SUBSCRIPTION_NOT_FOUND=6 SUBSCRIPTION_NOT_FOUND value
3127
+ * @property {number} RESOURCE_GROUP_NOT_FOUND=7 RESOURCE_GROUP_NOT_FOUND value
3128
+ */
3129
+ AzureEventHubs.State = (function() {
3130
+ var valuesById = {}, values = Object.create(valuesById);
3131
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
3132
+ values[valuesById[1] = "ACTIVE"] = 1;
3133
+ values[valuesById[2] = "EVENT_HUBS_PERMISSION_DENIED"] = 2;
3134
+ values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3;
3135
+ values[valuesById[4] = "NAMESPACE_NOT_FOUND"] = 4;
3136
+ values[valuesById[5] = "EVENT_HUB_NOT_FOUND"] = 5;
3137
+ values[valuesById[6] = "SUBSCRIPTION_NOT_FOUND"] = 6;
3138
+ values[valuesById[7] = "RESOURCE_GROUP_NOT_FOUND"] = 7;
3139
+ return values;
3140
+ })();
3141
+
3142
+ return AzureEventHubs;
3143
+ })();
3144
+
3145
+ IngestionDataSourceSettings.AwsMsk = (function() {
3146
+
3147
+ /**
3148
+ * Properties of an AwsMsk.
3149
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
3150
+ * @interface IAwsMsk
3151
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|null} [state] AwsMsk state
3152
+ * @property {string|null} [clusterArn] AwsMsk clusterArn
3153
+ * @property {string|null} [topic] AwsMsk topic
3154
+ * @property {string|null} [awsRoleArn] AwsMsk awsRoleArn
3155
+ * @property {string|null} [gcpServiceAccount] AwsMsk gcpServiceAccount
3156
+ */
3157
+
3158
+ /**
3159
+ * Constructs a new AwsMsk.
3160
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
3161
+ * @classdesc Represents an AwsMsk.
3162
+ * @implements IAwsMsk
3163
+ * @constructor
3164
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set
3165
+ */
3166
+ function AwsMsk(properties) {
3167
+ if (properties)
3168
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3169
+ if (properties[keys[i]] != null)
3170
+ this[keys[i]] = properties[keys[i]];
3171
+ }
3172
+
3173
+ /**
3174
+ * AwsMsk state.
3175
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State} state
3176
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3177
+ * @instance
3178
+ */
3179
+ AwsMsk.prototype.state = 0;
3180
+
3181
+ /**
3182
+ * AwsMsk clusterArn.
3183
+ * @member {string} clusterArn
3184
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3185
+ * @instance
3186
+ */
3187
+ AwsMsk.prototype.clusterArn = "";
3188
+
3189
+ /**
3190
+ * AwsMsk topic.
3191
+ * @member {string} topic
3192
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3193
+ * @instance
3194
+ */
3195
+ AwsMsk.prototype.topic = "";
3196
+
3197
+ /**
3198
+ * AwsMsk awsRoleArn.
3199
+ * @member {string} awsRoleArn
3200
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3201
+ * @instance
3202
+ */
3203
+ AwsMsk.prototype.awsRoleArn = "";
3204
+
3205
+ /**
3206
+ * AwsMsk gcpServiceAccount.
3207
+ * @member {string} gcpServiceAccount
3208
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3209
+ * @instance
3210
+ */
3211
+ AwsMsk.prototype.gcpServiceAccount = "";
3212
+
3213
+ /**
3214
+ * Creates a new AwsMsk instance using the specified properties.
3215
+ * @function create
3216
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3217
+ * @static
3218
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set
3219
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk instance
3220
+ */
3221
+ AwsMsk.create = function create(properties) {
3222
+ return new AwsMsk(properties);
3223
+ };
3224
+
3225
+ /**
3226
+ * Encodes the specified AwsMsk message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages.
3227
+ * @function encode
3228
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3229
+ * @static
3230
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode
3231
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3232
+ * @returns {$protobuf.Writer} Writer
3233
+ */
3234
+ AwsMsk.encode = function encode(message, writer) {
3235
+ if (!writer)
3236
+ writer = $Writer.create();
3237
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
3238
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
3239
+ if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn"))
3240
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterArn);
3241
+ if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
3242
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.topic);
3243
+ if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn"))
3244
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRoleArn);
3245
+ if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount"))
3246
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcpServiceAccount);
3247
+ return writer;
3248
+ };
3249
+
3250
+ /**
3251
+ * Encodes the specified AwsMsk message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages.
3252
+ * @function encodeDelimited
3253
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3254
+ * @static
3255
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode
3256
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3257
+ * @returns {$protobuf.Writer} Writer
3258
+ */
3259
+ AwsMsk.encodeDelimited = function encodeDelimited(message, writer) {
3260
+ return this.encode(message, writer).ldelim();
3261
+ };
3262
+
3263
+ /**
3264
+ * Decodes an AwsMsk message from the specified reader or buffer.
3265
+ * @function decode
3266
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3267
+ * @static
3268
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3269
+ * @param {number} [length] Message length if known beforehand
3270
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk
3271
+ * @throws {Error} If the payload is not a reader or valid buffer
3272
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3273
+ */
3274
+ AwsMsk.decode = function decode(reader, length) {
3275
+ if (!(reader instanceof $Reader))
3276
+ reader = $Reader.create(reader);
3277
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk();
3278
+ while (reader.pos < end) {
3279
+ var tag = reader.uint32();
3280
+ switch (tag >>> 3) {
3281
+ case 1: {
3282
+ message.state = reader.int32();
3283
+ break;
3284
+ }
3285
+ case 2: {
3286
+ message.clusterArn = reader.string();
3287
+ break;
3288
+ }
3289
+ case 3: {
3290
+ message.topic = reader.string();
3291
+ break;
3292
+ }
3293
+ case 4: {
3294
+ message.awsRoleArn = reader.string();
3295
+ break;
3296
+ }
3297
+ case 5: {
3298
+ message.gcpServiceAccount = reader.string();
3299
+ break;
3300
+ }
3301
+ default:
3302
+ reader.skipType(tag & 7);
3303
+ break;
3304
+ }
3305
+ }
3306
+ return message;
3307
+ };
3308
+
3309
+ /**
3310
+ * Decodes an AwsMsk message from the specified reader or buffer, length delimited.
3311
+ * @function decodeDelimited
3312
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3313
+ * @static
3314
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3315
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk
3316
+ * @throws {Error} If the payload is not a reader or valid buffer
3317
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3318
+ */
3319
+ AwsMsk.decodeDelimited = function decodeDelimited(reader) {
3320
+ if (!(reader instanceof $Reader))
3321
+ reader = new $Reader(reader);
3322
+ return this.decode(reader, reader.uint32());
3323
+ };
3324
+
3325
+ /**
3326
+ * Verifies an AwsMsk message.
3327
+ * @function verify
3328
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3329
+ * @static
3330
+ * @param {Object.<string,*>} message Plain object to verify
3331
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3332
+ */
3333
+ AwsMsk.verify = function verify(message) {
3334
+ if (typeof message !== "object" || message === null)
3335
+ return "object expected";
3336
+ if (message.state != null && message.hasOwnProperty("state"))
3337
+ switch (message.state) {
3338
+ default:
3339
+ return "state: enum value expected";
3340
+ case 0:
3341
+ case 1:
3342
+ case 2:
3343
+ case 3:
3344
+ case 4:
3345
+ case 5:
3346
+ break;
3347
+ }
3348
+ if (message.clusterArn != null && message.hasOwnProperty("clusterArn"))
3349
+ if (!$util.isString(message.clusterArn))
3350
+ return "clusterArn: string expected";
3351
+ if (message.topic != null && message.hasOwnProperty("topic"))
3352
+ if (!$util.isString(message.topic))
3353
+ return "topic: string expected";
3354
+ if (message.awsRoleArn != null && message.hasOwnProperty("awsRoleArn"))
3355
+ if (!$util.isString(message.awsRoleArn))
3356
+ return "awsRoleArn: string expected";
3357
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
3358
+ if (!$util.isString(message.gcpServiceAccount))
3359
+ return "gcpServiceAccount: string expected";
3360
+ return null;
3361
+ };
3362
+
3363
+ /**
3364
+ * Creates an AwsMsk message from a plain object. Also converts values to their respective internal types.
3365
+ * @function fromObject
3366
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3367
+ * @static
3368
+ * @param {Object.<string,*>} object Plain object
3369
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk
3370
+ */
3371
+ AwsMsk.fromObject = function fromObject(object) {
3372
+ if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk)
3373
+ return object;
3374
+ var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk();
3375
+ switch (object.state) {
3376
+ default:
3377
+ if (typeof object.state === "number") {
3378
+ message.state = object.state;
3379
+ break;
3380
+ }
3381
+ break;
3382
+ case "STATE_UNSPECIFIED":
3383
+ case 0:
3384
+ message.state = 0;
3385
+ break;
3386
+ case "ACTIVE":
3387
+ case 1:
3388
+ message.state = 1;
3389
+ break;
3390
+ case "MSK_PERMISSION_DENIED":
3391
+ case 2:
3392
+ message.state = 2;
3393
+ break;
3394
+ case "PUBLISH_PERMISSION_DENIED":
3395
+ case 3:
3396
+ message.state = 3;
3397
+ break;
3398
+ case "CLUSTER_NOT_FOUND":
3399
+ case 4:
3400
+ message.state = 4;
3401
+ break;
3402
+ case "TOPIC_NOT_FOUND":
3403
+ case 5:
3404
+ message.state = 5;
3405
+ break;
3406
+ }
3407
+ if (object.clusterArn != null)
3408
+ message.clusterArn = String(object.clusterArn);
3409
+ if (object.topic != null)
3410
+ message.topic = String(object.topic);
3411
+ if (object.awsRoleArn != null)
3412
+ message.awsRoleArn = String(object.awsRoleArn);
3413
+ if (object.gcpServiceAccount != null)
3414
+ message.gcpServiceAccount = String(object.gcpServiceAccount);
3415
+ return message;
3416
+ };
3417
+
3418
+ /**
3419
+ * Creates a plain object from an AwsMsk message. Also converts values to other types if specified.
3420
+ * @function toObject
3421
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3422
+ * @static
3423
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} message AwsMsk
3424
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3425
+ * @returns {Object.<string,*>} Plain object
3426
+ */
3427
+ AwsMsk.toObject = function toObject(message, options) {
3428
+ if (!options)
3429
+ options = {};
3430
+ var object = {};
3431
+ if (options.defaults) {
3432
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
3433
+ object.clusterArn = "";
3434
+ object.topic = "";
3435
+ object.awsRoleArn = "";
3436
+ object.gcpServiceAccount = "";
3437
+ }
3438
+ if (message.state != null && message.hasOwnProperty("state"))
3439
+ object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] : message.state;
3440
+ if (message.clusterArn != null && message.hasOwnProperty("clusterArn"))
3441
+ object.clusterArn = message.clusterArn;
3442
+ if (message.topic != null && message.hasOwnProperty("topic"))
3443
+ object.topic = message.topic;
3444
+ if (message.awsRoleArn != null && message.hasOwnProperty("awsRoleArn"))
3445
+ object.awsRoleArn = message.awsRoleArn;
3446
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
3447
+ object.gcpServiceAccount = message.gcpServiceAccount;
3448
+ return object;
3449
+ };
3450
+
3451
+ /**
3452
+ * Converts this AwsMsk to JSON.
3453
+ * @function toJSON
3454
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3455
+ * @instance
3456
+ * @returns {Object.<string,*>} JSON object
3457
+ */
3458
+ AwsMsk.prototype.toJSON = function toJSON() {
3459
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3460
+ };
3461
+
3462
+ /**
3463
+ * Gets the default type url for AwsMsk
3464
+ * @function getTypeUrl
3465
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk
3466
+ * @static
3467
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3468
+ * @returns {string} The default type url
3469
+ */
3470
+ AwsMsk.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3471
+ if (typeUrlPrefix === undefined) {
3472
+ typeUrlPrefix = "type.googleapis.com";
3473
+ }
3474
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AwsMsk";
3475
+ };
3476
+
3477
+ /**
3478
+ * State enum.
3479
+ * @name google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State
3480
+ * @enum {number}
3481
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
3482
+ * @property {number} ACTIVE=1 ACTIVE value
3483
+ * @property {number} MSK_PERMISSION_DENIED=2 MSK_PERMISSION_DENIED value
3484
+ * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value
3485
+ * @property {number} CLUSTER_NOT_FOUND=4 CLUSTER_NOT_FOUND value
3486
+ * @property {number} TOPIC_NOT_FOUND=5 TOPIC_NOT_FOUND value
3487
+ */
3488
+ AwsMsk.State = (function() {
3489
+ var valuesById = {}, values = Object.create(valuesById);
3490
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
3491
+ values[valuesById[1] = "ACTIVE"] = 1;
3492
+ values[valuesById[2] = "MSK_PERMISSION_DENIED"] = 2;
3493
+ values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3;
3494
+ values[valuesById[4] = "CLUSTER_NOT_FOUND"] = 4;
3495
+ values[valuesById[5] = "TOPIC_NOT_FOUND"] = 5;
3496
+ return values;
3497
+ })();
3498
+
3499
+ return AwsMsk;
3500
+ })();
3501
+
3502
+ IngestionDataSourceSettings.ConfluentCloud = (function() {
3503
+
3504
+ /**
3505
+ * Properties of a ConfluentCloud.
3506
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
3507
+ * @interface IConfluentCloud
3508
+ * @property {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|null} [state] ConfluentCloud state
3509
+ * @property {string|null} [bootstrapServer] ConfluentCloud bootstrapServer
3510
+ * @property {string|null} [clusterId] ConfluentCloud clusterId
3511
+ * @property {string|null} [topic] ConfluentCloud topic
3512
+ * @property {string|null} [identityPoolId] ConfluentCloud identityPoolId
3513
+ * @property {string|null} [gcpServiceAccount] ConfluentCloud gcpServiceAccount
3514
+ */
3515
+
3516
+ /**
3517
+ * Constructs a new ConfluentCloud.
3518
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings
3519
+ * @classdesc Represents a ConfluentCloud.
3520
+ * @implements IConfluentCloud
3521
+ * @constructor
3522
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set
3523
+ */
3524
+ function ConfluentCloud(properties) {
3525
+ if (properties)
3526
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3527
+ if (properties[keys[i]] != null)
3528
+ this[keys[i]] = properties[keys[i]];
3529
+ }
3530
+
3531
+ /**
3532
+ * ConfluentCloud state.
3533
+ * @member {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State} state
3534
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3535
+ * @instance
3536
+ */
3537
+ ConfluentCloud.prototype.state = 0;
3538
+
3539
+ /**
3540
+ * ConfluentCloud bootstrapServer.
3541
+ * @member {string} bootstrapServer
3542
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3543
+ * @instance
3544
+ */
3545
+ ConfluentCloud.prototype.bootstrapServer = "";
3546
+
3547
+ /**
3548
+ * ConfluentCloud clusterId.
3549
+ * @member {string} clusterId
3550
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3551
+ * @instance
3552
+ */
3553
+ ConfluentCloud.prototype.clusterId = "";
3554
+
3555
+ /**
3556
+ * ConfluentCloud topic.
3557
+ * @member {string} topic
3558
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3559
+ * @instance
3560
+ */
3561
+ ConfluentCloud.prototype.topic = "";
3562
+
3563
+ /**
3564
+ * ConfluentCloud identityPoolId.
3565
+ * @member {string} identityPoolId
3566
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3567
+ * @instance
3568
+ */
3569
+ ConfluentCloud.prototype.identityPoolId = "";
3570
+
3571
+ /**
3572
+ * ConfluentCloud gcpServiceAccount.
3573
+ * @member {string} gcpServiceAccount
3574
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3575
+ * @instance
3576
+ */
3577
+ ConfluentCloud.prototype.gcpServiceAccount = "";
3578
+
3579
+ /**
3580
+ * Creates a new ConfluentCloud instance using the specified properties.
3581
+ * @function create
3582
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3583
+ * @static
3584
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set
3585
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud instance
3586
+ */
3587
+ ConfluentCloud.create = function create(properties) {
3588
+ return new ConfluentCloud(properties);
3589
+ };
3590
+
3591
+ /**
3592
+ * Encodes the specified ConfluentCloud message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages.
3593
+ * @function encode
3594
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3595
+ * @static
3596
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode
3597
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3598
+ * @returns {$protobuf.Writer} Writer
3599
+ */
3600
+ ConfluentCloud.encode = function encode(message, writer) {
3601
+ if (!writer)
3602
+ writer = $Writer.create();
3603
+ if (message.state != null && Object.hasOwnProperty.call(message, "state"))
3604
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
3605
+ if (message.bootstrapServer != null && Object.hasOwnProperty.call(message, "bootstrapServer"))
3606
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.bootstrapServer);
3607
+ if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId"))
3608
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId);
3609
+ if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
3610
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.topic);
3611
+ if (message.identityPoolId != null && Object.hasOwnProperty.call(message, "identityPoolId"))
3612
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.identityPoolId);
3613
+ if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount"))
3614
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.gcpServiceAccount);
3615
+ return writer;
3616
+ };
3617
+
3618
+ /**
3619
+ * Encodes the specified ConfluentCloud message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages.
3620
+ * @function encodeDelimited
3621
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3622
+ * @static
3623
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode
3624
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3625
+ * @returns {$protobuf.Writer} Writer
3626
+ */
3627
+ ConfluentCloud.encodeDelimited = function encodeDelimited(message, writer) {
3628
+ return this.encode(message, writer).ldelim();
3629
+ };
3630
+
3631
+ /**
3632
+ * Decodes a ConfluentCloud message from the specified reader or buffer.
3633
+ * @function decode
3634
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3635
+ * @static
3636
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3637
+ * @param {number} [length] Message length if known beforehand
3638
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud
3639
+ * @throws {Error} If the payload is not a reader or valid buffer
3640
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3641
+ */
3642
+ ConfluentCloud.decode = function decode(reader, length) {
3643
+ if (!(reader instanceof $Reader))
3644
+ reader = $Reader.create(reader);
3645
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud();
3646
+ while (reader.pos < end) {
3647
+ var tag = reader.uint32();
3648
+ switch (tag >>> 3) {
3649
+ case 1: {
3650
+ message.state = reader.int32();
3651
+ break;
3652
+ }
3653
+ case 2: {
3654
+ message.bootstrapServer = reader.string();
3655
+ break;
3656
+ }
3657
+ case 3: {
3658
+ message.clusterId = reader.string();
3659
+ break;
3660
+ }
3661
+ case 4: {
3662
+ message.topic = reader.string();
3663
+ break;
3664
+ }
3665
+ case 5: {
3666
+ message.identityPoolId = reader.string();
3667
+ break;
3668
+ }
3669
+ case 6: {
3670
+ message.gcpServiceAccount = reader.string();
3671
+ break;
3672
+ }
3673
+ default:
3674
+ reader.skipType(tag & 7);
3675
+ break;
3676
+ }
3677
+ }
3678
+ return message;
3679
+ };
3680
+
3681
+ /**
3682
+ * Decodes a ConfluentCloud message from the specified reader or buffer, length delimited.
3683
+ * @function decodeDelimited
3684
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3685
+ * @static
3686
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3687
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud
3688
+ * @throws {Error} If the payload is not a reader or valid buffer
3689
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3690
+ */
3691
+ ConfluentCloud.decodeDelimited = function decodeDelimited(reader) {
3692
+ if (!(reader instanceof $Reader))
3693
+ reader = new $Reader(reader);
3694
+ return this.decode(reader, reader.uint32());
3695
+ };
3696
+
3697
+ /**
3698
+ * Verifies a ConfluentCloud message.
3699
+ * @function verify
3700
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3701
+ * @static
3702
+ * @param {Object.<string,*>} message Plain object to verify
3703
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
3704
+ */
3705
+ ConfluentCloud.verify = function verify(message) {
3706
+ if (typeof message !== "object" || message === null)
3707
+ return "object expected";
3708
+ if (message.state != null && message.hasOwnProperty("state"))
3709
+ switch (message.state) {
3710
+ default:
3711
+ return "state: enum value expected";
3712
+ case 0:
3713
+ case 1:
3714
+ case 2:
3715
+ case 3:
3716
+ case 4:
3717
+ case 5:
3718
+ case 6:
3719
+ break;
3720
+ }
3721
+ if (message.bootstrapServer != null && message.hasOwnProperty("bootstrapServer"))
3722
+ if (!$util.isString(message.bootstrapServer))
3723
+ return "bootstrapServer: string expected";
3724
+ if (message.clusterId != null && message.hasOwnProperty("clusterId"))
3725
+ if (!$util.isString(message.clusterId))
3726
+ return "clusterId: string expected";
3727
+ if (message.topic != null && message.hasOwnProperty("topic"))
3728
+ if (!$util.isString(message.topic))
3729
+ return "topic: string expected";
3730
+ if (message.identityPoolId != null && message.hasOwnProperty("identityPoolId"))
3731
+ if (!$util.isString(message.identityPoolId))
3732
+ return "identityPoolId: string expected";
3733
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
3734
+ if (!$util.isString(message.gcpServiceAccount))
3735
+ return "gcpServiceAccount: string expected";
3736
+ return null;
3737
+ };
3738
+
3739
+ /**
3740
+ * Creates a ConfluentCloud message from a plain object. Also converts values to their respective internal types.
3741
+ * @function fromObject
3742
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3743
+ * @static
3744
+ * @param {Object.<string,*>} object Plain object
3745
+ * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud
3746
+ */
3747
+ ConfluentCloud.fromObject = function fromObject(object) {
3748
+ if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud)
3749
+ return object;
3750
+ var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud();
3751
+ switch (object.state) {
3752
+ default:
3753
+ if (typeof object.state === "number") {
3754
+ message.state = object.state;
3755
+ break;
3756
+ }
3757
+ break;
3758
+ case "STATE_UNSPECIFIED":
3759
+ case 0:
3760
+ message.state = 0;
3761
+ break;
3762
+ case "ACTIVE":
3763
+ case 1:
3764
+ message.state = 1;
3765
+ break;
3766
+ case "CONFLUENT_CLOUD_PERMISSION_DENIED":
3767
+ case 2:
3768
+ message.state = 2;
3769
+ break;
3770
+ case "PUBLISH_PERMISSION_DENIED":
3771
+ case 3:
3772
+ message.state = 3;
3773
+ break;
3774
+ case "UNREACHABLE_BOOTSTRAP_SERVER":
3775
+ case 4:
3776
+ message.state = 4;
3777
+ break;
3778
+ case "CLUSTER_NOT_FOUND":
3779
+ case 5:
3780
+ message.state = 5;
3781
+ break;
3782
+ case "TOPIC_NOT_FOUND":
3783
+ case 6:
3784
+ message.state = 6;
3785
+ break;
3786
+ }
3787
+ if (object.bootstrapServer != null)
3788
+ message.bootstrapServer = String(object.bootstrapServer);
3789
+ if (object.clusterId != null)
3790
+ message.clusterId = String(object.clusterId);
3791
+ if (object.topic != null)
3792
+ message.topic = String(object.topic);
3793
+ if (object.identityPoolId != null)
3794
+ message.identityPoolId = String(object.identityPoolId);
3795
+ if (object.gcpServiceAccount != null)
3796
+ message.gcpServiceAccount = String(object.gcpServiceAccount);
3797
+ return message;
3798
+ };
3799
+
3800
+ /**
3801
+ * Creates a plain object from a ConfluentCloud message. Also converts values to other types if specified.
3802
+ * @function toObject
3803
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3804
+ * @static
3805
+ * @param {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} message ConfluentCloud
3806
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
3807
+ * @returns {Object.<string,*>} Plain object
3808
+ */
3809
+ ConfluentCloud.toObject = function toObject(message, options) {
3810
+ if (!options)
3811
+ options = {};
3812
+ var object = {};
3813
+ if (options.defaults) {
3814
+ object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
3815
+ object.bootstrapServer = "";
3816
+ object.clusterId = "";
3817
+ object.topic = "";
3818
+ object.identityPoolId = "";
3819
+ object.gcpServiceAccount = "";
3820
+ }
3821
+ if (message.state != null && message.hasOwnProperty("state"))
3822
+ object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] : message.state;
3823
+ if (message.bootstrapServer != null && message.hasOwnProperty("bootstrapServer"))
3824
+ object.bootstrapServer = message.bootstrapServer;
3825
+ if (message.clusterId != null && message.hasOwnProperty("clusterId"))
3826
+ object.clusterId = message.clusterId;
3827
+ if (message.topic != null && message.hasOwnProperty("topic"))
3828
+ object.topic = message.topic;
3829
+ if (message.identityPoolId != null && message.hasOwnProperty("identityPoolId"))
3830
+ object.identityPoolId = message.identityPoolId;
3831
+ if (message.gcpServiceAccount != null && message.hasOwnProperty("gcpServiceAccount"))
3832
+ object.gcpServiceAccount = message.gcpServiceAccount;
3833
+ return object;
3834
+ };
3835
+
3836
+ /**
3837
+ * Converts this ConfluentCloud to JSON.
3838
+ * @function toJSON
3839
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3840
+ * @instance
3841
+ * @returns {Object.<string,*>} JSON object
3842
+ */
3843
+ ConfluentCloud.prototype.toJSON = function toJSON() {
3844
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3845
+ };
3846
+
3847
+ /**
3848
+ * Gets the default type url for ConfluentCloud
3849
+ * @function getTypeUrl
3850
+ * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud
3851
+ * @static
3852
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3853
+ * @returns {string} The default type url
3854
+ */
3855
+ ConfluentCloud.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3856
+ if (typeUrlPrefix === undefined) {
3857
+ typeUrlPrefix = "type.googleapis.com";
3858
+ }
3859
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud";
3860
+ };
3861
+
3862
+ /**
3863
+ * State enum.
3864
+ * @name google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State
3865
+ * @enum {number}
3866
+ * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
3867
+ * @property {number} ACTIVE=1 ACTIVE value
3868
+ * @property {number} CONFLUENT_CLOUD_PERMISSION_DENIED=2 CONFLUENT_CLOUD_PERMISSION_DENIED value
3869
+ * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value
3870
+ * @property {number} UNREACHABLE_BOOTSTRAP_SERVER=4 UNREACHABLE_BOOTSTRAP_SERVER value
3871
+ * @property {number} CLUSTER_NOT_FOUND=5 CLUSTER_NOT_FOUND value
3872
+ * @property {number} TOPIC_NOT_FOUND=6 TOPIC_NOT_FOUND value
3873
+ */
3874
+ ConfluentCloud.State = (function() {
3875
+ var valuesById = {}, values = Object.create(valuesById);
3876
+ values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
3877
+ values[valuesById[1] = "ACTIVE"] = 1;
3878
+ values[valuesById[2] = "CONFLUENT_CLOUD_PERMISSION_DENIED"] = 2;
3879
+ values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3;
3880
+ values[valuesById[4] = "UNREACHABLE_BOOTSTRAP_SERVER"] = 4;
3881
+ values[valuesById[5] = "CLUSTER_NOT_FOUND"] = 5;
3882
+ values[valuesById[6] = "TOPIC_NOT_FOUND"] = 6;
3883
+ return values;
3884
+ })();
3885
+
3886
+ return ConfluentCloud;
3887
+ })();
3888
+
3889
+ return IngestionDataSourceSettings;
3890
+ })();
3891
+
3892
+ v1.PlatformLogsSettings = (function() {
3893
+
3894
+ /**
3895
+ * Properties of a PlatformLogsSettings.
3896
+ * @memberof google.pubsub.v1
3897
+ * @interface IPlatformLogsSettings
3898
+ * @property {google.pubsub.v1.PlatformLogsSettings.Severity|null} [severity] PlatformLogsSettings severity
3899
+ */
3900
+
3901
+ /**
3902
+ * Constructs a new PlatformLogsSettings.
3903
+ * @memberof google.pubsub.v1
3904
+ * @classdesc Represents a PlatformLogsSettings.
3905
+ * @implements IPlatformLogsSettings
3906
+ * @constructor
3907
+ * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set
3908
+ */
3909
+ function PlatformLogsSettings(properties) {
3910
+ if (properties)
3911
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3912
+ if (properties[keys[i]] != null)
3913
+ this[keys[i]] = properties[keys[i]];
3914
+ }
3915
+
3916
+ /**
3917
+ * PlatformLogsSettings severity.
3918
+ * @member {google.pubsub.v1.PlatformLogsSettings.Severity} severity
3919
+ * @memberof google.pubsub.v1.PlatformLogsSettings
3920
+ * @instance
3921
+ */
3922
+ PlatformLogsSettings.prototype.severity = 0;
3923
+
3924
+ /**
3925
+ * Creates a new PlatformLogsSettings instance using the specified properties.
3926
+ * @function create
3927
+ * @memberof google.pubsub.v1.PlatformLogsSettings
3928
+ * @static
3929
+ * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set
3930
+ * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings instance
3931
+ */
3932
+ PlatformLogsSettings.create = function create(properties) {
3933
+ return new PlatformLogsSettings(properties);
3934
+ };
3935
+
3936
+ /**
3937
+ * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages.
3938
+ * @function encode
3939
+ * @memberof google.pubsub.v1.PlatformLogsSettings
3940
+ * @static
3941
+ * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode
3942
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3943
+ * @returns {$protobuf.Writer} Writer
3944
+ */
3945
+ PlatformLogsSettings.encode = function encode(message, writer) {
3946
+ if (!writer)
3947
+ writer = $Writer.create();
3948
+ if (message.severity != null && Object.hasOwnProperty.call(message, "severity"))
3949
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity);
3950
+ return writer;
3951
+ };
3952
+
3953
+ /**
3954
+ * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages.
3955
+ * @function encodeDelimited
3956
+ * @memberof google.pubsub.v1.PlatformLogsSettings
3957
+ * @static
3958
+ * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode
3959
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3960
+ * @returns {$protobuf.Writer} Writer
3961
+ */
3962
+ PlatformLogsSettings.encodeDelimited = function encodeDelimited(message, writer) {
3963
+ return this.encode(message, writer).ldelim();
3964
+ };
3965
+
3966
+ /**
3967
+ * Decodes a PlatformLogsSettings message from the specified reader or buffer.
3968
+ * @function decode
3969
+ * @memberof google.pubsub.v1.PlatformLogsSettings
3970
+ * @static
3971
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3972
+ * @param {number} [length] Message length if known beforehand
3973
+ * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
3974
+ * @throws {Error} If the payload is not a reader or valid buffer
3975
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3976
+ */
3977
+ PlatformLogsSettings.decode = function decode(reader, length) {
3978
+ if (!(reader instanceof $Reader))
3979
+ reader = $Reader.create(reader);
3980
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PlatformLogsSettings();
3981
+ while (reader.pos < end) {
3982
+ var tag = reader.uint32();
3983
+ switch (tag >>> 3) {
3984
+ case 1: {
3985
+ message.severity = reader.int32();
3986
+ break;
3987
+ }
3988
+ default:
3989
+ reader.skipType(tag & 7);
3990
+ break;
3991
+ }
3992
+ }
3993
+ return message;
3994
+ };
3995
+
3996
+ /**
3997
+ * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited.
3998
+ * @function decodeDelimited
3999
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4000
+ * @static
4001
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4002
+ * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
4003
+ * @throws {Error} If the payload is not a reader or valid buffer
4004
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4005
+ */
4006
+ PlatformLogsSettings.decodeDelimited = function decodeDelimited(reader) {
4007
+ if (!(reader instanceof $Reader))
4008
+ reader = new $Reader(reader);
4009
+ return this.decode(reader, reader.uint32());
4010
+ };
4011
+
4012
+ /**
4013
+ * Verifies a PlatformLogsSettings message.
4014
+ * @function verify
4015
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4016
+ * @static
4017
+ * @param {Object.<string,*>} message Plain object to verify
4018
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4019
+ */
4020
+ PlatformLogsSettings.verify = function verify(message) {
4021
+ if (typeof message !== "object" || message === null)
4022
+ return "object expected";
4023
+ if (message.severity != null && message.hasOwnProperty("severity"))
4024
+ switch (message.severity) {
4025
+ default:
4026
+ return "severity: enum value expected";
4027
+ case 0:
4028
+ case 1:
4029
+ case 2:
4030
+ case 3:
4031
+ case 4:
4032
+ case 5:
4033
+ break;
4034
+ }
4035
+ return null;
4036
+ };
4037
+
4038
+ /**
4039
+ * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types.
4040
+ * @function fromObject
4041
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4042
+ * @static
4043
+ * @param {Object.<string,*>} object Plain object
4044
+ * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings
4045
+ */
4046
+ PlatformLogsSettings.fromObject = function fromObject(object) {
4047
+ if (object instanceof $root.google.pubsub.v1.PlatformLogsSettings)
4048
+ return object;
4049
+ var message = new $root.google.pubsub.v1.PlatformLogsSettings();
4050
+ switch (object.severity) {
4051
+ default:
4052
+ if (typeof object.severity === "number") {
4053
+ message.severity = object.severity;
4054
+ break;
4055
+ }
4056
+ break;
4057
+ case "SEVERITY_UNSPECIFIED":
4058
+ case 0:
4059
+ message.severity = 0;
4060
+ break;
4061
+ case "DISABLED":
4062
+ case 1:
4063
+ message.severity = 1;
4064
+ break;
2776
4065
  case "DEBUG":
2777
4066
  case 2:
2778
4067
  message.severity = 2;
@@ -2793,366 +4082,1173 @@
2793
4082
  return message;
2794
4083
  };
2795
4084
 
2796
- /**
2797
- * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified.
2798
- * @function toObject
2799
- * @memberof google.pubsub.v1.PlatformLogsSettings
2800
- * @static
2801
- * @param {google.pubsub.v1.PlatformLogsSettings} message PlatformLogsSettings
2802
- * @param {$protobuf.IConversionOptions} [options] Conversion options
2803
- * @returns {Object.<string,*>} Plain object
2804
- */
2805
- PlatformLogsSettings.toObject = function toObject(message, options) {
2806
- if (!options)
2807
- options = {};
2808
- var object = {};
2809
- if (options.defaults)
2810
- object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0;
2811
- if (message.severity != null && message.hasOwnProperty("severity"))
2812
- object.severity = options.enums === String ? $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] === undefined ? message.severity : $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] : message.severity;
2813
- return object;
2814
- };
4085
+ /**
4086
+ * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified.
4087
+ * @function toObject
4088
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4089
+ * @static
4090
+ * @param {google.pubsub.v1.PlatformLogsSettings} message PlatformLogsSettings
4091
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4092
+ * @returns {Object.<string,*>} Plain object
4093
+ */
4094
+ PlatformLogsSettings.toObject = function toObject(message, options) {
4095
+ if (!options)
4096
+ options = {};
4097
+ var object = {};
4098
+ if (options.defaults)
4099
+ object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0;
4100
+ if (message.severity != null && message.hasOwnProperty("severity"))
4101
+ object.severity = options.enums === String ? $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] === undefined ? message.severity : $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] : message.severity;
4102
+ return object;
4103
+ };
4104
+
4105
+ /**
4106
+ * Converts this PlatformLogsSettings to JSON.
4107
+ * @function toJSON
4108
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4109
+ * @instance
4110
+ * @returns {Object.<string,*>} JSON object
4111
+ */
4112
+ PlatformLogsSettings.prototype.toJSON = function toJSON() {
4113
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4114
+ };
4115
+
4116
+ /**
4117
+ * Gets the default type url for PlatformLogsSettings
4118
+ * @function getTypeUrl
4119
+ * @memberof google.pubsub.v1.PlatformLogsSettings
4120
+ * @static
4121
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4122
+ * @returns {string} The default type url
4123
+ */
4124
+ PlatformLogsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4125
+ if (typeUrlPrefix === undefined) {
4126
+ typeUrlPrefix = "type.googleapis.com";
4127
+ }
4128
+ return typeUrlPrefix + "/google.pubsub.v1.PlatformLogsSettings";
4129
+ };
4130
+
4131
+ /**
4132
+ * Severity enum.
4133
+ * @name google.pubsub.v1.PlatformLogsSettings.Severity
4134
+ * @enum {number}
4135
+ * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value
4136
+ * @property {number} DISABLED=1 DISABLED value
4137
+ * @property {number} DEBUG=2 DEBUG value
4138
+ * @property {number} INFO=3 INFO value
4139
+ * @property {number} WARNING=4 WARNING value
4140
+ * @property {number} ERROR=5 ERROR value
4141
+ */
4142
+ PlatformLogsSettings.Severity = (function() {
4143
+ var valuesById = {}, values = Object.create(valuesById);
4144
+ values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0;
4145
+ values[valuesById[1] = "DISABLED"] = 1;
4146
+ values[valuesById[2] = "DEBUG"] = 2;
4147
+ values[valuesById[3] = "INFO"] = 3;
4148
+ values[valuesById[4] = "WARNING"] = 4;
4149
+ values[valuesById[5] = "ERROR"] = 5;
4150
+ return values;
4151
+ })();
4152
+
4153
+ return PlatformLogsSettings;
4154
+ })();
4155
+
4156
+ v1.IngestionFailureEvent = (function() {
4157
+
4158
+ /**
4159
+ * Properties of an IngestionFailureEvent.
4160
+ * @memberof google.pubsub.v1
4161
+ * @interface IIngestionFailureEvent
4162
+ * @property {string|null} [topic] IngestionFailureEvent topic
4163
+ * @property {string|null} [errorMessage] IngestionFailureEvent errorMessage
4164
+ * @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure
4165
+ * @property {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null} [awsMskFailure] IngestionFailureEvent awsMskFailure
4166
+ * @property {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null} [azureEventHubsFailure] IngestionFailureEvent azureEventHubsFailure
4167
+ * @property {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null} [confluentCloudFailure] IngestionFailureEvent confluentCloudFailure
4168
+ */
4169
+
4170
+ /**
4171
+ * Constructs a new IngestionFailureEvent.
4172
+ * @memberof google.pubsub.v1
4173
+ * @classdesc Represents an IngestionFailureEvent.
4174
+ * @implements IIngestionFailureEvent
4175
+ * @constructor
4176
+ * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
4177
+ */
4178
+ function IngestionFailureEvent(properties) {
4179
+ if (properties)
4180
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4181
+ if (properties[keys[i]] != null)
4182
+ this[keys[i]] = properties[keys[i]];
4183
+ }
4184
+
4185
+ /**
4186
+ * IngestionFailureEvent topic.
4187
+ * @member {string} topic
4188
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4189
+ * @instance
4190
+ */
4191
+ IngestionFailureEvent.prototype.topic = "";
4192
+
4193
+ /**
4194
+ * IngestionFailureEvent errorMessage.
4195
+ * @member {string} errorMessage
4196
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4197
+ * @instance
4198
+ */
4199
+ IngestionFailureEvent.prototype.errorMessage = "";
4200
+
4201
+ /**
4202
+ * IngestionFailureEvent cloudStorageFailure.
4203
+ * @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure
4204
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4205
+ * @instance
4206
+ */
4207
+ IngestionFailureEvent.prototype.cloudStorageFailure = null;
4208
+
4209
+ /**
4210
+ * IngestionFailureEvent awsMskFailure.
4211
+ * @member {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null|undefined} awsMskFailure
4212
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4213
+ * @instance
4214
+ */
4215
+ IngestionFailureEvent.prototype.awsMskFailure = null;
4216
+
4217
+ /**
4218
+ * IngestionFailureEvent azureEventHubsFailure.
4219
+ * @member {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null|undefined} azureEventHubsFailure
4220
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4221
+ * @instance
4222
+ */
4223
+ IngestionFailureEvent.prototype.azureEventHubsFailure = null;
4224
+
4225
+ /**
4226
+ * IngestionFailureEvent confluentCloudFailure.
4227
+ * @member {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null|undefined} confluentCloudFailure
4228
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4229
+ * @instance
4230
+ */
4231
+ IngestionFailureEvent.prototype.confluentCloudFailure = null;
4232
+
4233
+ // OneOf field names bound to virtual getters and setters
4234
+ var $oneOfFields;
4235
+
4236
+ /**
4237
+ * IngestionFailureEvent failure.
4238
+ * @member {"cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|undefined} failure
4239
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4240
+ * @instance
4241
+ */
4242
+ Object.defineProperty(IngestionFailureEvent.prototype, "failure", {
4243
+ get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure", "awsMskFailure", "azureEventHubsFailure", "confluentCloudFailure"]),
4244
+ set: $util.oneOfSetter($oneOfFields)
4245
+ });
4246
+
4247
+ /**
4248
+ * Creates a new IngestionFailureEvent instance using the specified properties.
4249
+ * @function create
4250
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4251
+ * @static
4252
+ * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
4253
+ * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance
4254
+ */
4255
+ IngestionFailureEvent.create = function create(properties) {
4256
+ return new IngestionFailureEvent(properties);
4257
+ };
4258
+
4259
+ /**
4260
+ * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
4261
+ * @function encode
4262
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4263
+ * @static
4264
+ * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
4265
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4266
+ * @returns {$protobuf.Writer} Writer
4267
+ */
4268
+ IngestionFailureEvent.encode = function encode(message, writer) {
4269
+ if (!writer)
4270
+ writer = $Writer.create();
4271
+ if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
4272
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic);
4273
+ if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
4274
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
4275
+ if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure"))
4276
+ $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4277
+ if (message.awsMskFailure != null && Object.hasOwnProperty.call(message, "awsMskFailure"))
4278
+ $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.encode(message.awsMskFailure, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
4279
+ if (message.azureEventHubsFailure != null && Object.hasOwnProperty.call(message, "azureEventHubsFailure"))
4280
+ $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.encode(message.azureEventHubsFailure, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
4281
+ if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure"))
4282
+ $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.encode(message.confluentCloudFailure, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
4283
+ return writer;
4284
+ };
4285
+
4286
+ /**
4287
+ * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
4288
+ * @function encodeDelimited
4289
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4290
+ * @static
4291
+ * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
4292
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4293
+ * @returns {$protobuf.Writer} Writer
4294
+ */
4295
+ IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) {
4296
+ return this.encode(message, writer).ldelim();
4297
+ };
4298
+
4299
+ /**
4300
+ * Decodes an IngestionFailureEvent message from the specified reader or buffer.
4301
+ * @function decode
4302
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4303
+ * @static
4304
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4305
+ * @param {number} [length] Message length if known beforehand
4306
+ * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
4307
+ * @throws {Error} If the payload is not a reader or valid buffer
4308
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4309
+ */
4310
+ IngestionFailureEvent.decode = function decode(reader, length) {
4311
+ if (!(reader instanceof $Reader))
4312
+ reader = $Reader.create(reader);
4313
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent();
4314
+ while (reader.pos < end) {
4315
+ var tag = reader.uint32();
4316
+ switch (tag >>> 3) {
4317
+ case 1: {
4318
+ message.topic = reader.string();
4319
+ break;
4320
+ }
4321
+ case 2: {
4322
+ message.errorMessage = reader.string();
4323
+ break;
4324
+ }
4325
+ case 3: {
4326
+ message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32());
4327
+ break;
4328
+ }
4329
+ case 4: {
4330
+ message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.decode(reader, reader.uint32());
4331
+ break;
4332
+ }
4333
+ case 5: {
4334
+ message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.decode(reader, reader.uint32());
4335
+ break;
4336
+ }
4337
+ case 6: {
4338
+ message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.decode(reader, reader.uint32());
4339
+ break;
4340
+ }
4341
+ default:
4342
+ reader.skipType(tag & 7);
4343
+ break;
4344
+ }
4345
+ }
4346
+ return message;
4347
+ };
4348
+
4349
+ /**
4350
+ * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited.
4351
+ * @function decodeDelimited
4352
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4353
+ * @static
4354
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4355
+ * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
4356
+ * @throws {Error} If the payload is not a reader or valid buffer
4357
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4358
+ */
4359
+ IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) {
4360
+ if (!(reader instanceof $Reader))
4361
+ reader = new $Reader(reader);
4362
+ return this.decode(reader, reader.uint32());
4363
+ };
4364
+
4365
+ /**
4366
+ * Verifies an IngestionFailureEvent message.
4367
+ * @function verify
4368
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4369
+ * @static
4370
+ * @param {Object.<string,*>} message Plain object to verify
4371
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4372
+ */
4373
+ IngestionFailureEvent.verify = function verify(message) {
4374
+ if (typeof message !== "object" || message === null)
4375
+ return "object expected";
4376
+ var properties = {};
4377
+ if (message.topic != null && message.hasOwnProperty("topic"))
4378
+ if (!$util.isString(message.topic))
4379
+ return "topic: string expected";
4380
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
4381
+ if (!$util.isString(message.errorMessage))
4382
+ return "errorMessage: string expected";
4383
+ if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
4384
+ properties.failure = 1;
4385
+ {
4386
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure);
4387
+ if (error)
4388
+ return "cloudStorageFailure." + error;
4389
+ }
4390
+ }
4391
+ if (message.awsMskFailure != null && message.hasOwnProperty("awsMskFailure")) {
4392
+ if (properties.failure === 1)
4393
+ return "failure: multiple values";
4394
+ properties.failure = 1;
4395
+ {
4396
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify(message.awsMskFailure);
4397
+ if (error)
4398
+ return "awsMskFailure." + error;
4399
+ }
4400
+ }
4401
+ if (message.azureEventHubsFailure != null && message.hasOwnProperty("azureEventHubsFailure")) {
4402
+ if (properties.failure === 1)
4403
+ return "failure: multiple values";
4404
+ properties.failure = 1;
4405
+ {
4406
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify(message.azureEventHubsFailure);
4407
+ if (error)
4408
+ return "azureEventHubsFailure." + error;
4409
+ }
4410
+ }
4411
+ if (message.confluentCloudFailure != null && message.hasOwnProperty("confluentCloudFailure")) {
4412
+ if (properties.failure === 1)
4413
+ return "failure: multiple values";
4414
+ properties.failure = 1;
4415
+ {
4416
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify(message.confluentCloudFailure);
4417
+ if (error)
4418
+ return "confluentCloudFailure." + error;
4419
+ }
4420
+ }
4421
+ return null;
4422
+ };
4423
+
4424
+ /**
4425
+ * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types.
4426
+ * @function fromObject
4427
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4428
+ * @static
4429
+ * @param {Object.<string,*>} object Plain object
4430
+ * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
4431
+ */
4432
+ IngestionFailureEvent.fromObject = function fromObject(object) {
4433
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent)
4434
+ return object;
4435
+ var message = new $root.google.pubsub.v1.IngestionFailureEvent();
4436
+ if (object.topic != null)
4437
+ message.topic = String(object.topic);
4438
+ if (object.errorMessage != null)
4439
+ message.errorMessage = String(object.errorMessage);
4440
+ if (object.cloudStorageFailure != null) {
4441
+ if (typeof object.cloudStorageFailure !== "object")
4442
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected");
4443
+ message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure);
4444
+ }
4445
+ if (object.awsMskFailure != null) {
4446
+ if (typeof object.awsMskFailure !== "object")
4447
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.awsMskFailure: object expected");
4448
+ message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.fromObject(object.awsMskFailure);
4449
+ }
4450
+ if (object.azureEventHubsFailure != null) {
4451
+ if (typeof object.azureEventHubsFailure !== "object")
4452
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.azureEventHubsFailure: object expected");
4453
+ message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.fromObject(object.azureEventHubsFailure);
4454
+ }
4455
+ if (object.confluentCloudFailure != null) {
4456
+ if (typeof object.confluentCloudFailure !== "object")
4457
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.confluentCloudFailure: object expected");
4458
+ message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.fromObject(object.confluentCloudFailure);
4459
+ }
4460
+ return message;
4461
+ };
4462
+
4463
+ /**
4464
+ * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified.
4465
+ * @function toObject
4466
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4467
+ * @static
4468
+ * @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent
4469
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4470
+ * @returns {Object.<string,*>} Plain object
4471
+ */
4472
+ IngestionFailureEvent.toObject = function toObject(message, options) {
4473
+ if (!options)
4474
+ options = {};
4475
+ var object = {};
4476
+ if (options.defaults) {
4477
+ object.topic = "";
4478
+ object.errorMessage = "";
4479
+ }
4480
+ if (message.topic != null && message.hasOwnProperty("topic"))
4481
+ object.topic = message.topic;
4482
+ if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
4483
+ object.errorMessage = message.errorMessage;
4484
+ if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
4485
+ object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options);
4486
+ if (options.oneofs)
4487
+ object.failure = "cloudStorageFailure";
4488
+ }
4489
+ if (message.awsMskFailure != null && message.hasOwnProperty("awsMskFailure")) {
4490
+ object.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.toObject(message.awsMskFailure, options);
4491
+ if (options.oneofs)
4492
+ object.failure = "awsMskFailure";
4493
+ }
4494
+ if (message.azureEventHubsFailure != null && message.hasOwnProperty("azureEventHubsFailure")) {
4495
+ object.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.toObject(message.azureEventHubsFailure, options);
4496
+ if (options.oneofs)
4497
+ object.failure = "azureEventHubsFailure";
4498
+ }
4499
+ if (message.confluentCloudFailure != null && message.hasOwnProperty("confluentCloudFailure")) {
4500
+ object.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.toObject(message.confluentCloudFailure, options);
4501
+ if (options.oneofs)
4502
+ object.failure = "confluentCloudFailure";
4503
+ }
4504
+ return object;
4505
+ };
4506
+
4507
+ /**
4508
+ * Converts this IngestionFailureEvent to JSON.
4509
+ * @function toJSON
4510
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4511
+ * @instance
4512
+ * @returns {Object.<string,*>} JSON object
4513
+ */
4514
+ IngestionFailureEvent.prototype.toJSON = function toJSON() {
4515
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4516
+ };
4517
+
4518
+ /**
4519
+ * Gets the default type url for IngestionFailureEvent
4520
+ * @function getTypeUrl
4521
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4522
+ * @static
4523
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4524
+ * @returns {string} The default type url
4525
+ */
4526
+ IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4527
+ if (typeUrlPrefix === undefined) {
4528
+ typeUrlPrefix = "type.googleapis.com";
4529
+ }
4530
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent";
4531
+ };
4532
+
4533
+ IngestionFailureEvent.ApiViolationReason = (function() {
4534
+
4535
+ /**
4536
+ * Properties of an ApiViolationReason.
4537
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4538
+ * @interface IApiViolationReason
4539
+ */
4540
+
4541
+ /**
4542
+ * Constructs a new ApiViolationReason.
4543
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4544
+ * @classdesc Represents an ApiViolationReason.
4545
+ * @implements IApiViolationReason
4546
+ * @constructor
4547
+ * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
4548
+ */
4549
+ function ApiViolationReason(properties) {
4550
+ if (properties)
4551
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4552
+ if (properties[keys[i]] != null)
4553
+ this[keys[i]] = properties[keys[i]];
4554
+ }
4555
+
4556
+ /**
4557
+ * Creates a new ApiViolationReason instance using the specified properties.
4558
+ * @function create
4559
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4560
+ * @static
4561
+ * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
4562
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance
4563
+ */
4564
+ ApiViolationReason.create = function create(properties) {
4565
+ return new ApiViolationReason(properties);
4566
+ };
4567
+
4568
+ /**
4569
+ * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
4570
+ * @function encode
4571
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4572
+ * @static
4573
+ * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
4574
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4575
+ * @returns {$protobuf.Writer} Writer
4576
+ */
4577
+ ApiViolationReason.encode = function encode(message, writer) {
4578
+ if (!writer)
4579
+ writer = $Writer.create();
4580
+ return writer;
4581
+ };
4582
+
4583
+ /**
4584
+ * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
4585
+ * @function encodeDelimited
4586
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4587
+ * @static
4588
+ * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
4589
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4590
+ * @returns {$protobuf.Writer} Writer
4591
+ */
4592
+ ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) {
4593
+ return this.encode(message, writer).ldelim();
4594
+ };
4595
+
4596
+ /**
4597
+ * Decodes an ApiViolationReason message from the specified reader or buffer.
4598
+ * @function decode
4599
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4600
+ * @static
4601
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4602
+ * @param {number} [length] Message length if known beforehand
4603
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
4604
+ * @throws {Error} If the payload is not a reader or valid buffer
4605
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4606
+ */
4607
+ ApiViolationReason.decode = function decode(reader, length) {
4608
+ if (!(reader instanceof $Reader))
4609
+ reader = $Reader.create(reader);
4610
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
4611
+ while (reader.pos < end) {
4612
+ var tag = reader.uint32();
4613
+ switch (tag >>> 3) {
4614
+ default:
4615
+ reader.skipType(tag & 7);
4616
+ break;
4617
+ }
4618
+ }
4619
+ return message;
4620
+ };
4621
+
4622
+ /**
4623
+ * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited.
4624
+ * @function decodeDelimited
4625
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4626
+ * @static
4627
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4628
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
4629
+ * @throws {Error} If the payload is not a reader or valid buffer
4630
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4631
+ */
4632
+ ApiViolationReason.decodeDelimited = function decodeDelimited(reader) {
4633
+ if (!(reader instanceof $Reader))
4634
+ reader = new $Reader(reader);
4635
+ return this.decode(reader, reader.uint32());
4636
+ };
4637
+
4638
+ /**
4639
+ * Verifies an ApiViolationReason message.
4640
+ * @function verify
4641
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4642
+ * @static
4643
+ * @param {Object.<string,*>} message Plain object to verify
4644
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4645
+ */
4646
+ ApiViolationReason.verify = function verify(message) {
4647
+ if (typeof message !== "object" || message === null)
4648
+ return "object expected";
4649
+ return null;
4650
+ };
4651
+
4652
+ /**
4653
+ * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types.
4654
+ * @function fromObject
4655
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4656
+ * @static
4657
+ * @param {Object.<string,*>} object Plain object
4658
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
4659
+ */
4660
+ ApiViolationReason.fromObject = function fromObject(object) {
4661
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason)
4662
+ return object;
4663
+ return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
4664
+ };
4665
+
4666
+ /**
4667
+ * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified.
4668
+ * @function toObject
4669
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4670
+ * @static
4671
+ * @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason
4672
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4673
+ * @returns {Object.<string,*>} Plain object
4674
+ */
4675
+ ApiViolationReason.toObject = function toObject() {
4676
+ return {};
4677
+ };
2815
4678
 
2816
- /**
2817
- * Converts this PlatformLogsSettings to JSON.
2818
- * @function toJSON
2819
- * @memberof google.pubsub.v1.PlatformLogsSettings
2820
- * @instance
2821
- * @returns {Object.<string,*>} JSON object
2822
- */
2823
- PlatformLogsSettings.prototype.toJSON = function toJSON() {
2824
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2825
- };
4679
+ /**
4680
+ * Converts this ApiViolationReason to JSON.
4681
+ * @function toJSON
4682
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4683
+ * @instance
4684
+ * @returns {Object.<string,*>} JSON object
4685
+ */
4686
+ ApiViolationReason.prototype.toJSON = function toJSON() {
4687
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4688
+ };
2826
4689
 
2827
- /**
2828
- * Gets the default type url for PlatformLogsSettings
2829
- * @function getTypeUrl
2830
- * @memberof google.pubsub.v1.PlatformLogsSettings
2831
- * @static
2832
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2833
- * @returns {string} The default type url
2834
- */
2835
- PlatformLogsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2836
- if (typeUrlPrefix === undefined) {
2837
- typeUrlPrefix = "type.googleapis.com";
4690
+ /**
4691
+ * Gets the default type url for ApiViolationReason
4692
+ * @function getTypeUrl
4693
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
4694
+ * @static
4695
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4696
+ * @returns {string} The default type url
4697
+ */
4698
+ ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4699
+ if (typeUrlPrefix === undefined) {
4700
+ typeUrlPrefix = "type.googleapis.com";
4701
+ }
4702
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason";
4703
+ };
4704
+
4705
+ return ApiViolationReason;
4706
+ })();
4707
+
4708
+ IngestionFailureEvent.AvroFailureReason = (function() {
4709
+
4710
+ /**
4711
+ * Properties of an AvroFailureReason.
4712
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4713
+ * @interface IAvroFailureReason
4714
+ */
4715
+
4716
+ /**
4717
+ * Constructs a new AvroFailureReason.
4718
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4719
+ * @classdesc Represents an AvroFailureReason.
4720
+ * @implements IAvroFailureReason
4721
+ * @constructor
4722
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
4723
+ */
4724
+ function AvroFailureReason(properties) {
4725
+ if (properties)
4726
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4727
+ if (properties[keys[i]] != null)
4728
+ this[keys[i]] = properties[keys[i]];
2838
4729
  }
2839
- return typeUrlPrefix + "/google.pubsub.v1.PlatformLogsSettings";
2840
- };
2841
4730
 
2842
- /**
2843
- * Severity enum.
2844
- * @name google.pubsub.v1.PlatformLogsSettings.Severity
2845
- * @enum {number}
2846
- * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value
2847
- * @property {number} DISABLED=1 DISABLED value
2848
- * @property {number} DEBUG=2 DEBUG value
2849
- * @property {number} INFO=3 INFO value
2850
- * @property {number} WARNING=4 WARNING value
2851
- * @property {number} ERROR=5 ERROR value
2852
- */
2853
- PlatformLogsSettings.Severity = (function() {
2854
- var valuesById = {}, values = Object.create(valuesById);
2855
- values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0;
2856
- values[valuesById[1] = "DISABLED"] = 1;
2857
- values[valuesById[2] = "DEBUG"] = 2;
2858
- values[valuesById[3] = "INFO"] = 3;
2859
- values[valuesById[4] = "WARNING"] = 4;
2860
- values[valuesById[5] = "ERROR"] = 5;
2861
- return values;
4731
+ /**
4732
+ * Creates a new AvroFailureReason instance using the specified properties.
4733
+ * @function create
4734
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4735
+ * @static
4736
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
4737
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance
4738
+ */
4739
+ AvroFailureReason.create = function create(properties) {
4740
+ return new AvroFailureReason(properties);
4741
+ };
4742
+
4743
+ /**
4744
+ * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
4745
+ * @function encode
4746
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4747
+ * @static
4748
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
4749
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4750
+ * @returns {$protobuf.Writer} Writer
4751
+ */
4752
+ AvroFailureReason.encode = function encode(message, writer) {
4753
+ if (!writer)
4754
+ writer = $Writer.create();
4755
+ return writer;
4756
+ };
4757
+
4758
+ /**
4759
+ * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
4760
+ * @function encodeDelimited
4761
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4762
+ * @static
4763
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
4764
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4765
+ * @returns {$protobuf.Writer} Writer
4766
+ */
4767
+ AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
4768
+ return this.encode(message, writer).ldelim();
4769
+ };
4770
+
4771
+ /**
4772
+ * Decodes an AvroFailureReason message from the specified reader or buffer.
4773
+ * @function decode
4774
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4775
+ * @static
4776
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4777
+ * @param {number} [length] Message length if known beforehand
4778
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
4779
+ * @throws {Error} If the payload is not a reader or valid buffer
4780
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4781
+ */
4782
+ AvroFailureReason.decode = function decode(reader, length) {
4783
+ if (!(reader instanceof $Reader))
4784
+ reader = $Reader.create(reader);
4785
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
4786
+ while (reader.pos < end) {
4787
+ var tag = reader.uint32();
4788
+ switch (tag >>> 3) {
4789
+ default:
4790
+ reader.skipType(tag & 7);
4791
+ break;
4792
+ }
4793
+ }
4794
+ return message;
4795
+ };
4796
+
4797
+ /**
4798
+ * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited.
4799
+ * @function decodeDelimited
4800
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4801
+ * @static
4802
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4803
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
4804
+ * @throws {Error} If the payload is not a reader or valid buffer
4805
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4806
+ */
4807
+ AvroFailureReason.decodeDelimited = function decodeDelimited(reader) {
4808
+ if (!(reader instanceof $Reader))
4809
+ reader = new $Reader(reader);
4810
+ return this.decode(reader, reader.uint32());
4811
+ };
4812
+
4813
+ /**
4814
+ * Verifies an AvroFailureReason message.
4815
+ * @function verify
4816
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4817
+ * @static
4818
+ * @param {Object.<string,*>} message Plain object to verify
4819
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4820
+ */
4821
+ AvroFailureReason.verify = function verify(message) {
4822
+ if (typeof message !== "object" || message === null)
4823
+ return "object expected";
4824
+ return null;
4825
+ };
4826
+
4827
+ /**
4828
+ * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types.
4829
+ * @function fromObject
4830
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4831
+ * @static
4832
+ * @param {Object.<string,*>} object Plain object
4833
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
4834
+ */
4835
+ AvroFailureReason.fromObject = function fromObject(object) {
4836
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason)
4837
+ return object;
4838
+ return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
4839
+ };
4840
+
4841
+ /**
4842
+ * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified.
4843
+ * @function toObject
4844
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4845
+ * @static
4846
+ * @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason
4847
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4848
+ * @returns {Object.<string,*>} Plain object
4849
+ */
4850
+ AvroFailureReason.toObject = function toObject() {
4851
+ return {};
4852
+ };
4853
+
4854
+ /**
4855
+ * Converts this AvroFailureReason to JSON.
4856
+ * @function toJSON
4857
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4858
+ * @instance
4859
+ * @returns {Object.<string,*>} JSON object
4860
+ */
4861
+ AvroFailureReason.prototype.toJSON = function toJSON() {
4862
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4863
+ };
4864
+
4865
+ /**
4866
+ * Gets the default type url for AvroFailureReason
4867
+ * @function getTypeUrl
4868
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
4869
+ * @static
4870
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4871
+ * @returns {string} The default type url
4872
+ */
4873
+ AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4874
+ if (typeUrlPrefix === undefined) {
4875
+ typeUrlPrefix = "type.googleapis.com";
4876
+ }
4877
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason";
4878
+ };
4879
+
4880
+ return AvroFailureReason;
2862
4881
  })();
2863
4882
 
2864
- return PlatformLogsSettings;
2865
- })();
4883
+ IngestionFailureEvent.CloudStorageFailure = (function() {
2866
4884
 
2867
- v1.IngestionFailureEvent = (function() {
4885
+ /**
4886
+ * Properties of a CloudStorageFailure.
4887
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4888
+ * @interface ICloudStorageFailure
4889
+ * @property {string|null} [bucket] CloudStorageFailure bucket
4890
+ * @property {string|null} [objectName] CloudStorageFailure objectName
4891
+ * @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration
4892
+ * @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason
4893
+ * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason
4894
+ */
2868
4895
 
2869
- /**
2870
- * Properties of an IngestionFailureEvent.
2871
- * @memberof google.pubsub.v1
2872
- * @interface IIngestionFailureEvent
2873
- * @property {string|null} [topic] IngestionFailureEvent topic
2874
- * @property {string|null} [errorMessage] IngestionFailureEvent errorMessage
2875
- * @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure
2876
- */
4896
+ /**
4897
+ * Constructs a new CloudStorageFailure.
4898
+ * @memberof google.pubsub.v1.IngestionFailureEvent
4899
+ * @classdesc Represents a CloudStorageFailure.
4900
+ * @implements ICloudStorageFailure
4901
+ * @constructor
4902
+ * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
4903
+ */
4904
+ function CloudStorageFailure(properties) {
4905
+ if (properties)
4906
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4907
+ if (properties[keys[i]] != null)
4908
+ this[keys[i]] = properties[keys[i]];
4909
+ }
2877
4910
 
2878
- /**
2879
- * Constructs a new IngestionFailureEvent.
2880
- * @memberof google.pubsub.v1
2881
- * @classdesc Represents an IngestionFailureEvent.
2882
- * @implements IIngestionFailureEvent
2883
- * @constructor
2884
- * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
2885
- */
2886
- function IngestionFailureEvent(properties) {
2887
- if (properties)
2888
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2889
- if (properties[keys[i]] != null)
2890
- this[keys[i]] = properties[keys[i]];
2891
- }
4911
+ /**
4912
+ * CloudStorageFailure bucket.
4913
+ * @member {string} bucket
4914
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4915
+ * @instance
4916
+ */
4917
+ CloudStorageFailure.prototype.bucket = "";
2892
4918
 
2893
- /**
2894
- * IngestionFailureEvent topic.
2895
- * @member {string} topic
2896
- * @memberof google.pubsub.v1.IngestionFailureEvent
2897
- * @instance
2898
- */
2899
- IngestionFailureEvent.prototype.topic = "";
4919
+ /**
4920
+ * CloudStorageFailure objectName.
4921
+ * @member {string} objectName
4922
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4923
+ * @instance
4924
+ */
4925
+ CloudStorageFailure.prototype.objectName = "";
2900
4926
 
2901
- /**
2902
- * IngestionFailureEvent errorMessage.
2903
- * @member {string} errorMessage
2904
- * @memberof google.pubsub.v1.IngestionFailureEvent
2905
- * @instance
2906
- */
2907
- IngestionFailureEvent.prototype.errorMessage = "";
4927
+ /**
4928
+ * CloudStorageFailure objectGeneration.
4929
+ * @member {number|Long} objectGeneration
4930
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4931
+ * @instance
4932
+ */
4933
+ CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
2908
4934
 
2909
- /**
2910
- * IngestionFailureEvent cloudStorageFailure.
2911
- * @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure
2912
- * @memberof google.pubsub.v1.IngestionFailureEvent
2913
- * @instance
2914
- */
2915
- IngestionFailureEvent.prototype.cloudStorageFailure = null;
4935
+ /**
4936
+ * CloudStorageFailure avroFailureReason.
4937
+ * @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason
4938
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4939
+ * @instance
4940
+ */
4941
+ CloudStorageFailure.prototype.avroFailureReason = null;
2916
4942
 
2917
- // OneOf field names bound to virtual getters and setters
2918
- var $oneOfFields;
4943
+ /**
4944
+ * CloudStorageFailure apiViolationReason.
4945
+ * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason
4946
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4947
+ * @instance
4948
+ */
4949
+ CloudStorageFailure.prototype.apiViolationReason = null;
2919
4950
 
2920
- /**
2921
- * IngestionFailureEvent failure.
2922
- * @member {"cloudStorageFailure"|undefined} failure
2923
- * @memberof google.pubsub.v1.IngestionFailureEvent
2924
- * @instance
2925
- */
2926
- Object.defineProperty(IngestionFailureEvent.prototype, "failure", {
2927
- get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure"]),
2928
- set: $util.oneOfSetter($oneOfFields)
2929
- });
4951
+ // OneOf field names bound to virtual getters and setters
4952
+ var $oneOfFields;
2930
4953
 
2931
- /**
2932
- * Creates a new IngestionFailureEvent instance using the specified properties.
2933
- * @function create
2934
- * @memberof google.pubsub.v1.IngestionFailureEvent
2935
- * @static
2936
- * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set
2937
- * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance
2938
- */
2939
- IngestionFailureEvent.create = function create(properties) {
2940
- return new IngestionFailureEvent(properties);
2941
- };
4954
+ /**
4955
+ * CloudStorageFailure reason.
4956
+ * @member {"avroFailureReason"|"apiViolationReason"|undefined} reason
4957
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4958
+ * @instance
4959
+ */
4960
+ Object.defineProperty(CloudStorageFailure.prototype, "reason", {
4961
+ get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]),
4962
+ set: $util.oneOfSetter($oneOfFields)
4963
+ });
2942
4964
 
2943
- /**
2944
- * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
2945
- * @function encode
2946
- * @memberof google.pubsub.v1.IngestionFailureEvent
2947
- * @static
2948
- * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
2949
- * @param {$protobuf.Writer} [writer] Writer to encode to
2950
- * @returns {$protobuf.Writer} Writer
2951
- */
2952
- IngestionFailureEvent.encode = function encode(message, writer) {
2953
- if (!writer)
2954
- writer = $Writer.create();
2955
- if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
2956
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic);
2957
- if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage"))
2958
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage);
2959
- if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure"))
2960
- $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
2961
- return writer;
2962
- };
4965
+ /**
4966
+ * Creates a new CloudStorageFailure instance using the specified properties.
4967
+ * @function create
4968
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4969
+ * @static
4970
+ * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
4971
+ * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance
4972
+ */
4973
+ CloudStorageFailure.create = function create(properties) {
4974
+ return new CloudStorageFailure(properties);
4975
+ };
2963
4976
 
2964
- /**
2965
- * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages.
2966
- * @function encodeDelimited
2967
- * @memberof google.pubsub.v1.IngestionFailureEvent
2968
- * @static
2969
- * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode
2970
- * @param {$protobuf.Writer} [writer] Writer to encode to
2971
- * @returns {$protobuf.Writer} Writer
2972
- */
2973
- IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) {
2974
- return this.encode(message, writer).ldelim();
2975
- };
4977
+ /**
4978
+ * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
4979
+ * @function encode
4980
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
4981
+ * @static
4982
+ * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
4983
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4984
+ * @returns {$protobuf.Writer} Writer
4985
+ */
4986
+ CloudStorageFailure.encode = function encode(message, writer) {
4987
+ if (!writer)
4988
+ writer = $Writer.create();
4989
+ if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket"))
4990
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket);
4991
+ if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName"))
4992
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName);
4993
+ if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration"))
4994
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration);
4995
+ if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason"))
4996
+ $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
4997
+ if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
4998
+ $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
4999
+ return writer;
5000
+ };
2976
5001
 
2977
- /**
2978
- * Decodes an IngestionFailureEvent message from the specified reader or buffer.
2979
- * @function decode
2980
- * @memberof google.pubsub.v1.IngestionFailureEvent
2981
- * @static
2982
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2983
- * @param {number} [length] Message length if known beforehand
2984
- * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
2985
- * @throws {Error} If the payload is not a reader or valid buffer
2986
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
2987
- */
2988
- IngestionFailureEvent.decode = function decode(reader, length) {
2989
- if (!(reader instanceof $Reader))
2990
- reader = $Reader.create(reader);
2991
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent();
2992
- while (reader.pos < end) {
2993
- var tag = reader.uint32();
2994
- switch (tag >>> 3) {
2995
- case 1: {
2996
- message.topic = reader.string();
5002
+ /**
5003
+ * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
5004
+ * @function encodeDelimited
5005
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5006
+ * @static
5007
+ * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
5008
+ * @param {$protobuf.Writer} [writer] Writer to encode to
5009
+ * @returns {$protobuf.Writer} Writer
5010
+ */
5011
+ CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) {
5012
+ return this.encode(message, writer).ldelim();
5013
+ };
5014
+
5015
+ /**
5016
+ * Decodes a CloudStorageFailure message from the specified reader or buffer.
5017
+ * @function decode
5018
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5019
+ * @static
5020
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5021
+ * @param {number} [length] Message length if known beforehand
5022
+ * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
5023
+ * @throws {Error} If the payload is not a reader or valid buffer
5024
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5025
+ */
5026
+ CloudStorageFailure.decode = function decode(reader, length) {
5027
+ if (!(reader instanceof $Reader))
5028
+ reader = $Reader.create(reader);
5029
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
5030
+ while (reader.pos < end) {
5031
+ var tag = reader.uint32();
5032
+ switch (tag >>> 3) {
5033
+ case 1: {
5034
+ message.bucket = reader.string();
5035
+ break;
5036
+ }
5037
+ case 2: {
5038
+ message.objectName = reader.string();
5039
+ break;
5040
+ }
5041
+ case 3: {
5042
+ message.objectGeneration = reader.int64();
5043
+ break;
5044
+ }
5045
+ case 5: {
5046
+ message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32());
5047
+ break;
5048
+ }
5049
+ case 6: {
5050
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
5051
+ break;
5052
+ }
5053
+ default:
5054
+ reader.skipType(tag & 7);
2997
5055
  break;
2998
5056
  }
2999
- case 2: {
3000
- message.errorMessage = reader.string();
3001
- break;
5057
+ }
5058
+ return message;
5059
+ };
5060
+
5061
+ /**
5062
+ * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited.
5063
+ * @function decodeDelimited
5064
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5065
+ * @static
5066
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5067
+ * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
5068
+ * @throws {Error} If the payload is not a reader or valid buffer
5069
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5070
+ */
5071
+ CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) {
5072
+ if (!(reader instanceof $Reader))
5073
+ reader = new $Reader(reader);
5074
+ return this.decode(reader, reader.uint32());
5075
+ };
5076
+
5077
+ /**
5078
+ * Verifies a CloudStorageFailure message.
5079
+ * @function verify
5080
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5081
+ * @static
5082
+ * @param {Object.<string,*>} message Plain object to verify
5083
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
5084
+ */
5085
+ CloudStorageFailure.verify = function verify(message) {
5086
+ if (typeof message !== "object" || message === null)
5087
+ return "object expected";
5088
+ var properties = {};
5089
+ if (message.bucket != null && message.hasOwnProperty("bucket"))
5090
+ if (!$util.isString(message.bucket))
5091
+ return "bucket: string expected";
5092
+ if (message.objectName != null && message.hasOwnProperty("objectName"))
5093
+ if (!$util.isString(message.objectName))
5094
+ return "objectName: string expected";
5095
+ if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
5096
+ if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high)))
5097
+ return "objectGeneration: integer|Long expected";
5098
+ if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
5099
+ properties.reason = 1;
5100
+ {
5101
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason);
5102
+ if (error)
5103
+ return "avroFailureReason." + error;
3002
5104
  }
3003
- case 3: {
3004
- message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32());
3005
- break;
5105
+ }
5106
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5107
+ if (properties.reason === 1)
5108
+ return "reason: multiple values";
5109
+ properties.reason = 1;
5110
+ {
5111
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason);
5112
+ if (error)
5113
+ return "apiViolationReason." + error;
3006
5114
  }
3007
- default:
3008
- reader.skipType(tag & 7);
3009
- break;
3010
5115
  }
3011
- }
3012
- return message;
3013
- };
3014
-
3015
- /**
3016
- * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited.
3017
- * @function decodeDelimited
3018
- * @memberof google.pubsub.v1.IngestionFailureEvent
3019
- * @static
3020
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3021
- * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
3022
- * @throws {Error} If the payload is not a reader or valid buffer
3023
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
3024
- */
3025
- IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) {
3026
- if (!(reader instanceof $Reader))
3027
- reader = new $Reader(reader);
3028
- return this.decode(reader, reader.uint32());
3029
- };
5116
+ return null;
5117
+ };
3030
5118
 
3031
- /**
3032
- * Verifies an IngestionFailureEvent message.
3033
- * @function verify
3034
- * @memberof google.pubsub.v1.IngestionFailureEvent
3035
- * @static
3036
- * @param {Object.<string,*>} message Plain object to verify
3037
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
3038
- */
3039
- IngestionFailureEvent.verify = function verify(message) {
3040
- if (typeof message !== "object" || message === null)
3041
- return "object expected";
3042
- var properties = {};
3043
- if (message.topic != null && message.hasOwnProperty("topic"))
3044
- if (!$util.isString(message.topic))
3045
- return "topic: string expected";
3046
- if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
3047
- if (!$util.isString(message.errorMessage))
3048
- return "errorMessage: string expected";
3049
- if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
3050
- properties.failure = 1;
3051
- {
3052
- var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure);
3053
- if (error)
3054
- return "cloudStorageFailure." + error;
5119
+ /**
5120
+ * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types.
5121
+ * @function fromObject
5122
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5123
+ * @static
5124
+ * @param {Object.<string,*>} object Plain object
5125
+ * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
5126
+ */
5127
+ CloudStorageFailure.fromObject = function fromObject(object) {
5128
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure)
5129
+ return object;
5130
+ var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
5131
+ if (object.bucket != null)
5132
+ message.bucket = String(object.bucket);
5133
+ if (object.objectName != null)
5134
+ message.objectName = String(object.objectName);
5135
+ if (object.objectGeneration != null)
5136
+ if ($util.Long)
5137
+ (message.objectGeneration = $util.Long.fromValue(object.objectGeneration)).unsigned = false;
5138
+ else if (typeof object.objectGeneration === "string")
5139
+ message.objectGeneration = parseInt(object.objectGeneration, 10);
5140
+ else if (typeof object.objectGeneration === "number")
5141
+ message.objectGeneration = object.objectGeneration;
5142
+ else if (typeof object.objectGeneration === "object")
5143
+ message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber();
5144
+ if (object.avroFailureReason != null) {
5145
+ if (typeof object.avroFailureReason !== "object")
5146
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected");
5147
+ message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason);
3055
5148
  }
3056
- }
3057
- return null;
3058
- };
5149
+ if (object.apiViolationReason != null) {
5150
+ if (typeof object.apiViolationReason !== "object")
5151
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected");
5152
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
5153
+ }
5154
+ return message;
5155
+ };
3059
5156
 
3060
- /**
3061
- * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types.
3062
- * @function fromObject
3063
- * @memberof google.pubsub.v1.IngestionFailureEvent
3064
- * @static
3065
- * @param {Object.<string,*>} object Plain object
3066
- * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent
3067
- */
3068
- IngestionFailureEvent.fromObject = function fromObject(object) {
3069
- if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent)
3070
- return object;
3071
- var message = new $root.google.pubsub.v1.IngestionFailureEvent();
3072
- if (object.topic != null)
3073
- message.topic = String(object.topic);
3074
- if (object.errorMessage != null)
3075
- message.errorMessage = String(object.errorMessage);
3076
- if (object.cloudStorageFailure != null) {
3077
- if (typeof object.cloudStorageFailure !== "object")
3078
- throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected");
3079
- message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure);
3080
- }
3081
- return message;
3082
- };
5157
+ /**
5158
+ * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified.
5159
+ * @function toObject
5160
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5161
+ * @static
5162
+ * @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure
5163
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
5164
+ * @returns {Object.<string,*>} Plain object
5165
+ */
5166
+ CloudStorageFailure.toObject = function toObject(message, options) {
5167
+ if (!options)
5168
+ options = {};
5169
+ var object = {};
5170
+ if (options.defaults) {
5171
+ object.bucket = "";
5172
+ object.objectName = "";
5173
+ if ($util.Long) {
5174
+ var long = new $util.Long(0, 0, false);
5175
+ object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
5176
+ } else
5177
+ object.objectGeneration = options.longs === String ? "0" : 0;
5178
+ }
5179
+ if (message.bucket != null && message.hasOwnProperty("bucket"))
5180
+ object.bucket = message.bucket;
5181
+ if (message.objectName != null && message.hasOwnProperty("objectName"))
5182
+ object.objectName = message.objectName;
5183
+ if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
5184
+ if (typeof message.objectGeneration === "number")
5185
+ object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration;
5186
+ else
5187
+ object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration;
5188
+ if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
5189
+ object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options);
5190
+ if (options.oneofs)
5191
+ object.reason = "avroFailureReason";
5192
+ }
5193
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5194
+ object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
5195
+ if (options.oneofs)
5196
+ object.reason = "apiViolationReason";
5197
+ }
5198
+ return object;
5199
+ };
3083
5200
 
3084
- /**
3085
- * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified.
3086
- * @function toObject
3087
- * @memberof google.pubsub.v1.IngestionFailureEvent
3088
- * @static
3089
- * @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent
3090
- * @param {$protobuf.IConversionOptions} [options] Conversion options
3091
- * @returns {Object.<string,*>} Plain object
3092
- */
3093
- IngestionFailureEvent.toObject = function toObject(message, options) {
3094
- if (!options)
3095
- options = {};
3096
- var object = {};
3097
- if (options.defaults) {
3098
- object.topic = "";
3099
- object.errorMessage = "";
3100
- }
3101
- if (message.topic != null && message.hasOwnProperty("topic"))
3102
- object.topic = message.topic;
3103
- if (message.errorMessage != null && message.hasOwnProperty("errorMessage"))
3104
- object.errorMessage = message.errorMessage;
3105
- if (message.cloudStorageFailure != null && message.hasOwnProperty("cloudStorageFailure")) {
3106
- object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options);
3107
- if (options.oneofs)
3108
- object.failure = "cloudStorageFailure";
3109
- }
3110
- return object;
3111
- };
5201
+ /**
5202
+ * Converts this CloudStorageFailure to JSON.
5203
+ * @function toJSON
5204
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5205
+ * @instance
5206
+ * @returns {Object.<string,*>} JSON object
5207
+ */
5208
+ CloudStorageFailure.prototype.toJSON = function toJSON() {
5209
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5210
+ };
3112
5211
 
3113
- /**
3114
- * Converts this IngestionFailureEvent to JSON.
3115
- * @function toJSON
3116
- * @memberof google.pubsub.v1.IngestionFailureEvent
3117
- * @instance
3118
- * @returns {Object.<string,*>} JSON object
3119
- */
3120
- IngestionFailureEvent.prototype.toJSON = function toJSON() {
3121
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3122
- };
5212
+ /**
5213
+ * Gets the default type url for CloudStorageFailure
5214
+ * @function getTypeUrl
5215
+ * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5216
+ * @static
5217
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
5218
+ * @returns {string} The default type url
5219
+ */
5220
+ CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5221
+ if (typeUrlPrefix === undefined) {
5222
+ typeUrlPrefix = "type.googleapis.com";
5223
+ }
5224
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure";
5225
+ };
3123
5226
 
3124
- /**
3125
- * Gets the default type url for IngestionFailureEvent
3126
- * @function getTypeUrl
3127
- * @memberof google.pubsub.v1.IngestionFailureEvent
3128
- * @static
3129
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3130
- * @returns {string} The default type url
3131
- */
3132
- IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3133
- if (typeUrlPrefix === undefined) {
3134
- typeUrlPrefix = "type.googleapis.com";
3135
- }
3136
- return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent";
3137
- };
5227
+ return CloudStorageFailure;
5228
+ })();
3138
5229
 
3139
- IngestionFailureEvent.ApiViolationReason = (function() {
5230
+ IngestionFailureEvent.AwsMskFailureReason = (function() {
3140
5231
 
3141
5232
  /**
3142
- * Properties of an ApiViolationReason.
5233
+ * Properties of an AwsMskFailureReason.
3143
5234
  * @memberof google.pubsub.v1.IngestionFailureEvent
3144
- * @interface IApiViolationReason
5235
+ * @interface IAwsMskFailureReason
5236
+ * @property {string|null} [clusterArn] AwsMskFailureReason clusterArn
5237
+ * @property {string|null} [kafkaTopic] AwsMskFailureReason kafkaTopic
5238
+ * @property {number|Long|null} [partitionId] AwsMskFailureReason partitionId
5239
+ * @property {number|Long|null} [offset] AwsMskFailureReason offset
5240
+ * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AwsMskFailureReason apiViolationReason
3145
5241
  */
3146
5242
 
3147
5243
  /**
3148
- * Constructs a new ApiViolationReason.
5244
+ * Constructs a new AwsMskFailureReason.
3149
5245
  * @memberof google.pubsub.v1.IngestionFailureEvent
3150
- * @classdesc Represents an ApiViolationReason.
3151
- * @implements IApiViolationReason
5246
+ * @classdesc Represents an AwsMskFailureReason.
5247
+ * @implements IAwsMskFailureReason
3152
5248
  * @constructor
3153
- * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
5249
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set
3154
5250
  */
3155
- function ApiViolationReason(properties) {
5251
+ function AwsMskFailureReason(properties) {
3156
5252
  if (properties)
3157
5253
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3158
5254
  if (properties[keys[i]] != null)
@@ -3160,63 +5256,147 @@
3160
5256
  }
3161
5257
 
3162
5258
  /**
3163
- * Creates a new ApiViolationReason instance using the specified properties.
5259
+ * AwsMskFailureReason clusterArn.
5260
+ * @member {string} clusterArn
5261
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5262
+ * @instance
5263
+ */
5264
+ AwsMskFailureReason.prototype.clusterArn = "";
5265
+
5266
+ /**
5267
+ * AwsMskFailureReason kafkaTopic.
5268
+ * @member {string} kafkaTopic
5269
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5270
+ * @instance
5271
+ */
5272
+ AwsMskFailureReason.prototype.kafkaTopic = "";
5273
+
5274
+ /**
5275
+ * AwsMskFailureReason partitionId.
5276
+ * @member {number|Long} partitionId
5277
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5278
+ * @instance
5279
+ */
5280
+ AwsMskFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
5281
+
5282
+ /**
5283
+ * AwsMskFailureReason offset.
5284
+ * @member {number|Long} offset
5285
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5286
+ * @instance
5287
+ */
5288
+ AwsMskFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
5289
+
5290
+ /**
5291
+ * AwsMskFailureReason apiViolationReason.
5292
+ * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason
5293
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5294
+ * @instance
5295
+ */
5296
+ AwsMskFailureReason.prototype.apiViolationReason = null;
5297
+
5298
+ // OneOf field names bound to virtual getters and setters
5299
+ var $oneOfFields;
5300
+
5301
+ /**
5302
+ * AwsMskFailureReason reason.
5303
+ * @member {"apiViolationReason"|undefined} reason
5304
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
5305
+ * @instance
5306
+ */
5307
+ Object.defineProperty(AwsMskFailureReason.prototype, "reason", {
5308
+ get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
5309
+ set: $util.oneOfSetter($oneOfFields)
5310
+ });
5311
+
5312
+ /**
5313
+ * Creates a new AwsMskFailureReason instance using the specified properties.
3164
5314
  * @function create
3165
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5315
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3166
5316
  * @static
3167
- * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set
3168
- * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance
5317
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set
5318
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason instance
3169
5319
  */
3170
- ApiViolationReason.create = function create(properties) {
3171
- return new ApiViolationReason(properties);
5320
+ AwsMskFailureReason.create = function create(properties) {
5321
+ return new AwsMskFailureReason(properties);
3172
5322
  };
3173
5323
 
3174
5324
  /**
3175
- * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
5325
+ * Encodes the specified AwsMskFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages.
3176
5326
  * @function encode
3177
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5327
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3178
5328
  * @static
3179
- * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
5329
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode
3180
5330
  * @param {$protobuf.Writer} [writer] Writer to encode to
3181
5331
  * @returns {$protobuf.Writer} Writer
3182
5332
  */
3183
- ApiViolationReason.encode = function encode(message, writer) {
5333
+ AwsMskFailureReason.encode = function encode(message, writer) {
3184
5334
  if (!writer)
3185
5335
  writer = $Writer.create();
5336
+ if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn"))
5337
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterArn);
5338
+ if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic"))
5339
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic);
5340
+ if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
5341
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId);
5342
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
5343
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
5344
+ if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
5345
+ $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
3186
5346
  return writer;
3187
5347
  };
3188
5348
 
3189
5349
  /**
3190
- * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages.
5350
+ * Encodes the specified AwsMskFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages.
3191
5351
  * @function encodeDelimited
3192
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5352
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3193
5353
  * @static
3194
- * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode
5354
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode
3195
5355
  * @param {$protobuf.Writer} [writer] Writer to encode to
3196
5356
  * @returns {$protobuf.Writer} Writer
3197
5357
  */
3198
- ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) {
5358
+ AwsMskFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
3199
5359
  return this.encode(message, writer).ldelim();
3200
5360
  };
3201
5361
 
3202
5362
  /**
3203
- * Decodes an ApiViolationReason message from the specified reader or buffer.
5363
+ * Decodes an AwsMskFailureReason message from the specified reader or buffer.
3204
5364
  * @function decode
3205
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5365
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3206
5366
  * @static
3207
5367
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3208
5368
  * @param {number} [length] Message length if known beforehand
3209
- * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
5369
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason
3210
5370
  * @throws {Error} If the payload is not a reader or valid buffer
3211
5371
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3212
5372
  */
3213
- ApiViolationReason.decode = function decode(reader, length) {
5373
+ AwsMskFailureReason.decode = function decode(reader, length) {
3214
5374
  if (!(reader instanceof $Reader))
3215
5375
  reader = $Reader.create(reader);
3216
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
5376
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason();
3217
5377
  while (reader.pos < end) {
3218
5378
  var tag = reader.uint32();
3219
5379
  switch (tag >>> 3) {
5380
+ case 1: {
5381
+ message.clusterArn = reader.string();
5382
+ break;
5383
+ }
5384
+ case 2: {
5385
+ message.kafkaTopic = reader.string();
5386
+ break;
5387
+ }
5388
+ case 3: {
5389
+ message.partitionId = reader.int64();
5390
+ break;
5391
+ }
5392
+ case 4: {
5393
+ message.offset = reader.int64();
5394
+ break;
5395
+ }
5396
+ case 5: {
5397
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
5398
+ break;
5399
+ }
3220
5400
  default:
3221
5401
  reader.skipType(tag & 7);
3222
5402
  break;
@@ -3226,108 +5406,198 @@
3226
5406
  };
3227
5407
 
3228
5408
  /**
3229
- * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited.
5409
+ * Decodes an AwsMskFailureReason message from the specified reader or buffer, length delimited.
3230
5410
  * @function decodeDelimited
3231
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5411
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3232
5412
  * @static
3233
5413
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3234
- * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
5414
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason
3235
5415
  * @throws {Error} If the payload is not a reader or valid buffer
3236
5416
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3237
5417
  */
3238
- ApiViolationReason.decodeDelimited = function decodeDelimited(reader) {
5418
+ AwsMskFailureReason.decodeDelimited = function decodeDelimited(reader) {
3239
5419
  if (!(reader instanceof $Reader))
3240
5420
  reader = new $Reader(reader);
3241
5421
  return this.decode(reader, reader.uint32());
3242
5422
  };
3243
5423
 
3244
5424
  /**
3245
- * Verifies an ApiViolationReason message.
5425
+ * Verifies an AwsMskFailureReason message.
3246
5426
  * @function verify
3247
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5427
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3248
5428
  * @static
3249
5429
  * @param {Object.<string,*>} message Plain object to verify
3250
5430
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3251
5431
  */
3252
- ApiViolationReason.verify = function verify(message) {
5432
+ AwsMskFailureReason.verify = function verify(message) {
3253
5433
  if (typeof message !== "object" || message === null)
3254
5434
  return "object expected";
5435
+ var properties = {};
5436
+ if (message.clusterArn != null && message.hasOwnProperty("clusterArn"))
5437
+ if (!$util.isString(message.clusterArn))
5438
+ return "clusterArn: string expected";
5439
+ if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
5440
+ if (!$util.isString(message.kafkaTopic))
5441
+ return "kafkaTopic: string expected";
5442
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
5443
+ if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high)))
5444
+ return "partitionId: integer|Long expected";
5445
+ if (message.offset != null && message.hasOwnProperty("offset"))
5446
+ if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
5447
+ return "offset: integer|Long expected";
5448
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5449
+ properties.reason = 1;
5450
+ {
5451
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason);
5452
+ if (error)
5453
+ return "apiViolationReason." + error;
5454
+ }
5455
+ }
3255
5456
  return null;
3256
5457
  };
3257
5458
 
3258
5459
  /**
3259
- * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types.
5460
+ * Creates an AwsMskFailureReason message from a plain object. Also converts values to their respective internal types.
3260
5461
  * @function fromObject
3261
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5462
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3262
5463
  * @static
3263
5464
  * @param {Object.<string,*>} object Plain object
3264
- * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason
5465
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason
3265
5466
  */
3266
- ApiViolationReason.fromObject = function fromObject(object) {
3267
- if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason)
5467
+ AwsMskFailureReason.fromObject = function fromObject(object) {
5468
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason)
3268
5469
  return object;
3269
- return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason();
5470
+ var message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason();
5471
+ if (object.clusterArn != null)
5472
+ message.clusterArn = String(object.clusterArn);
5473
+ if (object.kafkaTopic != null)
5474
+ message.kafkaTopic = String(object.kafkaTopic);
5475
+ if (object.partitionId != null)
5476
+ if ($util.Long)
5477
+ (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false;
5478
+ else if (typeof object.partitionId === "string")
5479
+ message.partitionId = parseInt(object.partitionId, 10);
5480
+ else if (typeof object.partitionId === "number")
5481
+ message.partitionId = object.partitionId;
5482
+ else if (typeof object.partitionId === "object")
5483
+ message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber();
5484
+ if (object.offset != null)
5485
+ if ($util.Long)
5486
+ (message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
5487
+ else if (typeof object.offset === "string")
5488
+ message.offset = parseInt(object.offset, 10);
5489
+ else if (typeof object.offset === "number")
5490
+ message.offset = object.offset;
5491
+ else if (typeof object.offset === "object")
5492
+ message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
5493
+ if (object.apiViolationReason != null) {
5494
+ if (typeof object.apiViolationReason !== "object")
5495
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.apiViolationReason: object expected");
5496
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
5497
+ }
5498
+ return message;
3270
5499
  };
3271
5500
 
3272
5501
  /**
3273
- * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified.
5502
+ * Creates a plain object from an AwsMskFailureReason message. Also converts values to other types if specified.
3274
5503
  * @function toObject
3275
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5504
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3276
5505
  * @static
3277
- * @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason
5506
+ * @param {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} message AwsMskFailureReason
3278
5507
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3279
5508
  * @returns {Object.<string,*>} Plain object
3280
5509
  */
3281
- ApiViolationReason.toObject = function toObject() {
3282
- return {};
5510
+ AwsMskFailureReason.toObject = function toObject(message, options) {
5511
+ if (!options)
5512
+ options = {};
5513
+ var object = {};
5514
+ if (options.defaults) {
5515
+ object.clusterArn = "";
5516
+ object.kafkaTopic = "";
5517
+ if ($util.Long) {
5518
+ var long = new $util.Long(0, 0, false);
5519
+ object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
5520
+ } else
5521
+ object.partitionId = options.longs === String ? "0" : 0;
5522
+ if ($util.Long) {
5523
+ var long = new $util.Long(0, 0, false);
5524
+ object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
5525
+ } else
5526
+ object.offset = options.longs === String ? "0" : 0;
5527
+ }
5528
+ if (message.clusterArn != null && message.hasOwnProperty("clusterArn"))
5529
+ object.clusterArn = message.clusterArn;
5530
+ if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
5531
+ object.kafkaTopic = message.kafkaTopic;
5532
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
5533
+ if (typeof message.partitionId === "number")
5534
+ object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId;
5535
+ else
5536
+ 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;
5537
+ if (message.offset != null && message.hasOwnProperty("offset"))
5538
+ if (typeof message.offset === "number")
5539
+ object.offset = options.longs === String ? String(message.offset) : message.offset;
5540
+ else
5541
+ 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;
5542
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5543
+ object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
5544
+ if (options.oneofs)
5545
+ object.reason = "apiViolationReason";
5546
+ }
5547
+ return object;
3283
5548
  };
3284
5549
 
3285
5550
  /**
3286
- * Converts this ApiViolationReason to JSON.
5551
+ * Converts this AwsMskFailureReason to JSON.
3287
5552
  * @function toJSON
3288
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5553
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3289
5554
  * @instance
3290
5555
  * @returns {Object.<string,*>} JSON object
3291
5556
  */
3292
- ApiViolationReason.prototype.toJSON = function toJSON() {
5557
+ AwsMskFailureReason.prototype.toJSON = function toJSON() {
3293
5558
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3294
5559
  };
3295
5560
 
3296
5561
  /**
3297
- * Gets the default type url for ApiViolationReason
5562
+ * Gets the default type url for AwsMskFailureReason
3298
5563
  * @function getTypeUrl
3299
- * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason
5564
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason
3300
5565
  * @static
3301
5566
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3302
5567
  * @returns {string} The default type url
3303
5568
  */
3304
- ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5569
+ AwsMskFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3305
5570
  if (typeUrlPrefix === undefined) {
3306
5571
  typeUrlPrefix = "type.googleapis.com";
3307
5572
  }
3308
- return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason";
5573
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason";
3309
5574
  };
3310
5575
 
3311
- return ApiViolationReason;
5576
+ return AwsMskFailureReason;
3312
5577
  })();
3313
5578
 
3314
- IngestionFailureEvent.AvroFailureReason = (function() {
5579
+ IngestionFailureEvent.AzureEventHubsFailureReason = (function() {
3315
5580
 
3316
5581
  /**
3317
- * Properties of an AvroFailureReason.
5582
+ * Properties of an AzureEventHubsFailureReason.
3318
5583
  * @memberof google.pubsub.v1.IngestionFailureEvent
3319
- * @interface IAvroFailureReason
5584
+ * @interface IAzureEventHubsFailureReason
5585
+ * @property {string|null} [namespace] AzureEventHubsFailureReason namespace
5586
+ * @property {string|null} [eventHub] AzureEventHubsFailureReason eventHub
5587
+ * @property {number|Long|null} [partitionId] AzureEventHubsFailureReason partitionId
5588
+ * @property {number|Long|null} [offset] AzureEventHubsFailureReason offset
5589
+ * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AzureEventHubsFailureReason apiViolationReason
3320
5590
  */
3321
5591
 
3322
5592
  /**
3323
- * Constructs a new AvroFailureReason.
5593
+ * Constructs a new AzureEventHubsFailureReason.
3324
5594
  * @memberof google.pubsub.v1.IngestionFailureEvent
3325
- * @classdesc Represents an AvroFailureReason.
3326
- * @implements IAvroFailureReason
5595
+ * @classdesc Represents an AzureEventHubsFailureReason.
5596
+ * @implements IAzureEventHubsFailureReason
3327
5597
  * @constructor
3328
- * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
5598
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set
3329
5599
  */
3330
- function AvroFailureReason(properties) {
5600
+ function AzureEventHubsFailureReason(properties) {
3331
5601
  if (properties)
3332
5602
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3333
5603
  if (properties[keys[i]] != null)
@@ -3335,63 +5605,147 @@
3335
5605
  }
3336
5606
 
3337
5607
  /**
3338
- * Creates a new AvroFailureReason instance using the specified properties.
5608
+ * AzureEventHubsFailureReason namespace.
5609
+ * @member {string} namespace
5610
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5611
+ * @instance
5612
+ */
5613
+ AzureEventHubsFailureReason.prototype.namespace = "";
5614
+
5615
+ /**
5616
+ * AzureEventHubsFailureReason eventHub.
5617
+ * @member {string} eventHub
5618
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5619
+ * @instance
5620
+ */
5621
+ AzureEventHubsFailureReason.prototype.eventHub = "";
5622
+
5623
+ /**
5624
+ * AzureEventHubsFailureReason partitionId.
5625
+ * @member {number|Long} partitionId
5626
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5627
+ * @instance
5628
+ */
5629
+ AzureEventHubsFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
5630
+
5631
+ /**
5632
+ * AzureEventHubsFailureReason offset.
5633
+ * @member {number|Long} offset
5634
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5635
+ * @instance
5636
+ */
5637
+ AzureEventHubsFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
5638
+
5639
+ /**
5640
+ * AzureEventHubsFailureReason apiViolationReason.
5641
+ * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason
5642
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5643
+ * @instance
5644
+ */
5645
+ AzureEventHubsFailureReason.prototype.apiViolationReason = null;
5646
+
5647
+ // OneOf field names bound to virtual getters and setters
5648
+ var $oneOfFields;
5649
+
5650
+ /**
5651
+ * AzureEventHubsFailureReason reason.
5652
+ * @member {"apiViolationReason"|undefined} reason
5653
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
5654
+ * @instance
5655
+ */
5656
+ Object.defineProperty(AzureEventHubsFailureReason.prototype, "reason", {
5657
+ get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
5658
+ set: $util.oneOfSetter($oneOfFields)
5659
+ });
5660
+
5661
+ /**
5662
+ * Creates a new AzureEventHubsFailureReason instance using the specified properties.
3339
5663
  * @function create
3340
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5664
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3341
5665
  * @static
3342
- * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set
3343
- * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance
5666
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set
5667
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason instance
3344
5668
  */
3345
- AvroFailureReason.create = function create(properties) {
3346
- return new AvroFailureReason(properties);
5669
+ AzureEventHubsFailureReason.create = function create(properties) {
5670
+ return new AzureEventHubsFailureReason(properties);
3347
5671
  };
3348
5672
 
3349
5673
  /**
3350
- * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
5674
+ * Encodes the specified AzureEventHubsFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages.
3351
5675
  * @function encode
3352
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5676
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3353
5677
  * @static
3354
- * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
5678
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode
3355
5679
  * @param {$protobuf.Writer} [writer] Writer to encode to
3356
5680
  * @returns {$protobuf.Writer} Writer
3357
5681
  */
3358
- AvroFailureReason.encode = function encode(message, writer) {
5682
+ AzureEventHubsFailureReason.encode = function encode(message, writer) {
3359
5683
  if (!writer)
3360
5684
  writer = $Writer.create();
5685
+ if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace"))
5686
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace);
5687
+ if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub"))
5688
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventHub);
5689
+ if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
5690
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId);
5691
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
5692
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
5693
+ if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
5694
+ $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
3361
5695
  return writer;
3362
5696
  };
3363
5697
 
3364
5698
  /**
3365
- * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages.
5699
+ * Encodes the specified AzureEventHubsFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages.
3366
5700
  * @function encodeDelimited
3367
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5701
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3368
5702
  * @static
3369
- * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode
5703
+ * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode
3370
5704
  * @param {$protobuf.Writer} [writer] Writer to encode to
3371
5705
  * @returns {$protobuf.Writer} Writer
3372
5706
  */
3373
- AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
5707
+ AzureEventHubsFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
3374
5708
  return this.encode(message, writer).ldelim();
3375
5709
  };
3376
5710
 
3377
5711
  /**
3378
- * Decodes an AvroFailureReason message from the specified reader or buffer.
5712
+ * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer.
3379
5713
  * @function decode
3380
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5714
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3381
5715
  * @static
3382
5716
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3383
5717
  * @param {number} [length] Message length if known beforehand
3384
- * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
5718
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason
3385
5719
  * @throws {Error} If the payload is not a reader or valid buffer
3386
5720
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3387
5721
  */
3388
- AvroFailureReason.decode = function decode(reader, length) {
5722
+ AzureEventHubsFailureReason.decode = function decode(reader, length) {
3389
5723
  if (!(reader instanceof $Reader))
3390
5724
  reader = $Reader.create(reader);
3391
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
5725
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason();
3392
5726
  while (reader.pos < end) {
3393
5727
  var tag = reader.uint32();
3394
5728
  switch (tag >>> 3) {
5729
+ case 1: {
5730
+ message.namespace = reader.string();
5731
+ break;
5732
+ }
5733
+ case 2: {
5734
+ message.eventHub = reader.string();
5735
+ break;
5736
+ }
5737
+ case 3: {
5738
+ message.partitionId = reader.int64();
5739
+ break;
5740
+ }
5741
+ case 4: {
5742
+ message.offset = reader.int64();
5743
+ break;
5744
+ }
5745
+ case 5: {
5746
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
5747
+ break;
5748
+ }
3395
5749
  default:
3396
5750
  reader.skipType(tag & 7);
3397
5751
  break;
@@ -3401,113 +5755,198 @@
3401
5755
  };
3402
5756
 
3403
5757
  /**
3404
- * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited.
5758
+ * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer, length delimited.
3405
5759
  * @function decodeDelimited
3406
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5760
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3407
5761
  * @static
3408
5762
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3409
- * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
5763
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason
3410
5764
  * @throws {Error} If the payload is not a reader or valid buffer
3411
5765
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3412
5766
  */
3413
- AvroFailureReason.decodeDelimited = function decodeDelimited(reader) {
5767
+ AzureEventHubsFailureReason.decodeDelimited = function decodeDelimited(reader) {
3414
5768
  if (!(reader instanceof $Reader))
3415
5769
  reader = new $Reader(reader);
3416
5770
  return this.decode(reader, reader.uint32());
3417
5771
  };
3418
5772
 
3419
5773
  /**
3420
- * Verifies an AvroFailureReason message.
5774
+ * Verifies an AzureEventHubsFailureReason message.
3421
5775
  * @function verify
3422
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5776
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3423
5777
  * @static
3424
5778
  * @param {Object.<string,*>} message Plain object to verify
3425
5779
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3426
5780
  */
3427
- AvroFailureReason.verify = function verify(message) {
5781
+ AzureEventHubsFailureReason.verify = function verify(message) {
3428
5782
  if (typeof message !== "object" || message === null)
3429
5783
  return "object expected";
5784
+ var properties = {};
5785
+ if (message.namespace != null && message.hasOwnProperty("namespace"))
5786
+ if (!$util.isString(message.namespace))
5787
+ return "namespace: string expected";
5788
+ if (message.eventHub != null && message.hasOwnProperty("eventHub"))
5789
+ if (!$util.isString(message.eventHub))
5790
+ return "eventHub: string expected";
5791
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
5792
+ if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high)))
5793
+ return "partitionId: integer|Long expected";
5794
+ if (message.offset != null && message.hasOwnProperty("offset"))
5795
+ if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
5796
+ return "offset: integer|Long expected";
5797
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5798
+ properties.reason = 1;
5799
+ {
5800
+ var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason);
5801
+ if (error)
5802
+ return "apiViolationReason." + error;
5803
+ }
5804
+ }
3430
5805
  return null;
3431
5806
  };
3432
5807
 
3433
5808
  /**
3434
- * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types.
5809
+ * Creates an AzureEventHubsFailureReason message from a plain object. Also converts values to their respective internal types.
3435
5810
  * @function fromObject
3436
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5811
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3437
5812
  * @static
3438
5813
  * @param {Object.<string,*>} object Plain object
3439
- * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason
5814
+ * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason
3440
5815
  */
3441
- AvroFailureReason.fromObject = function fromObject(object) {
3442
- if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason)
5816
+ AzureEventHubsFailureReason.fromObject = function fromObject(object) {
5817
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason)
3443
5818
  return object;
3444
- return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason();
5819
+ var message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason();
5820
+ if (object.namespace != null)
5821
+ message.namespace = String(object.namespace);
5822
+ if (object.eventHub != null)
5823
+ message.eventHub = String(object.eventHub);
5824
+ if (object.partitionId != null)
5825
+ if ($util.Long)
5826
+ (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false;
5827
+ else if (typeof object.partitionId === "string")
5828
+ message.partitionId = parseInt(object.partitionId, 10);
5829
+ else if (typeof object.partitionId === "number")
5830
+ message.partitionId = object.partitionId;
5831
+ else if (typeof object.partitionId === "object")
5832
+ message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber();
5833
+ if (object.offset != null)
5834
+ if ($util.Long)
5835
+ (message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
5836
+ else if (typeof object.offset === "string")
5837
+ message.offset = parseInt(object.offset, 10);
5838
+ else if (typeof object.offset === "number")
5839
+ message.offset = object.offset;
5840
+ else if (typeof object.offset === "object")
5841
+ message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
5842
+ if (object.apiViolationReason != null) {
5843
+ if (typeof object.apiViolationReason !== "object")
5844
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.apiViolationReason: object expected");
5845
+ message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
5846
+ }
5847
+ return message;
3445
5848
  };
3446
5849
 
3447
5850
  /**
3448
- * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified.
5851
+ * Creates a plain object from an AzureEventHubsFailureReason message. Also converts values to other types if specified.
3449
5852
  * @function toObject
3450
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5853
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3451
5854
  * @static
3452
- * @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason
5855
+ * @param {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} message AzureEventHubsFailureReason
3453
5856
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3454
5857
  * @returns {Object.<string,*>} Plain object
3455
5858
  */
3456
- AvroFailureReason.toObject = function toObject() {
3457
- return {};
5859
+ AzureEventHubsFailureReason.toObject = function toObject(message, options) {
5860
+ if (!options)
5861
+ options = {};
5862
+ var object = {};
5863
+ if (options.defaults) {
5864
+ object.namespace = "";
5865
+ object.eventHub = "";
5866
+ if ($util.Long) {
5867
+ var long = new $util.Long(0, 0, false);
5868
+ object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
5869
+ } else
5870
+ object.partitionId = options.longs === String ? "0" : 0;
5871
+ if ($util.Long) {
5872
+ var long = new $util.Long(0, 0, false);
5873
+ object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
5874
+ } else
5875
+ object.offset = options.longs === String ? "0" : 0;
5876
+ }
5877
+ if (message.namespace != null && message.hasOwnProperty("namespace"))
5878
+ object.namespace = message.namespace;
5879
+ if (message.eventHub != null && message.hasOwnProperty("eventHub"))
5880
+ object.eventHub = message.eventHub;
5881
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
5882
+ if (typeof message.partitionId === "number")
5883
+ object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId;
5884
+ else
5885
+ 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;
5886
+ if (message.offset != null && message.hasOwnProperty("offset"))
5887
+ if (typeof message.offset === "number")
5888
+ object.offset = options.longs === String ? String(message.offset) : message.offset;
5889
+ else
5890
+ 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;
5891
+ if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
5892
+ object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
5893
+ if (options.oneofs)
5894
+ object.reason = "apiViolationReason";
5895
+ }
5896
+ return object;
3458
5897
  };
3459
5898
 
3460
5899
  /**
3461
- * Converts this AvroFailureReason to JSON.
5900
+ * Converts this AzureEventHubsFailureReason to JSON.
3462
5901
  * @function toJSON
3463
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5902
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3464
5903
  * @instance
3465
5904
  * @returns {Object.<string,*>} JSON object
3466
5905
  */
3467
- AvroFailureReason.prototype.toJSON = function toJSON() {
5906
+ AzureEventHubsFailureReason.prototype.toJSON = function toJSON() {
3468
5907
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3469
5908
  };
3470
5909
 
3471
5910
  /**
3472
- * Gets the default type url for AvroFailureReason
5911
+ * Gets the default type url for AzureEventHubsFailureReason
3473
5912
  * @function getTypeUrl
3474
- * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason
5913
+ * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason
3475
5914
  * @static
3476
5915
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3477
5916
  * @returns {string} The default type url
3478
5917
  */
3479
- AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5918
+ AzureEventHubsFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3480
5919
  if (typeUrlPrefix === undefined) {
3481
5920
  typeUrlPrefix = "type.googleapis.com";
3482
5921
  }
3483
- return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason";
5922
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason";
3484
5923
  };
3485
5924
 
3486
- return AvroFailureReason;
5925
+ return AzureEventHubsFailureReason;
3487
5926
  })();
3488
5927
 
3489
- IngestionFailureEvent.CloudStorageFailure = (function() {
5928
+ IngestionFailureEvent.ConfluentCloudFailureReason = (function() {
3490
5929
 
3491
5930
  /**
3492
- * Properties of a CloudStorageFailure.
5931
+ * Properties of a ConfluentCloudFailureReason.
3493
5932
  * @memberof google.pubsub.v1.IngestionFailureEvent
3494
- * @interface ICloudStorageFailure
3495
- * @property {string|null} [bucket] CloudStorageFailure bucket
3496
- * @property {string|null} [objectName] CloudStorageFailure objectName
3497
- * @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration
3498
- * @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason
3499
- * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason
5933
+ * @interface IConfluentCloudFailureReason
5934
+ * @property {string|null} [clusterId] ConfluentCloudFailureReason clusterId
5935
+ * @property {string|null} [kafkaTopic] ConfluentCloudFailureReason kafkaTopic
5936
+ * @property {number|Long|null} [partitionId] ConfluentCloudFailureReason partitionId
5937
+ * @property {number|Long|null} [offset] ConfluentCloudFailureReason offset
5938
+ * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] ConfluentCloudFailureReason apiViolationReason
3500
5939
  */
3501
5940
 
3502
5941
  /**
3503
- * Constructs a new CloudStorageFailure.
5942
+ * Constructs a new ConfluentCloudFailureReason.
3504
5943
  * @memberof google.pubsub.v1.IngestionFailureEvent
3505
- * @classdesc Represents a CloudStorageFailure.
3506
- * @implements ICloudStorageFailure
5944
+ * @classdesc Represents a ConfluentCloudFailureReason.
5945
+ * @implements IConfluentCloudFailureReason
3507
5946
  * @constructor
3508
- * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
5947
+ * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set
3509
5948
  */
3510
- function CloudStorageFailure(properties) {
5949
+ function ConfluentCloudFailureReason(properties) {
3511
5950
  if (properties)
3512
5951
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3513
5952
  if (properties[keys[i]] != null)
@@ -3515,144 +5954,144 @@
3515
5954
  }
3516
5955
 
3517
5956
  /**
3518
- * CloudStorageFailure bucket.
3519
- * @member {string} bucket
3520
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5957
+ * ConfluentCloudFailureReason clusterId.
5958
+ * @member {string} clusterId
5959
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3521
5960
  * @instance
3522
5961
  */
3523
- CloudStorageFailure.prototype.bucket = "";
5962
+ ConfluentCloudFailureReason.prototype.clusterId = "";
3524
5963
 
3525
5964
  /**
3526
- * CloudStorageFailure objectName.
3527
- * @member {string} objectName
3528
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5965
+ * ConfluentCloudFailureReason kafkaTopic.
5966
+ * @member {string} kafkaTopic
5967
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3529
5968
  * @instance
3530
5969
  */
3531
- CloudStorageFailure.prototype.objectName = "";
5970
+ ConfluentCloudFailureReason.prototype.kafkaTopic = "";
3532
5971
 
3533
5972
  /**
3534
- * CloudStorageFailure objectGeneration.
3535
- * @member {number|Long} objectGeneration
3536
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5973
+ * ConfluentCloudFailureReason partitionId.
5974
+ * @member {number|Long} partitionId
5975
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3537
5976
  * @instance
3538
5977
  */
3539
- CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
5978
+ ConfluentCloudFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
3540
5979
 
3541
5980
  /**
3542
- * CloudStorageFailure avroFailureReason.
3543
- * @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason
3544
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5981
+ * ConfluentCloudFailureReason offset.
5982
+ * @member {number|Long} offset
5983
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3545
5984
  * @instance
3546
5985
  */
3547
- CloudStorageFailure.prototype.avroFailureReason = null;
5986
+ ConfluentCloudFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
3548
5987
 
3549
5988
  /**
3550
- * CloudStorageFailure apiViolationReason.
5989
+ * ConfluentCloudFailureReason apiViolationReason.
3551
5990
  * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason
3552
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
5991
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3553
5992
  * @instance
3554
5993
  */
3555
- CloudStorageFailure.prototype.apiViolationReason = null;
5994
+ ConfluentCloudFailureReason.prototype.apiViolationReason = null;
3556
5995
 
3557
5996
  // OneOf field names bound to virtual getters and setters
3558
5997
  var $oneOfFields;
3559
5998
 
3560
5999
  /**
3561
- * CloudStorageFailure reason.
3562
- * @member {"avroFailureReason"|"apiViolationReason"|undefined} reason
3563
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6000
+ * ConfluentCloudFailureReason reason.
6001
+ * @member {"apiViolationReason"|undefined} reason
6002
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3564
6003
  * @instance
3565
6004
  */
3566
- Object.defineProperty(CloudStorageFailure.prototype, "reason", {
3567
- get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason"]),
6005
+ Object.defineProperty(ConfluentCloudFailureReason.prototype, "reason", {
6006
+ get: $util.oneOfGetter($oneOfFields = ["apiViolationReason"]),
3568
6007
  set: $util.oneOfSetter($oneOfFields)
3569
6008
  });
3570
6009
 
3571
6010
  /**
3572
- * Creates a new CloudStorageFailure instance using the specified properties.
6011
+ * Creates a new ConfluentCloudFailureReason instance using the specified properties.
3573
6012
  * @function create
3574
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6013
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3575
6014
  * @static
3576
- * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set
3577
- * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance
6015
+ * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set
6016
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason instance
3578
6017
  */
3579
- CloudStorageFailure.create = function create(properties) {
3580
- return new CloudStorageFailure(properties);
6018
+ ConfluentCloudFailureReason.create = function create(properties) {
6019
+ return new ConfluentCloudFailureReason(properties);
3581
6020
  };
3582
6021
 
3583
6022
  /**
3584
- * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
6023
+ * Encodes the specified ConfluentCloudFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages.
3585
6024
  * @function encode
3586
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6025
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3587
6026
  * @static
3588
- * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
6027
+ * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode
3589
6028
  * @param {$protobuf.Writer} [writer] Writer to encode to
3590
6029
  * @returns {$protobuf.Writer} Writer
3591
6030
  */
3592
- CloudStorageFailure.encode = function encode(message, writer) {
6031
+ ConfluentCloudFailureReason.encode = function encode(message, writer) {
3593
6032
  if (!writer)
3594
6033
  writer = $Writer.create();
3595
- if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket"))
3596
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket);
3597
- if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName"))
3598
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName);
3599
- if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration"))
3600
- writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration);
3601
- if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason"))
3602
- $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
6034
+ if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId"))
6035
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId);
6036
+ if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic"))
6037
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic);
6038
+ if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
6039
+ writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId);
6040
+ if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
6041
+ writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset);
3603
6042
  if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason"))
3604
- $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
6043
+ $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
3605
6044
  return writer;
3606
6045
  };
3607
6046
 
3608
6047
  /**
3609
- * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages.
6048
+ * Encodes the specified ConfluentCloudFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages.
3610
6049
  * @function encodeDelimited
3611
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6050
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3612
6051
  * @static
3613
- * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode
6052
+ * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode
3614
6053
  * @param {$protobuf.Writer} [writer] Writer to encode to
3615
6054
  * @returns {$protobuf.Writer} Writer
3616
6055
  */
3617
- CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) {
6056
+ ConfluentCloudFailureReason.encodeDelimited = function encodeDelimited(message, writer) {
3618
6057
  return this.encode(message, writer).ldelim();
3619
6058
  };
3620
6059
 
3621
6060
  /**
3622
- * Decodes a CloudStorageFailure message from the specified reader or buffer.
6061
+ * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer.
3623
6062
  * @function decode
3624
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6063
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3625
6064
  * @static
3626
6065
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3627
6066
  * @param {number} [length] Message length if known beforehand
3628
- * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
6067
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason
3629
6068
  * @throws {Error} If the payload is not a reader or valid buffer
3630
6069
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3631
6070
  */
3632
- CloudStorageFailure.decode = function decode(reader, length) {
6071
+ ConfluentCloudFailureReason.decode = function decode(reader, length) {
3633
6072
  if (!(reader instanceof $Reader))
3634
6073
  reader = $Reader.create(reader);
3635
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
6074
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason();
3636
6075
  while (reader.pos < end) {
3637
6076
  var tag = reader.uint32();
3638
6077
  switch (tag >>> 3) {
3639
6078
  case 1: {
3640
- message.bucket = reader.string();
6079
+ message.clusterId = reader.string();
3641
6080
  break;
3642
6081
  }
3643
6082
  case 2: {
3644
- message.objectName = reader.string();
6083
+ message.kafkaTopic = reader.string();
3645
6084
  break;
3646
6085
  }
3647
6086
  case 3: {
3648
- message.objectGeneration = reader.int64();
6087
+ message.partitionId = reader.int64();
3649
6088
  break;
3650
6089
  }
3651
- case 5: {
3652
- message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32());
6090
+ case 4: {
6091
+ message.offset = reader.int64();
3653
6092
  break;
3654
6093
  }
3655
- case 6: {
6094
+ case 5: {
3656
6095
  message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32());
3657
6096
  break;
3658
6097
  }
@@ -3665,53 +6104,46 @@
3665
6104
  };
3666
6105
 
3667
6106
  /**
3668
- * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited.
6107
+ * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer, length delimited.
3669
6108
  * @function decodeDelimited
3670
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6109
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3671
6110
  * @static
3672
6111
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3673
- * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
6112
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason
3674
6113
  * @throws {Error} If the payload is not a reader or valid buffer
3675
6114
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
3676
6115
  */
3677
- CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) {
6116
+ ConfluentCloudFailureReason.decodeDelimited = function decodeDelimited(reader) {
3678
6117
  if (!(reader instanceof $Reader))
3679
6118
  reader = new $Reader(reader);
3680
6119
  return this.decode(reader, reader.uint32());
3681
6120
  };
3682
6121
 
3683
6122
  /**
3684
- * Verifies a CloudStorageFailure message.
6123
+ * Verifies a ConfluentCloudFailureReason message.
3685
6124
  * @function verify
3686
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6125
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3687
6126
  * @static
3688
6127
  * @param {Object.<string,*>} message Plain object to verify
3689
6128
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
3690
6129
  */
3691
- CloudStorageFailure.verify = function verify(message) {
6130
+ ConfluentCloudFailureReason.verify = function verify(message) {
3692
6131
  if (typeof message !== "object" || message === null)
3693
6132
  return "object expected";
3694
6133
  var properties = {};
3695
- if (message.bucket != null && message.hasOwnProperty("bucket"))
3696
- if (!$util.isString(message.bucket))
3697
- return "bucket: string expected";
3698
- if (message.objectName != null && message.hasOwnProperty("objectName"))
3699
- if (!$util.isString(message.objectName))
3700
- return "objectName: string expected";
3701
- if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
3702
- if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high)))
3703
- return "objectGeneration: integer|Long expected";
3704
- if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
3705
- properties.reason = 1;
3706
- {
3707
- var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason);
3708
- if (error)
3709
- return "avroFailureReason." + error;
3710
- }
3711
- }
6134
+ if (message.clusterId != null && message.hasOwnProperty("clusterId"))
6135
+ if (!$util.isString(message.clusterId))
6136
+ return "clusterId: string expected";
6137
+ if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
6138
+ if (!$util.isString(message.kafkaTopic))
6139
+ return "kafkaTopic: string expected";
6140
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
6141
+ if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high)))
6142
+ return "partitionId: integer|Long expected";
6143
+ if (message.offset != null && message.hasOwnProperty("offset"))
6144
+ if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high)))
6145
+ return "offset: integer|Long expected";
3712
6146
  if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
3713
- if (properties.reason === 1)
3714
- return "reason: multiple values";
3715
6147
  properties.reason = 1;
3716
6148
  {
3717
6149
  var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason);
@@ -3723,79 +6155,88 @@
3723
6155
  };
3724
6156
 
3725
6157
  /**
3726
- * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types.
6158
+ * Creates a ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types.
3727
6159
  * @function fromObject
3728
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6160
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3729
6161
  * @static
3730
6162
  * @param {Object.<string,*>} object Plain object
3731
- * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure
6163
+ * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason
3732
6164
  */
3733
- CloudStorageFailure.fromObject = function fromObject(object) {
3734
- if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure)
6165
+ ConfluentCloudFailureReason.fromObject = function fromObject(object) {
6166
+ if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason)
3735
6167
  return object;
3736
- var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure();
3737
- if (object.bucket != null)
3738
- message.bucket = String(object.bucket);
3739
- if (object.objectName != null)
3740
- message.objectName = String(object.objectName);
3741
- if (object.objectGeneration != null)
6168
+ var message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason();
6169
+ if (object.clusterId != null)
6170
+ message.clusterId = String(object.clusterId);
6171
+ if (object.kafkaTopic != null)
6172
+ message.kafkaTopic = String(object.kafkaTopic);
6173
+ if (object.partitionId != null)
3742
6174
  if ($util.Long)
3743
- (message.objectGeneration = $util.Long.fromValue(object.objectGeneration)).unsigned = false;
3744
- else if (typeof object.objectGeneration === "string")
3745
- message.objectGeneration = parseInt(object.objectGeneration, 10);
3746
- else if (typeof object.objectGeneration === "number")
3747
- message.objectGeneration = object.objectGeneration;
3748
- else if (typeof object.objectGeneration === "object")
3749
- message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber();
3750
- if (object.avroFailureReason != null) {
3751
- if (typeof object.avroFailureReason !== "object")
3752
- throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected");
3753
- message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason);
3754
- }
6175
+ (message.partitionId = $util.Long.fromValue(object.partitionId)).unsigned = false;
6176
+ else if (typeof object.partitionId === "string")
6177
+ message.partitionId = parseInt(object.partitionId, 10);
6178
+ else if (typeof object.partitionId === "number")
6179
+ message.partitionId = object.partitionId;
6180
+ else if (typeof object.partitionId === "object")
6181
+ message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber();
6182
+ if (object.offset != null)
6183
+ if ($util.Long)
6184
+ (message.offset = $util.Long.fromValue(object.offset)).unsigned = false;
6185
+ else if (typeof object.offset === "string")
6186
+ message.offset = parseInt(object.offset, 10);
6187
+ else if (typeof object.offset === "number")
6188
+ message.offset = object.offset;
6189
+ else if (typeof object.offset === "object")
6190
+ message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber();
3755
6191
  if (object.apiViolationReason != null) {
3756
6192
  if (typeof object.apiViolationReason !== "object")
3757
- throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected");
6193
+ throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.apiViolationReason: object expected");
3758
6194
  message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason);
3759
6195
  }
3760
6196
  return message;
3761
6197
  };
3762
6198
 
3763
6199
  /**
3764
- * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified.
6200
+ * Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified.
3765
6201
  * @function toObject
3766
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6202
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3767
6203
  * @static
3768
- * @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure
6204
+ * @param {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} message ConfluentCloudFailureReason
3769
6205
  * @param {$protobuf.IConversionOptions} [options] Conversion options
3770
6206
  * @returns {Object.<string,*>} Plain object
3771
6207
  */
3772
- CloudStorageFailure.toObject = function toObject(message, options) {
6208
+ ConfluentCloudFailureReason.toObject = function toObject(message, options) {
3773
6209
  if (!options)
3774
6210
  options = {};
3775
6211
  var object = {};
3776
6212
  if (options.defaults) {
3777
- object.bucket = "";
3778
- object.objectName = "";
6213
+ object.clusterId = "";
6214
+ object.kafkaTopic = "";
3779
6215
  if ($util.Long) {
3780
6216
  var long = new $util.Long(0, 0, false);
3781
- object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6217
+ object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
3782
6218
  } else
3783
- object.objectGeneration = options.longs === String ? "0" : 0;
3784
- }
3785
- if (message.bucket != null && message.hasOwnProperty("bucket"))
3786
- object.bucket = message.bucket;
3787
- if (message.objectName != null && message.hasOwnProperty("objectName"))
3788
- object.objectName = message.objectName;
3789
- if (message.objectGeneration != null && message.hasOwnProperty("objectGeneration"))
3790
- if (typeof message.objectGeneration === "number")
3791
- object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration;
6219
+ object.partitionId = options.longs === String ? "0" : 0;
6220
+ if ($util.Long) {
6221
+ var long = new $util.Long(0, 0, false);
6222
+ object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6223
+ } else
6224
+ object.offset = options.longs === String ? "0" : 0;
6225
+ }
6226
+ if (message.clusterId != null && message.hasOwnProperty("clusterId"))
6227
+ object.clusterId = message.clusterId;
6228
+ if (message.kafkaTopic != null && message.hasOwnProperty("kafkaTopic"))
6229
+ object.kafkaTopic = message.kafkaTopic;
6230
+ if (message.partitionId != null && message.hasOwnProperty("partitionId"))
6231
+ if (typeof message.partitionId === "number")
6232
+ object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId;
3792
6233
  else
3793
- object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration;
3794
- if (message.avroFailureReason != null && message.hasOwnProperty("avroFailureReason")) {
3795
- object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options);
3796
- if (options.oneofs)
3797
- object.reason = "avroFailureReason";
3798
- }
6234
+ 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;
6235
+ if (message.offset != null && message.hasOwnProperty("offset"))
6236
+ if (typeof message.offset === "number")
6237
+ object.offset = options.longs === String ? String(message.offset) : message.offset;
6238
+ else
6239
+ 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;
3799
6240
  if (message.apiViolationReason != null && message.hasOwnProperty("apiViolationReason")) {
3800
6241
  object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options);
3801
6242
  if (options.oneofs)
@@ -3805,32 +6246,32 @@
3805
6246
  };
3806
6247
 
3807
6248
  /**
3808
- * Converts this CloudStorageFailure to JSON.
6249
+ * Converts this ConfluentCloudFailureReason to JSON.
3809
6250
  * @function toJSON
3810
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6251
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3811
6252
  * @instance
3812
6253
  * @returns {Object.<string,*>} JSON object
3813
6254
  */
3814
- CloudStorageFailure.prototype.toJSON = function toJSON() {
6255
+ ConfluentCloudFailureReason.prototype.toJSON = function toJSON() {
3815
6256
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
3816
6257
  };
3817
6258
 
3818
6259
  /**
3819
- * Gets the default type url for CloudStorageFailure
6260
+ * Gets the default type url for ConfluentCloudFailureReason
3820
6261
  * @function getTypeUrl
3821
- * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure
6262
+ * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason
3822
6263
  * @static
3823
6264
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3824
6265
  * @returns {string} The default type url
3825
6266
  */
3826
- CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6267
+ ConfluentCloudFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3827
6268
  if (typeUrlPrefix === undefined) {
3828
6269
  typeUrlPrefix = "type.googleapis.com";
3829
6270
  }
3830
- return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure";
6271
+ return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason";
3831
6272
  };
3832
6273
 
3833
- return CloudStorageFailure;
6274
+ return ConfluentCloudFailureReason;
3834
6275
  })();
3835
6276
 
3836
6277
  return IngestionFailureEvent;